:root {
  color-scheme: light dark;
  --sky-top: #0f5cb8; --sky-bottom: #2f9bf0;
  --ink: #22314f; --ink-soft: #5a6b8c; --paper: #ffffff; --card: #ffffff; --tint: #f4f9ff;
  --line: rgba(23,116,216,.10); --rule: #dbe5f3; --link: #1268d0;
  --shadow: 0 18px 45px rgba(23,116,216,.16);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e9effc; --ink-soft: #a9b8d8; --paper: #0b1322; --card: #121d36; --tint: #101b33;
    --line: rgba(255,255,255,.09); --rule: #26334f; --link: #7ab8ff;
    --shadow: 0 18px 45px rgba(0,0,0,.45); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --ink: #e9effc; --ink-soft: #a9b8d8; --paper: #0b1322; --card: #121d36; --tint: #101b33;
    --line: rgba(255,255,255,.09); --rule: #26334f; --link: #7ab8ff;
    --shadow: 0 18px 45px rgba(0,0,0,.45); color-scheme: dark;
  }
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font: 17px/1.6 "Nunito", system-ui, -apple-system, sans-serif;
  color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: "Baloo 2", "Nunito", system-ui, sans-serif; line-height: 1.2; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 728px; }
.muted { color: var(--ink-soft); font-size: 15px; }

/* ---------- header ---------- */
header.site {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(255,255,255,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.wordmark { display: flex; }
.wordmark img { display: block; height: 34px; width: auto; }
nav.site { display: flex; gap: 26px; align-items: center; }
nav.site a { color: var(--ink-soft); text-decoration: none; font-weight: 700; font-size: 15px; }
nav.site a:hover { color: var(--sky-top); }
nav.site a.nav-cta { background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 999px; font-size: 14px; }
nav.site a.nav-cta:hover { background: var(--sky-top); }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 14px; font-weight: 600; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; padding-top: 34px; padding-bottom: 44px; }
footer.site .foot-left { display: flex; flex-direction: column; gap: 6px; }
footer.site nav { display: flex; gap: 22px; }
footer.site a { color: var(--ink-soft); text-decoration: none; }
footer.site a:hover { color: var(--sky-top); }

/* ---------- inner pages (support, privacy, 404) ---------- */
main.wrap { padding-top: 56px; padding-bottom: 80px; }
main.wrap h1 { font-size: clamp(34px, 5vw, 44px); font-weight: 800; margin: 0 0 8px; }
main.wrap h2 { font-size: 26px; font-weight: 700; margin: 40px 0 8px; }
main.wrap p, main.wrap li { margin: 10px 0; }
main.wrap ul { padding-left: 1.3em; }
table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0; }
th, td { text-align: left; vertical-align: top; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 700; }
/* CJK breaks between any two characters, so keep the short data names on one or two lines */
:lang(ja) td:first-child, :lang(zh) td:first-child { min-width: 6.5em; }
:lang(ja) td:last-child, :lang(zh) td:last-child { min-width: 5em; }
.contact-box {
  background: var(--tint); border: 1px solid var(--line); border-radius: 22px; padding: 24px 28px; margin: 24px 0;
}
.contact-box a.email { font-size: 22px; font-weight: 700; }

/* ---------- home: hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; text-align: center; padding: 96px 24px 130px;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 82%, #5cb3f7 100%);
}
.hero-inner { position: relative; z-index: 2; max-width: 780px; margin: 0 auto; }
.hero-kicker {
  display: inline-block; background: rgba(0,20,50,.22); border: 1px solid rgba(255,255,255,.35);
  padding: 8px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; letter-spacing: .4px; margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(42px, 7vw, 74px); font-weight: 800; line-height: 1.12; margin-bottom: 18px;
  text-shadow: 0 2px 16px rgba(0,25,60,.5), 0 4px 4px rgba(0,25,60,.25);
}
.hero h1 .rainbow {
  background: linear-gradient(90deg, #fff3b0, #ffd6a5, #ffc6d9, #e3c6ff, #bde9ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* text-shadow would show through the transparent letters, so shadow the box instead */
  text-shadow: none; filter: drop-shadow(0 2px 6px rgba(0,25,60,.45));
}
.hero .tagline { font-size: clamp(18px, 2.6vw, 24px); font-weight: 600; margin-bottom: 36px; text-shadow: 0 2px 10px rgba(0,25,60,.45); }
.hero-ctas { display: flex; gap: 18px; justify-content: center; align-items: center; flex-wrap: wrap; }
.store-badge { display: block; height: 52px; width: auto; transition: transform .18s ease; filter: drop-shadow(0 8px 18px rgba(0,20,50,.35)); }
a:hover .store-badge { transform: translateY(-2px) scale(1.03); }
.ghost-btn {
  color: #fff; text-decoration: none; font-weight: 800; font-size: 17px;
  border: 2px solid rgba(255,255,255,.7); border-radius: 999px; padding: 13px 30px;
  transition: background .18s ease; text-shadow: 0 1px 8px rgba(0,25,60,.4);
}
.ghost-btn:hover { background: rgba(255,255,255,.16); }

.cloud { position: absolute; z-index: 1; opacity: .95; animation: drift 9s ease-in-out infinite; }
.cloud.c1 { top: 10%; left: 6%; width: 130px; }
.cloud.c2 { top: 20%; right: 8%; width: 170px; animation-delay: -3s; }
.cloud.c3 { top: 56%; left: 11%; width: 100px; animation-delay: -6s; opacity: .8; }
.cloud.c4 { top: 62%; right: 13%; width: 120px; animation-delay: -1.5s; opacity: .85; }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 2; display: block; width: 100%; height: 90px; fill: var(--paper); }

/* ---------- home: sections ---------- */
.section { max-width: 1080px; margin: 0 auto; padding: 84px 24px; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; margin-bottom: 10px; }
.section-head p { color: var(--ink-soft); font-size: 18px; font-weight: 600; }

.game-card {
  background: var(--card); border-radius: 28px; box-shadow: var(--shadow); border: 1px solid var(--line);
  padding: 48px; display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: center;
}
.game-video { display: block; width: 260px; height: auto; border-radius: 30px; box-shadow: var(--shadow); background: var(--tint); }
.game-card h3 { font-size: 38px; font-weight: 800; margin-bottom: 6px; }
.game-meta { color: var(--ink-soft); font-weight: 700; font-size: 15px; margin-bottom: 16px; }
.game-card .desc { line-height: 1.65; margin-bottom: 26px; max-width: 56ch; }
.game-card a { display: inline-block; }
.game-card .store-badge { height: 48px; filter: drop-shadow(0 6px 14px rgba(0,20,50,.25)); }

.shots { display: flex; gap: 22px; overflow-x: auto; padding: 10px 4px 26px; margin-top: 44px; scroll-snap-type: x mandatory; }
.shots::-webkit-scrollbar { height: 8px; }
.shots::-webkit-scrollbar-thumb { background: #c9dcf5; border-radius: 99px; }
.shot {
  flex: 0 0 auto; scroll-snap-align: center; height: 440px; width: auto; max-width: none;
  border-radius: 26px; box-shadow: var(--shadow); border: 1px solid var(--line);
  background: var(--tint); transition: transform .2s ease;
}
.shot:hover { transform: translateY(-6px); }
.shots-hint { text-align: center; color: var(--ink-soft); font-size: 14px; font-weight: 600; margin-top: 6px; }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 64px; }
.trio-card { background: var(--tint); border-radius: 22px; padding: 32px 28px; text-align: center; border: 1px solid var(--line); }
.trio-card .emoji { font-size: 40px; display: block; margin-bottom: 14px; }
.trio-card h3 { font-size: 20px; margin-bottom: 8px; }
.trio-card p { color: var(--ink-soft); font-size: 15px; line-height: 1.6; font-weight: 600; }

.studio {
  background: linear-gradient(180deg, var(--tint), #e8f3fe); border-top: 1px solid var(--line);
  text-align: center; padding: 72px 24px;
}
.studio h2 { font-size: clamp(26px, 3.6vw, 36px); margin: 18px 0 12px; }
.studio p { color: var(--ink-soft); font-weight: 600; max-width: 52ch; margin: 0 auto; }

@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  nav.site { gap: 18px; }
  nav.site .nav-hide-mobile { display: none; }
  main.wrap { padding-top: 40px; }
  .hero { padding: 72px 16px 110px; }
  .cloud.c1 { width: 64px; top: 14px; left: 4%; }
  .cloud.c2 { width: 80px; top: 22px; right: 4%; }
  .cloud.c3, .cloud.c4 { display: none; }
  .store-badge { height: 46px; }
  .section { padding: 64px 16px; }
  .game-card { grid-template-columns: 1fr; text-align: center; padding: 36px 24px; gap: 26px; }
  .game-video { width: 220px; margin: 0 auto; }
  .game-card .desc { margin-left: auto; margin-right: auto; }
  .trio { grid-template-columns: 1fr; }
  .shot { height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cloud { animation: none; }
  .shot, .store-badge, a:hover .store-badge { transition: none; transform: none; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) header.site { background: rgba(11,19,34,.88); }
  :root:not([data-theme="light"]) nav.site a.nav-cta { background: #e9effc; color: #0b1322; }
  :root:not([data-theme="light"]) nav.site a.nav-cta:hover { background: #fff; }
  :root:not([data-theme="light"]) .studio { background: linear-gradient(180deg, #0e1730, #0b1322); }
  :root:not([data-theme="light"]) .shots::-webkit-scrollbar-thumb { background: #2a3a5f; }
}
:root[data-theme="dark"] header.site { background: rgba(11,19,34,.88); }
:root[data-theme="dark"] nav.site a.nav-cta { background: #e9effc; color: #0b1322; }
:root[data-theme="dark"] nav.site a.nav-cta:hover { background: #fff; }
:root[data-theme="dark"] .studio { background: linear-gradient(180deg, #0e1730, #0b1322); }
:root[data-theme="dark"] .shots::-webkit-scrollbar-thumb { background: #2a3a5f; }
