:root {
  --bg: #000;
  --surface: #090a0d;
  --surface-strong: #101216;
  --text: #f5f7fa;
  --muted: #a6abb5;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --header-height: 76px;
  --page-gutter: clamp(20px, 4vw, 64px);
  --content-width: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP",
    "Noto Sans SC", "Noto Sans TC", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

button {
  color: inherit;
}

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

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #fff;
  color: #000;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.section-shell {
  width: min(100%, var(--content-width));
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  position: relative;
  width: min(100%, var(--content-width));
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
  line-height: 1.2;
}

.brand span {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav > a,
.menu-button {
  min-height: 44px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #dfe2e8;
  text-decoration: none;
  cursor: pointer;
}

.site-nav > a:hover,
.menu-button:hover,
.menu-button[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.menu-group {
  position: relative;
}

.chevron {
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 180ms ease;
}

.menu-button[aria-expanded="true"] .chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: max-content;
  min-width: 220px;
  padding: 8px;
  display: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(12, 13, 17, 0.98);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.menu-group.is-open .dropdown {
  display: grid;
}

.dropdown a,
.dropdown button {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #d8dbe2;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.dropdown a:hover,
.dropdown button:hover,
.dropdown button[aria-current="true"] {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.dropdown button[aria-current="true"]::after {
  content: "✓";
  float: right;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.mobile-header-actions {
  display: none;
  align-items: center;
  gap: 6px;
}

.mobile-language-group .language-button {
  max-width: 124px;
  padding-inline: 12px;
  color: #dfe2e8;
}

.mobile-language-group .dropdown {
  right: 0;
}

.nav-toggle span[aria-hidden="true"] {
  width: 100%;
  height: 1px;
  display: block;
  background: #fff;
}

.nav-toggle span[aria-hidden="true"] + span {
  margin-top: 7px;
}

.hero,
.game-tabs,
.game-section {
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.hero {
  position: relative;
  padding: clamp(36px, 4.2vw, 60px) var(--page-gutter) clamp(44px, 5vw, 72px);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(76vw, 980px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(53, 89, 132, 0.18), transparent 68%);
  filter: blur(8px);
}

.hero-grid {
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, #000 30%, transparent 88%);
}

.hero-content {
  width: min(100%, 1060px);
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: #8e96a5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-size: clamp(46px, 6vw, 84px);
  font-weight: 680;
  letter-spacing: -0.065em;
  line-height: 0.9;
}

.hero h1 small {
  margin-top: 10px;
  color: #d7d9df;
  font-size: clamp(15px, 1.6vw, 22px);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.tagline {
  margin: 20px 0 0;
  font-size: clamp(21px, 2.6vw, 34px);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.hero-copy {
  max-width: 650px;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 18px);
}

.game-tabs {
  width: min(100%, 1018px);
  margin: clamp(28px, 3.4vw, 48px) auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 500px));
  justify-content: center;
  gap: 18px;
}

.game-tab {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: auto;
  aspect-ratio: 1;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 11%, transparent), transparent 52%),
    var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.game-tab:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, white 5%);
  transform: translateY(-4px);
}

.game-tab img {
  width: 180px;
  height: 180px;
  border-radius: 25%;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
}

.game-tab h3 {
  max-width: 380px;
  margin: 5px 0 12px;
  font-size: 30px;
  letter-spacing: 0.07em;
  line-height: 1.08;
}

.game-name-suffix {
  display: block;
  margin-top: 0.5em;
  font-size: 0.5em;
  font-weight: inherit;
}

.game-tab p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
}

.game-tab .tab-japanese {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.tab-index {
  position: absolute;
  top: 34px;
  right: 34px;
  color: #7b818d;
  font-size: 12px;
  letter-spacing: 0.15em;
}

.tab-arrow {
  position: absolute;
  right: 34px;
  bottom: 30px;
  color: var(--accent);
  font-size: 28px;
}

.tab-dodon,
.game-dodon {
  --accent: #6c91d9;
}

.tab-candy,
.game-candy {
  --accent: #d67aa8;
}

.tab-neji,
.game-neji {
  --accent: #6c9db2;
}

.tab-sengoku,
.game-sengoku {
  --accent: #c18d4e;
}

.game-section {
  --game-media-height: clamp(360px, 38vw, 560px);
  position: relative;
  border-top: 1px solid var(--line);
  background: #020203;
  background:
    radial-gradient(circle at 75% 30%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 34%),
    #020203;
}

.game-section-inner {
  min-height: 1000px;
  padding-top: clamp(100px, 12vw, 170px);
  padding-bottom: clamp(100px, 12vw, 170px);
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(520px, 1.18fr);
  align-items: center;
  gap: clamp(50px, 8vw, 130px);
}

.game-section:nth-of-type(even) .game-copy {
  order: 2;
}

.game-section:nth-of-type(even) .game-visual {
  order: 1;
}

.game-copy {
  position: relative;
  z-index: 2;
  align-self: center;
}

.game-icon-link,
.game-icon-static {
  width: 104px;
  height: 104px;
  margin-bottom: 34px;
  display: block;
  border-radius: 25%;
}

.game-icon-link {
  transition: transform 180ms ease;
}

.game-icon-link:hover {
  transform: translateY(-3px);
}

.game-icon-link img,
.game-icon-static img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.game-number {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.game-copy h2 {
  max-width: 660px;
  margin: 0;
  font-size: clamp(42px, 5.3vw, 76px);
  letter-spacing: 0.07em;
  line-height: 1;
}

.game-lead {
  max-width: 620px;
  margin: 28px 0 0;
  color: #e0e3e9;
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.45;
}

.game-copy > p:not(.game-number):not(.game-lead) {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.download-button {
  width: fit-content;
  min-height: 52px;
  margin-top: 34px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--line-strong);
  border: 1px solid color-mix(in srgb, var(--accent) 52%, white 8%);
  border-radius: 14px;
  background: #171b24;
  background: color-mix(in srgb, var(--accent) 20%, #101114);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease;
}

.download-button:not(:disabled):hover {
  background: color-mix(in srgb, var(--accent) 30%, #111218);
  transform: translateY(-2px);
}

.download-button.coming-soon {
  border-color: var(--line);
  background: #17181b;
  color: #848994;
  cursor: not-allowed;
}

.game-visual {
  position: relative;
  min-width: 0;
  height: var(--game-media-height);
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(300px, 1.4fr);
  align-items: stretch;
  gap: clamp(18px, 3vw, 36px);
}

.character {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 30px 55px rgba(0, 0, 0, 0.5));
}

.character-small {
  width: min(100%, 354px);
  justify-self: center;
}

.screenshots {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 16px;
}

.screenshots img {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.42);
}

.image-error {
  opacity: 0.3;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #050506;
}

.site-footer .section-shell {
  min-height: 220px;
  padding-top: 56px;
  padding-bottom: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer span,
.site-footer p {
  color: var(--muted);
  font-size: 13px;
}

.site-footer p {
  margin: 0;
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms ease, transform 560ms ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) and (min-width: 801px) {
  .menu-group:hover .dropdown {
    display: grid;
  }
}

@media (max-width: 1050px) {
  .game-section {
    --game-media-height: clamp(360px, 52vw, 520px);
  }

  .game-section-inner {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .game-section:nth-of-type(even) .game-copy,
  .game-section:nth-of-type(even) .game-visual {
    order: initial;
  }

  .game-copy {
    max-width: 720px;
  }

  .game-visual {
    width: 100%;
    max-width: 820px;
  }
}

@media (max-width: 800px) {
  :root {
    --header-height: 66px;
  }

  .brand small {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .mobile-header-actions {
    margin-left: auto;
    display: flex;
  }

  .desktop-language-group {
    display: none;
  }

  .site-nav {
    padding: 12px;
    display: grid;
    gap: 4px;
    position: absolute;
    top: calc(100% + 8px);
    left: var(--page-gutter);
    right: var(--page-gutter);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(10, 11, 14, 0.98);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  }

  .js .site-nav {
    display: none;
  }

  .js .site-nav.is-open {
    display: grid;
  }

  .site-nav > a,
  .menu-button {
    width: 100%;
    justify-content: space-between;
  }

  .dropdown {
    position: static;
    width: 100%;
    margin-top: 2px;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .game-tab img {
    width: min(256px, 100%);
    height: auto;
    aspect-ratio: 1;
  }

  .game-tab h3 {
    font-size: clamp(23px, 7vw, 30px);
  }

  .game-visual {
    grid-template-columns: minmax(160px, 0.8fr) minmax(0, 1.2fr);
  }

  .character {
    width: 100%;
    height: 100%;
    justify-self: center;
  }

  .screenshots {
    width: 100%;
    max-width: 620px;
    margin-inline: auto;
  }

  .site-footer .section-shell {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .game-tabs {
    width: min(100%, 500px);
    grid-template-columns: minmax(0, 1fr);
  }

  .game-tab {
    max-width: 500px;
    padding: 28px;
  }
}

@media (max-width: 520px) {
  .game-section {
    --game-media-height: clamp(300px, 105vw, 420px);
  }

  .hero {
    padding-top: 36px;
    padding-bottom: 48px;
  }

  .hero h1 {
    font-size: clamp(40px, 13vw, 56px);
  }

  .tagline {
    margin-top: 20px;
  }

  .game-tabs {
    margin-top: 28px;
  }

  .game-section-inner {
    padding-top: 94px;
    padding-bottom: 100px;
    gap: 54px;
  }

  .game-visual {
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .character,
  .screenshots {
    height: var(--game-media-height);
  }

  .game-copy h2 {
    font-size: clamp(40px, 13vw, 58px);
  }

  .download-button {
    width: 100%;
    min-height: 52px;
  }

  .screenshots {
    gap: 10px;
  }

  .screenshots img {
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
