/* FOR LOVE 77 — one shared visual system. See design-system/for-love-77/MASTER.md. */
@font-face {
  font-family: "Noto Sans SC";
  src: url("../fonts/noto-sans-sc-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Mono";
  src: url("../fonts/dm-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #fff;
  --surface-soft: #f0f3f8;
  --ink: #172133;
  --muted: #536176;
  --faint: #647187;
  --line: #e1e6ee;
  --line-strong: #b6c0d0;
  --brand: #3459c4;
  --brand-dark: #26459e;
  --brand-soft: #edf2ff;
  --on-brand: #fff;
  --night: #19263d;
  --night-muted: #c0cadd;
  --night-line: #3d4b63;
  --success: #25846c;
  --sans: "Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif;
  --mono: "DM Mono",Consolas,monospace;
  --gutter: clamp(1.25rem,4vw,3rem);
  --maxw: 75rem;
  --header-h: 5rem;
  --radius: .625rem;
  --radius-lg: 1rem;
  --shadow: 0 8px 28px rgb(23 33 51 / 5%);
  --shadow-dialog: 0 24px 80px rgb(23 33 51 / 24%);
  --ease: cubic-bezier(.2,.7,.3,1);
  --duration: 180ms;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
}

/* Reset and accessible shared primitives */
*,*::before,*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

img,svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

button,a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

h1,h2,h3,p,figure {
  margin: 0;
}

h1,h2,h3 {
  line-height: 1.35;
  text-wrap: balance;
}

ul,ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

em {
  font-style: normal;
}

[hidden] {
  display: none!important;
}

::selection {
  color: var(--ink);
  background: #dbe5ff;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - var(--gutter)*2,var(--maxw));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: -6rem;
  left: 1rem;
  z-index: 100;
  padding: .75rem 1.25rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
}

.skip-link:focus {
  top: 1rem;
}

.eyebrow,.micro {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  font: 400 .75rem/1.6 var(--mono);
  letter-spacing: .05em;
  color: var(--muted);
}

.sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .5;
}

.dot,.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent,var(--success));
  flex: 0 0 auto;
}

.btn,.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 48px;
  padding: .75rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.5;
  transition: background var(--duration),border-color var(--duration),box-shadow var(--duration);
}

.btn--solid,.btn--dark,.header-cta {
  background: var(--brand);
  color: var(--on-brand);
}

.btn--solid:hover,.btn--dark:hover,.header-cta:hover {
  background: var(--brand-dark);
}

.btn--small {
  min-height: 44px;
}

.btn svg,.header-cta svg,.link-arrow svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  min-height: 48px;
  padding-block: .5rem;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 500;
  transition: color var(--duration);
}

.link-arrow:hover {
  color: var(--brand);
}

button:active,.btn:active {
  filter: brightness(.96);
}

/* Header and navigation */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 30;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header.is-scrolled {
  box-shadow: 0 3px 16px rgb(23 33 51 / 4%);
}

.header-progress {
  position: absolute;
  bottom: -1px;
  inset-inline: 0;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  flex-shrink: 0;
  min-height: 44px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--on-brand);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
}

.brand__type {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__name {
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: .04em;
}

.brand__en {
  color: var(--faint);
  font: .625rem/1.5 var(--mono);
  letter-spacing: .1em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.site-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  min-height: 44px;
  padding: .5rem 1rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: .875rem;
  transition: color var(--duration),background var(--duration);
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.site-nav a[aria-current] {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
}

.nav-dot {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-status {
  display: flex;
  align-items: center;
  gap: .5rem;
  font: .6875rem var(--mono);
  color: var(--muted);
}

.header-cta {
  min-height: 44px;
  padding: .65rem 1rem;
  font-size: .8125rem;
}

.menu-toggle,.menu-close,.dialog-close {
  display: grid;
  place-content: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  transition: background var(--duration);
}

.menu-toggle {
  display: none;
  gap: 6px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
}

.menu-close svg,.dialog-close svg {
  width: 20px;
  height: 20px;
}

.menu-close:hover,.dialog-close:hover {
  background: var(--surface-soft);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--duration);
}

.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
}

.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding: 1rem var(--gutter);
  border-bottom: 1px solid var(--line);
}

.mobile-menu__body {
  padding: 1.5rem var(--gutter);
  overflow-y: auto;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.5rem;
  font-weight: 500;
}

.mobile-nav a>span {
  color: var(--faint);
  font: .75rem var(--mono);
}

.mobile-nav svg {
  margin-left: auto;
  width: 24px;
}

.mobile-nav a[aria-current] {
  color: var(--brand);
}

.mobile-menu__games {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding-block: 1.5rem;
}

.mobile-menu__games a {
  display: flex;
  gap: .75rem;
  align-items: center;
  min-height: 44px;
}

.mobile-menu__foot {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* Home: purposeful hero with direct access to the real game pages */
.view {
  position: relative;
}

.view--home {
  padding-top: var(--header-h);
}

.home-hero {
  padding: calc(var(--header-h) + 5rem) 0 0;
}

.home-hero__grid {
  display: grid;
  grid-template-columns: minmax(0,1.2fr) minmax(0,1fr);
  gap: clamp(3rem,7vw,7rem);
  align-items: center;
}

.home-hero__lead {
  min-width: 0;
}

.home-hero .eyebrow {
  color: var(--brand);
}

.home-hero__title {
  margin-top: 1.5rem;
  color: var(--ink);
  font-size: clamp(2.75rem,4.5vw,4.25rem);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -.04em;
}

.home-hero__title span {
  display: block;
}

.home-hero__title span:last-child {
  color: var(--brand);
}

.home-hero__lede {
  max-width: 28em;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.9;
}

.home-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
}

.home-hero__aside {
  background: var(--night);
  border: 1px solid var(--night);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  color: var(--surface);
}

.collection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--night-line);
}

.collection-head h2 {
  font-size: .9375rem;
  font-weight: 500;
}

.collection-head>span {
  font: .625rem var(--mono);
  color: var(--night-muted);
  letter-spacing: .06em;
}

.hero-games {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1rem 0;
}

.hero-game {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 84px;
  padding: .75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: border-color var(--duration),background var(--duration);
}

.hero-game:hover {
  border-color: var(--night-line);
  background: rgb(255 255 255 / 5%);
}

.hero-game:focus-visible {
  outline-color: var(--night-muted);
}

.hero-game img {
  width: 64px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
}

.hero-game__text {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  flex: 1;
  min-width: 0;
}

.hero-game strong {
  font-size: 1rem;
  font-weight: 500;
}

.hero-game small {
  color: var(--night-muted);
  font-size: .75rem;
}

.hero-game>svg {
  width: 20px;
  height: 20px;
  color: var(--night-muted);
}

.collection-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--night-line);
  color: var(--night-muted);
  font-size: .75rem;
}

.collection-foot>span {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.collection-foot .dot {
  background: #70d7b8;
}

.home-hero__foot {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 4rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.spec {
  display: flex;
  flex: 1;
  justify-content: space-between;
  gap: 1rem;
}

.spec__row {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.spec__row span {
  color: var(--faint);
  font-size: .75rem;
}

.spec__row strong {
  font-size: .8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.spec__row strong>span {
  font: inherit;
  color: inherit;
}

.home-hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding-left: 2rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
}

.home-hero__scroll svg {
  width: 16px;
  height: 16px;
}

/* Shared section hierarchy and cards */
.home-games,.home-notes {
  padding-block: 5rem;
}

.home-section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 3rem;
  margin-bottom: 2rem;
}

.home-section__title {
  margin-top: .625rem;
  font-size: clamp(1.75rem,3vw,2.25rem);
  font-weight: 600;
  letter-spacing: -.025em;
}

.home-section__lede {
  max-width: 28em;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.9;
}

.game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,19rem),1fr));
  gap: 1.5rem;
}

.game-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color var(--duration),box-shadow var(--duration);
}

.game-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.game-card__media {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--surface-soft);
}

.game-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.game-card__num,
.game-card__arrow {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--duration),visibility var(--duration);
}

.game-card:hover .game-card__num,
.game-card:hover .game-card__arrow {
  opacity: 1;
  visibility: visible;
}

.game-card__num {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: .25rem .5rem;
  color: var(--surface);
  background: var(--night);
  border-radius: 5px;
  font: .6875rem/1.5 var(--mono);
}

.game-card__arrow {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
}

.game-card__arrow svg {
  width: 18px;
  height: 18px;
}

.game-card__body {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1.5rem;
}

.game-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.game-card__name {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -.02em;
}

.game-card__en {
  font: .625rem/1.5 var(--mono);
  letter-spacing: .04em;
  color: var(--faint);
}

.game-card__meta {
  color: var(--muted);
  font-size: .875rem;
}

.game-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.game-card__tags span {
  padding: .2rem .625rem;
  background: var(--surface-soft);
  color: var(--muted);
  border-radius: 5px;
  font-size: .75rem;
}

.game-card__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--brand);
  font-size: .8125rem;
  font-weight: 500;
}

.game-card__cta svg {
  width: 18px;
  height: 18px;
}

.home-notes {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.usage-guide {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.usage-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .625rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.usage-tabs button {
  min-height: 44px;
  padding: .625rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: .875rem;
  transition: background var(--duration), color var(--duration), border-color var(--duration);
}

.usage-tabs button:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.usage-tabs button[aria-selected="true"] {
  color: var(--brand);
  background: var(--surface);
  border-color: var(--line);
  font-weight: 500;
}

.usage-panel {
  padding: 2rem;
}

.usage-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin-bottom: 2rem;
}

.usage-panel__head h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.usage-panel__head > span {
  font-size: .75rem;
  color: var(--faint);
}

.usage-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.usage-steps li {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  min-width: 0;
}

.usage-step__num {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font: .6875rem var(--mono);
}

.usage-steps li > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.usage-step__title {
  display: block;
  padding-block: .125rem;
  font-size: .9375rem;
  font-weight: 500;
}

.usage-steps p {
  margin-top: .5rem;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.85;
}

.usage-note {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.85;
}

.usage-note__label {
  flex: 0 0 auto;
  color: var(--ink);
  font-weight: 500;
}

.usage-panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.usage-steps--compact {
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.usage-steps--compact .usage-step__num {
  flex-basis: 24px;
  height: 24px;
  font-size: .625rem;
}

.usage-steps--compact .usage-step__title {
  padding: 0;
  font-size: .8125rem;
}

.usage-steps--compact p {
  font-size: .8125rem;
  margin-top: .25rem;
}

/* Game details: readable prose, no images or simulated assistant UI */
.game-page {
  animation: view-in 240ms var(--ease);
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.game-head {
  padding: calc(var(--header-h) + 2rem) 0 3rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: .8125rem;
}

.back-link:hover {
  color: var(--brand);
}

.back-link svg {
  width: 18px;
  height: 18px;
}

.game-head__grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.15fr);
  gap: 5rem;
}

.game-head__title {
  margin-top: 1rem;
  font-size: clamp(2.25rem,4.2vw,3.75rem);
  font-weight: 600;
  letter-spacing: -.035em;
}

.game-head__en {
  color: var(--faint);
  font: .6875rem/1.8 var(--mono);
  letter-spacing: .035em;
  margin-top: .75rem;
}

.game-head__tagline {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 1.75rem;
}

.game-head__desc {
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.95;
  max-width: 65ch;
}

.game-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin: 1.5rem 0;
  padding-block: 1rem;
  border-block: 1px solid var(--line);
}

.game-head__meta dt {
  color: var(--faint);
  font-size: .6875rem;
}

.game-head__meta dd {
  margin: .375rem 0 0;
  font-size: .8125rem;
}

.game-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
}

.game-body {
  padding-block: 3rem 4rem;
}

.game-body__grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) 20rem;
  gap: 3rem;
  align-items: start;
}

.game-features {
  scroll-margin-top: calc(var(--header-h) + 2rem);
}

.game-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.game-section-head h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.game-section-head>span {
  color: var(--faint);
  font: .6875rem var(--mono);
}

.feature-items {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .75rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: .875rem;
  min-height: 64px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature-item__num {
  color: var(--faint);
  font: .6875rem var(--mono);
}

.feature-item__name {
  flex: 1;
  min-width: 0;
  font-size: .875rem;
}

.feature-item__check {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--accent-strong,var(--brand));
}

.game-features__note {
  margin-top: 1.25rem;
  padding-left: .875rem;
  border-left: 2px solid var(--line-strong);
  color: var(--muted);
  font-size: .8125rem;
}

.game-side {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.game-side__block+.game-side__block {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.game-side__label {
  font-size: .75rem;
  font-weight: 600;
}

.game-side p {
  margin-top: .625rem;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.9;
}

.game-side>.btn {
  width: 100%;
  margin-top: 1.5rem;
  font-size: .8125rem;
  padding-inline: 1rem;
}

.game-next {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-block: 1.5rem;
}

.game-next__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.game-next__label {
  color: var(--faint);
  font: .6875rem var(--mono);
}

.game-next__link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .25rem 2rem;
  padding-block: .5rem;
}

.game-next__name {
  font-size: 1.25rem;
  font-weight: 500;
}

.game-next__en {
  grid-column: 1;
  color: var(--muted);
  font: .6875rem/1.75 var(--mono);
}

.game-next__link svg {
  grid-column: 2;
  grid-row: 1/3;
  align-self: center;
  width: 24px;
  height: 24px;
  color: var(--brand);
}

.game-next__link:hover .game-next__name {
  color: var(--brand);
}

/* Footer and non-blocking feedback */
.site-footer {
  padding: 3.5rem 0 1.5rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-author {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: .875rem;
}

.footer-author strong {
  color: var(--ink);
  font-weight: 500;
}

.footer-author img {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem .625rem;
  margin-top: 1rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font: .6875rem/1.75 var(--mono);
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-col h3 {
  margin-bottom: 1rem;
  font-size: .8125rem;
  font-weight: 600;
}

.footer-col a,.footer-col>span,.footer-download {
  display: block;
  padding: .375rem 0;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.75;
  text-align: left;
}

.footer-col a:hover,.footer-download:hover {
  color: var(--brand);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.footer-bottom>p {
  max-width: 72em;
  color: var(--faint);
  font-size: .75rem;
  line-height: 1.85;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0;
  color: var(--muted);
  font-size: .75rem;
}

.build-credit {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  margin-left: auto;
  color: var(--faint);
  font: .625rem/1.8 var(--mono);
  letter-spacing: .08em;
}

.build-credit strong {
  color: var(--ink);
  font-weight: 500;
}

#footerClock {
  color: var(--faint);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.to-top {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
}

.to-top svg {
  width: 16px;
  height: 16px;
}

.toast {
  position: fixed;
  bottom: max(1.5rem,env(safe-area-inset-bottom));
  left: 50%;
  z-index: 80;
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: .875rem 1.25rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--shadow);
  font-size: .875rem;
  opacity: 0;
  transform: translate(-50%,8px);
  pointer-events: none;
  transition: opacity var(--duration),transform var(--duration);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%,0);
}

.noscript {
  padding: 1.5rem;
  text-align: center;
}

/* Native download dialog */
.download-dialog {
  width: min(52rem,calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 3rem);
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-dialog);
  overflow: auto;
  overscroll-behavior: contain;
}

.download-dialog::backdrop {
  background: rgb(15 23 42 / 55%);
}

.download-dialog[open] {
  animation: dialog-in 180ms var(--ease);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.dlg {
  display: grid;
  grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr);
}

.dlg-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  padding: 2rem;
  background: var(--bg);
  border-right: 1px solid var(--line);
}

.dlg-eyebrow {
  color: var(--brand);
  font-size: .6875rem;
}

.dlg-title {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.4;
  margin-top: 1.25rem;
}

.dlg-title em {
  color: var(--brand);
}

.dlg-lede {
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.85;
  margin-top: 1rem;
}

.dlg-intro__foot {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font: .625rem/1.75 var(--mono);
}

.dlg-intro__foot b {
  font-weight: 400;
}

.dlg-body {
  min-width: 0;
  padding: 2rem;
}

.dlg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-right: 2.5rem;
  min-height: 24px;
}

.dlg-top__label {
  font-size: .8125rem;
  font-weight: 500;
}

.dlg-top__count {
  font: .75rem var(--mono);
  color: var(--faint);
}

.download-choice-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1.25rem;
}

.download-choice {
  display: grid;
  grid-template-columns: 56px minmax(0,1fr) 16px;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: background var(--duration),border-color var(--duration);
}

.download-choice:hover {
  background: var(--bg);
  border-color: var(--line-strong);
}

.download-choice[aria-checked="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 1px var(--brand);
}

.dlg-choice__thumb {
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface-soft);
}

.dlg-choice__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dlg-choice__body {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  min-width: 0;
}

.dlg-choice__head {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.dlg-choice__num {
  color: var(--muted);
  font: .625rem var(--mono);
}

.dlg-choice__head strong {
  font-size: 1rem;
  font-weight: 500;
}

.dlg-choice__body small {
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.6;
}

.dlg-choice__dot {
  width: 16px;
  height: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
}

.download-choice[aria-checked="true"] .dlg-choice__dot {
  border: 5px solid var(--brand);
}

.dlg-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.dlg-details>div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem 1rem;
}

.dlg-details span {
  color: var(--muted);
  font-size: .75rem;
}

.dlg-details strong {
  font-size: .75rem;
  font-weight: 500;
}

.dlg-actions {
  margin-top: 1.5rem;
}

.dlg-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 48px;
  padding: .875rem 1rem;
  background: var(--brand);
  border-radius: var(--radius);
  color: var(--on-brand);
  font-size: .875rem;
  font-weight: 500;
  transition: background var(--duration);
}

.dlg-cta:hover {
  background: var(--brand-dark);
}

.dlg-cta svg {
  width: 20px;
  height: 20px;
}

.dlg-status {
  min-height: 1.5em;
  margin-top: .625rem;
  color: var(--muted);
  font-size: .75rem;
}

.dlg-note {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.dlg-note code {
  font: .75rem var(--mono);
  background: var(--surface-soft);
  border-radius: 3px;
  padding: .1rem .2rem;
}

/* Responsive layout: same content and actions at every size */
@media(max-width:1060px) {
  .header-status {
    display: none;
  }
  .footer-top {
    gap: 2rem;
    grid-template-columns: 1.6fr 1fr 1fr;
  }
  .spec__row {
    flex-direction: column;
    gap: .25rem;
    align-items: start;
  }
  .game-head__grid {
    gap: 3rem;
  }
  .game-body__grid {
    grid-template-columns: minmax(0,1fr) 18rem;
    gap: 1.5rem;
  }
}

@media(max-width:860px) {
  :root {
    --header-h: 4.5rem;
  }
  .site-nav {
    display: none;
  }
  .menu-toggle {
    display: grid;
  }
  .header-inner,.header-actions {
    gap: .75rem;
  }
  .home-hero {
    padding-top: calc(var(--header-h) + 3rem);
  }
  .home-hero__grid {
    gap: 2rem;
  }
  .home-hero__aside {
    padding: 1.25rem;
  }
  .hero-game {
    padding: .5rem 0;
    gap: .75rem;
  }
  .hero-game img {
    width: 50px;
    height: 48px;
  }
  .collection-head>span {
    display: none;
  }
  .home-hero__foot {
    margin-top: 3rem;
  }
  .home-section__head {
    gap: 1.5rem;
  }
  .home-section__lede {
    max-width: 24em;
  }
  .game-head__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .game-head__desc {
    max-width: 70ch;
  }
  .game-body__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .game-side>.btn {
    width: auto;
  }
  .steps-list {
    gap: 1rem;
  }
  .step {
    padding: 1.25rem;
  }
  .notes-row {
    gap: 1.5rem;
  }
}

@media(max-width:700px) {
  .download-dialog {
    width: calc(100% - 1.5rem);
    max-height: calc(100dvh - 1.5rem);
  }
  .dlg {
    grid-template-columns: 1fr;
  }
  .dlg-intro {
    padding: 1.5rem;
    padding-right: 4rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 0;
  }
  .dlg-title {
    font-size: 1.5rem;
    margin-top: .625rem;
  }
  .dlg-title br {
    display: none;
  }
  .dlg-lede {
    margin-top: .75rem;
    font-size: .875rem;
  }
  .dlg-intro__foot {
    display: none;
  }
  .dlg-body {
    padding: 1.5rem;
  }
  .dlg-top {
    padding-right: 0;
  }
  .dlg-choice__num {
    display: none;
  }
  .dlg-choice__thumb {
    width: 48px;
    height: 48px;
  }
  .download-choice {
    grid-template-columns: 48px minmax(0,1fr) 16px;
  }
}

@media(max-width:600px) {
  .brand__name {
    font-size: 1rem;
  }
  .brand__en {
    font-size: .5625rem;
  }
  .header-cta svg {
    display: none;
  }
  .home-hero__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .home-hero__title {
    font-size: 2.875rem;
  }
  .home-hero__lede {
    font-size: 1rem;
  }
  .collection-head>span {
    display: inline;
  }
  .hero-game {
    padding-inline: .5rem;
  }
  .hero-game img {
    width: 56px;
    height: 48px;
  }
  .home-hero__foot {
    margin-top: 2rem;
    gap: 1rem;
  }
  .spec {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .home-hero__scroll {
    display: none;
  }
  .home-games,.home-notes {
    padding-block: 3rem;
  }
  .home-section__head {
    flex-direction: column;
    align-items: start;
    gap: 1rem;
  }
  .home-section__lede {
    max-width: none;
    font-size: 1rem;
  }
  .game-card__head {
    align-items: start;
    flex-direction: column;
    gap: .25rem;
  }
  .game-card__body {
    padding: 1.25rem;
  }
  .steps-list,.notes-row {
    grid-template-columns: 1fr;
  }
  .step {
    padding: 1.25rem 1.25rem 1.25rem 4.75rem;
  }
  .step__num {
    position: absolute;
    left: 1.25rem;
    top: 1.25rem;
    margin: 0;
  }
  .step p {
    font-size: 1rem;
  }
  .notes-cta {
    align-items: start;
    flex-direction: column;
    padding: 1.5rem;
  }
  .game-head {
    padding-top: calc(var(--header-h) + 1rem);
    padding-bottom: 2rem;
  }
  .back-link {
    margin-bottom: 1.5rem;
  }
  .game-head__desc {
    font-size: 1rem;
  }
  .game-body {
    padding-block: 2rem;
  }
  .feature-items {
    grid-template-columns: 1fr;
  }
  .feature-item__name,.game-side p {
    font-size: 1rem;
  }
  .game-next__inner {
    align-items: start;
    flex-direction: column;
    gap: .75rem;
  }
  .game-next__link {
    width: 100%;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand {
    grid-column: 1/-1;
  }
  .footer-meta {
    gap: .5rem 1rem;
  }
  .build-credit {
    margin-left: 0;
  }
  .to-top {
    margin-left: auto;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
  *,*::before,*::after {
    animation: none!important;
    transition: none!important;
  }
}

@media (max-width: 860px) {
  .usage-steps:not(.usage-steps--compact) {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .usage-panel { padding: 1.25rem; }
  .usage-panel__head { margin-bottom: 1.5rem; }
  .usage-tabs button { padding-inline: 1rem; }
  .usage-note { flex-direction: column; gap: .375rem; padding: 1rem; }
  .usage-steps p { font-size: 1rem; }
  .usage-steps--compact p { font-size: .875rem; }
  .usage-panel__foot { gap: .75rem; }
}

/* Concise runtime spec: OS name plus a subordinate architecture tag. */
.dlg-details .platform-spec {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.dlg-details .platform-spec > span {
  color: var(--ink);
}

.dlg-details .platform-spec__arch {
  padding: .125rem .5rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: .6875rem;
  font-weight: 400;
  line-height: 1.5;
}

.game-side .game-community__number {
  color: var(--ink);
  font: 400 1.25rem/1.6 var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  user-select: all;
}

/* Download availability: explicit text, native disabled controls, existing tokens. */
.game-card__tags .availability {
  color: var(--muted);
  background: var(--surface-soft);
}
.game-card__tags .availability--open {
  color: var(--brand-dark);
  background: var(--brand-soft);
}
.game-release-note {
  margin: 1.5rem 0 1.25rem;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.8;
}
.btn:disabled, .download-choice:disabled, .dlg-cta[aria-disabled="true"] {
  color: var(--muted);
  background: var(--surface-soft);
  border-color: var(--line);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.download-choice:disabled .dlg-choice__thumb { opacity: .55; }
.dlg-cta { text-decoration: none; }

/* Official GitHub mark alongside the Releases download label. */
.dlg-cta__label {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
}
.dlg-cta .github-mark {
  flex: none;
  fill: currentColor;
}

/* Seer activation key: local data, clear selection, accessible copy feedback. */
.assistant-key {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--brand-soft);
}
.assistant-key__head, .assistant-key__row, .assistant-key__copy {
  display: flex;
  align-items: center;
}
.assistant-key__head { gap: .5rem; }
.assistant-key__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--brand);
  background: var(--surface);
}
.assistant-key__icon svg { width: 18px; height: 18px; }
.assistant-key__title { margin: 0; font-size: .875rem; font-weight: 600; }
.assistant-key__row { justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.assistant-key__value {
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--mono);
  letter-spacing: .025em;
  overflow-wrap: anywhere;
  user-select: all;
}
.assistant-key__copy {
  gap: .375rem;
  min-height: 44px;
  padding: .5rem .75rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--brand);
  font-size: .8125rem;
}
.assistant-key__copy:hover { border-color: var(--brand); }
.assistant-key__copy:disabled { cursor: wait; }
.assistant-key__copy svg { width: 16px; height: 16px; flex: none; }
.assistant-key__status { margin-top: .5rem; color: var(--muted); font-size: .75rem; line-height: 1.7; }
