:root {
  color-scheme: dark;
  --bg: #131321;
  --panel: #1d1c32;
  --line: #38354d;
  --ink: #fff1e5;
  --muted: #c2b9ce;
  --accent: #f6bd82;
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(ellipse at 50% 0%, #211c34 0%, var(--bg) 62%);
}
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.shell { width: min(1160px, calc(100% - 80px)); margin-inline: auto; }
.skip { position: fixed; z-index: 3; top: .75rem; left: .75rem; padding: .5rem 1rem; background: var(--bg); transform: translateY(-200%); }
.skip:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-inner { min-height: 76px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; font-weight: 720; letter-spacing: -.035em; line-height: 1.1; }
.brand small { display: block; margin-top: .3rem; color: var(--accent); font-size: .58rem; letter-spacing: .19em; }
nav { display: flex; align-items: center; gap: clamp(1.1rem, 3vw, 2rem); }
nav a, .header-inner > a, .footer-inner a { text-decoration: none; }
nav a:hover, .header-inner > a:hover, .footer-inner a:hover { color: var(--accent); }
.home { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 6vw, 5.25rem); }
.intro { margin-bottom: clamp(2.75rem, 6vw, 4.8rem); }
.intro h1 { font-size: clamp(3.55rem, 9.7vw, 9rem); line-height: .9; letter-spacing: -.096em; font-weight: 830; }
.intro h1 span { color: var(--accent); }
.intro p { margin-top: 1.55rem; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.28rem); }
#games { scroll-margin-top: 1.25rem; }
.section-heading { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1rem; }
.section-heading h2 { font-size: 1.08rem; font-weight: 650; }
.section-heading span { height: 1px; background: var(--line); flex: 1; }
.game-card {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  overflow: hidden;
  isolation: isolate;
  position: relative;
  background: var(--panel);
  border: 1px solid #4e4666;
  border-radius: 24px;
}
.game-copy {
  z-index: 1;
  align-self: center;
  padding: clamp(2rem, 5vw, 4.25rem);
}
.game-copy .genre { color: var(--accent); font-size: .7rem; letter-spacing: .16em; font-weight: 700; }
.genre span { font-size: .58rem; margin-inline: .3rem; }
.game-copy h3 { margin-top: .7rem; font-size: clamp(2.7rem, 5.7vw, 5.25rem); line-height: .95; font-weight: 790; letter-spacing: -.077em; }
.game-copy h3 + p { max-width: 29ch; margin-top: 1rem; color: var(--muted); }
.play { display: inline-flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.7rem; padding: .75rem 1.2rem; border-radius: 8px; background: var(--accent); color: #241728; text-decoration: none; font-weight: 760; }
.play:hover { background: #ffcf9f; }
.play span { font-size: 1.15rem; line-height: 1; }
.device-note { margin-top: .85rem; color: var(--muted); font-size: .81rem; }
.device-note span { margin-inline: .25rem; }
.game-art { position: relative; min-height: 100%; }
.game-art img { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; object-position: center; }
.game-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--panel), transparent 27%); pointer-events: none; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .87rem; }
.footer-inner { min-height: 70px; }
.back span { color: var(--accent); padding-right: .3rem; }
.play-layout { display: grid; grid-template-columns: auto minmax(220px, 320px); justify-content: center; align-items: start; gap: clamp(1.5rem, 5vw, 4rem); padding-block: 1.5rem 2.5rem; }
.game-stage { height: min(840px, calc(100vh - 112px)); height: min(840px, calc(100dvh - 112px)); width: auto; aspect-ratio: 9 / 16; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #090f1c; }
.game-stage iframe { display: block; border: 0; width: 100%; height: 100%; }
.game-guide { padding-block: 1rem; color: var(--muted); }
.game-guide h1 { color: var(--ink); font-size: clamp(2.35rem, 4vw, 3.5rem); letter-spacing: -.07em; line-height: .97; margin-bottom: 1rem; }
.game-guide h2 { color: var(--ink); font-size: 1rem; margin-top: 1.55rem; }
.game-guide dl { margin-block: .6rem 1.25rem; }
.game-guide dt { color: var(--ink); font-weight: 640; }
.game-guide dd { margin: .25rem 0 .85rem; }
kbd { display: inline-block; min-width: 1.35em; padding: 0 .23em; background: var(--panel); border: 1px solid #524b67; border-radius: 4px; text-align: center; }
.guide-note { border-top: 1px solid var(--line); padding-top: .95rem; font-size: .9rem; }
.text-link { display: inline-block; margin-top: .75rem; color: var(--accent); text-underline-offset: .22em; }
.text-page { padding-block: clamp(2rem, 6vw, 5rem); max-width: 680px; }
.text-page h1 { font-size: clamp(2.65rem, 7vw, 4.5rem); letter-spacing: -.075em; line-height: 1; margin-bottom: 1.8rem; }
.text-page h2 { font-size: 1.22rem; margin-bottom: .55rem; }
.text-page p { color: var(--muted); margin-bottom: 1.5rem; }
.text-page a { color: var(--accent); text-underline-offset: .2em; }

@media (max-width: 720px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { min-height: 64px; }
  .game-copy { padding: 1.8rem; }
  .play-header .header-inner { min-height: 48px; font-size: .88rem; }
  .play-layout { display: flex; flex-direction: column; align-items: center; gap: 0; width: 100%; padding-top: 0; }
  .game-stage { height: auto; width: 100%; max-width: 450px; max-height: calc(100dvh - 49px); border: 0; border-radius: 0; }
  .game-guide { width: min(100% - 36px, 450px); padding-top: 1.6rem; }
}

@media (max-width: 520px) {
  .game-card { grid-template-columns: 1fr; border-radius: 18px; }
  .game-art { grid-row: 1; min-height: 0; aspect-ratio: 1.66; }
  .game-art::after { background: linear-gradient(0deg, var(--panel), transparent 26%); }
  .game-art img { object-position: center 48%; }
  .game-copy { padding-top: .7rem; }
  .game-copy h3 br { display: none; }
  .game-copy h3 { font-size: clamp(2.45rem, 10vw, 3.5rem); }
}
