/* Shared studio and product pages. Layout stays independent of the game count. */
:root {
  color-scheme: light;
  --ink: #102d4f;
  --text: #3b5067;
  --muted: #62748a;
  --blue: #086bd5;
  --blue-dark: #0754ad;
  --sky: #eef7ff;
  --line: #dce9f4;
  --yellow: #ffcf45;
  --radius: 24px;
  --shadow: 0 14px 38px rgb(25 87 147 / 8%);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); background: #fff; font-size: 1rem; line-height: 1.8; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--blue); text-decoration: none; text-underline-offset: .22em; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { color: var(--ink); line-height: 1.35; overflow-wrap: anywhere; }
h1, h2, h3, strong { font-weight: 750; }
a:focus-visible, button:focus-visible { outline: 3px solid #003f97; outline-offset: 5px; }
::selection { background: #c8e8ff; color: #102d4f; }
.container { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 100; padding: 9px 18px; color: white; background: var(--ink); border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); flex-shrink: 0; }
.brand-mark { width: 44px; height: 44px; object-fit: contain; }
.brand-name { font-size: 1.3125rem; font-weight: 800; letter-spacing: .01em; }
.site-nav { display: flex; align-items: center; gap: 36px; }
.site-nav a { position: relative; padding: 12px 0; color: var(--ink); font-size: 1rem; font-weight: 650; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--blue); }
.site-nav a[aria-current]::after { content: ""; position: absolute; bottom: 3px; left: 0; width: 22px; height: 3px; background: var(--blue); border-radius: 2px; }
.nav-toggle { display: none; width: 46px; height: 46px; padding: 11px; background: var(--sky); border: 1px solid var(--line); border-radius: 12px; }
.nav-toggle span { display: block; height: 2px; width: 22px; margin-block: 4px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 27px; border: 1.5px solid transparent; border-radius: 100px; font-weight: 700; line-height: 1.5; text-align: center; transition: color .2s, background .2s, border-color .2s, transform .2s; }
.button-primary { color: #fff; background: var(--blue); }
.button-primary:hover { color: #fff; background: var(--blue-dark); transform: translateY(-2px); }
.button-secondary { color: var(--blue); background: #fff; border-color: #8cbfeb; }
.button-secondary:hover { color: var(--blue-dark); background: #edf6ff; border-color: var(--blue); }
.button-quiet { color: var(--blue); background: transparent; padding-inline: 16px; }
.button-quiet:hover { background: var(--sky); }
.button svg { flex-shrink: 0; width: 20px; height: 20px; }
.eyebrow { color: var(--blue); font-size: 0.875rem; font-weight: 750; letter-spacing: .08em; line-height: 1.6; }

.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff 55%, #f4faff); border-bottom: 1px solid #e8f2fa; }
.hero-grid { min-height: 572px; display: grid; grid-template-columns: .93fr 1.15fr; align-items: center; gap: 52px; padding-block: 65px 68px; }
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.hero-copy .eyebrow { margin-bottom: 20px; }
.hero h1 { margin-bottom: 24px; font-size: clamp(2.25rem, 3.45vw, 3.125rem); font-weight: 850; line-height: 1.45; letter-spacing: -.035em; }
.accent-text { position: relative; white-space: nowrap; isolation: isolate; }
.accent-text::after { content: ""; position: absolute; left: 0; bottom: .02em; width: 100%; height: .13em; z-index: -1; background: var(--yellow); border-radius: 100% 25% 80% 20%; transform: rotate(-2deg); }
.hero-intro { max-width: 32em; font-size: 1.0625rem; line-height: 1.95; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-art { display: block; min-width: 0; position: relative; color: var(--ink); }
.hero-art img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: contain; object-position: center; border-radius: 24px; box-shadow: 0 22px 52px rgb(33 128 198 / 14%); transition: transform .4s; }
.hero-art:hover img { transform: translateY(-4px); }
.hero-caption { display: inline-block; margin-top: 14px; padding: 5px 0; color: var(--muted); font-size: 0.8125rem; font-weight: 650; }

.section { padding-block: 72px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.section-heading h2, .about-copy h2, .contact-panel h2, .product-story h2, .gallery-section h2 { font-size: clamp(1.625rem, 2.6vw, 2rem); letter-spacing: -.02em; }
.section-heading p { color: var(--muted); font-size: 0.9375rem; }
.works-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.work-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: border-color .25s, box-shadow .25s; }
.work-card:hover { border-color: #a5ccec; box-shadow: var(--shadow); }
.work-image { display: block; overflow: hidden; background: var(--sky); }
.work-image img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: contain; object-position: center; }
.work-body { padding: 28px; }
.work-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.tag { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 11px; border: 1px solid #cee4f7; border-radius: 100px; color: #1764a6; background: #f1f8ff; font-size: 0.8125rem; font-weight: 650; line-height: 1.5; }
.tag-gold { color: #6c4b00; background: #fff4c6; border-color: #f8df88; }
.work-body h3 { font-size: 2rem; margin-bottom: 12px; }
.work-body h3 a { color: var(--ink); }
.work-body h3 a:hover { color: var(--blue); }
.work-tagline { color: #0a65bf; font-size: 1.1875rem; font-weight: 750; line-height: 1.6; margin-bottom: 12px; }
.work-description { line-height: 1.9; }
.work-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.works-grid:has(.work-card:only-child) { grid-template-columns: 1fr; }
.works-grid:has(.work-card:only-child) .work-card { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; }
.works-grid:has(.work-card:only-child) .work-image { align-self: center; }
.works-grid:has(.work-card:only-child) .work-image img { aspect-ratio: 16/9; height: auto; min-height: 0; }
.works-grid:has(.work-card:only-child) .work-body { padding: 35px 38px; align-self: center; }
.works-grid:has(.work-card:only-child) .work-body h3 { font-size: 2.25rem; }

.about-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding-block: 4px 72px; }
.about-copy { padding: 20px 0; }
.about-copy .eyebrow { margin-bottom: 12px; }
.about-copy h2 { margin-bottom: 18px; }
.about-copy p:not(.eyebrow) { margin-top: 10px; line-height: 1.95; }
.contact-panel { position: relative; padding: 34px 36px; border-radius: 28px; background: #edf7ff; border: 1px solid #deefff; }
.contact-panel .eyebrow { margin-bottom: 8px; }
.contact-panel h2 { margin-bottom: 10px; font-size: 1.75rem; }
.contact-panel > p:not(.eyebrow) { font-size: 0.9375rem; }
.email-address { display: inline-flex; align-items: center; gap: 10px; margin-top: 17px; color: var(--ink); font-size: clamp(1.25rem, 2vw, 1.625rem); font-weight: 750; line-height: 1.5; overflow-wrap: anywhere; }
.email-address:hover { color: var(--blue); text-decoration: underline; }
.email-address svg { width: 24px; height: 24px; color: var(--blue); flex-shrink: 0; }
.email-address svg, .platform-icon svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.copy-email { min-height: 44px; padding: 8px 14px; color: #175c9b; background: transparent; border: 0; border-radius: 100px; font-size: 0.875rem; font-weight: 650; }
.copy-email:hover { background: #dceeff; }
.site-footer { background: #f9fcff; border-top: 1px solid var(--line); }
.footer-inner { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 20px; font-size: 0.875rem; color: var(--muted); }
.site-footer .brand { gap: 9px; }
.site-footer .brand-mark { width: 30px; height: 30px; }
.site-footer .brand-name { font-size: 1rem; }
.site-footer a:not(.brand):hover { text-decoration: underline; }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 50; width: max-content; max-width: calc(100% - 32px); padding: 12px 22px; color: white; background: var(--ink); border-radius: 12px; text-align: center; font-size: 0.9375rem; opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 8px 26px rgb(16 45 79 / 18%); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Product details and download channels. */
.product-hero { padding-block: 28px 60px; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 0.875rem; color: var(--muted); margin-bottom: 28px; }
.breadcrumbs a { color: #466982; padding-block: 6px; }
.breadcrumbs a:hover { color: var(--blue); text-decoration: underline; }
.product-heading { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.product-heading h1 { font-size: clamp(2.25rem, 4.5vw, 3.375rem); letter-spacing: -.025em; margin-bottom: 8px; }
.product-heading p { font-size: 1.125rem; color: #486682; }
.product-heading .work-meta { margin-bottom: 0; }
.product-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); align-items: stretch; gap: 32px; }
.product-visual { min-width: 0; align-self: center; background: #eff8ff; border-radius: 24px; overflow: hidden; }
.product-visual > img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: contain; object-position: center; }
.download-panel { padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: #fbfdff; }
.download-panel .eyebrow { margin-bottom: 5px; }
.download-panel h2 { font-size: 1.5625rem; margin-bottom: 8px; }
.download-summary { color: var(--muted); font-size: 0.875rem; line-height: 1.8; margin-bottom: 20px; }
.download-list { display: flex; flex-direction: column; gap: 11px; }
.download-link { min-height: 76px; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #a9cff0; border-radius: 14px; background: #edf7ff; color: var(--ink); transition: background .2s, border-color .2s, box-shadow .2s; }
a.download-link:hover { background: #e0f0ff; border-color: var(--blue); box-shadow: 0 3px 12px rgb(8 107 213 / 10%); }
.platform-icon { width: 35px; height: 35px; display: grid; place-items: center; flex-shrink: 0; color: var(--blue); }
.platform-icon svg { width: 28px; height: 28px; }
.platform-info { flex: 1; min-width: 0; line-height: 1.4; }
.platform-info strong { display: block; font-size: 1.0625rem; }
.platform-info small { display: block; font-size: 0.8125rem; color: #4c6c89; margin-top: 4px; }
.download-state { flex-shrink: 0; font-size: 0.8125rem; color: var(--blue); font-weight: 650; }
.download-link.is-unavailable { color: #53657a; border-color: #e0e7ef; background: #f2f5f8; }
.is-unavailable .platform-icon { color: #71849a; }
.is-unavailable .platform-info small, .is-unavailable .download-state { color: #647589; }
.download-note { margin-top: 16px; font-size: 0.8125rem; color: var(--muted); line-height: 1.8; }
.product-story { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.product-story > h2 { margin-bottom: 20px; }
.product-story > p:not(.eyebrow) { max-width: 850px; font-size: 1.0625rem; line-height: 2; }
.product-story > .eyebrow { margin-bottom: 9px; }
.section-heading .eyebrow { color: var(--blue); font-size: 0.875rem; margin-bottom: 8px; }
.feature-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; margin-top: 38px; }
.feature-item { padding-left: 19px; border-left: 3px solid #addcff; }
.feature-item h3 { font-size: 1.25rem; margin-bottom: 10px; }
.feature-item p { color: #53697f; font-size: 0.9375rem; line-height: 1.9; }
.screenshot-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 22px; }
.screenshot-gallery figure { min-width: 0; }
.screenshot-gallery img { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--sky); }
.screenshot-gallery figcaption { margin-top: 12px; text-align: center; font-size: 0.875rem; color: #4e6680; }
.product-contact { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 64px; padding: 28px 34px; background: var(--sky); border-radius: 22px; }
.product-contact p { color: var(--ink); font-size: 1.0625rem; }
.product-contact h2 { font-size: 1.5rem; margin-bottom: 8px; }
.product-contact .button { flex-shrink: 0; }
.empty-state, .error-state { padding: 64px 28px; border: 1px solid var(--line); background: var(--sky); border-radius: 24px; text-align: center; }
.empty-state h1, .error-state h1, .error-state h2 { margin-bottom: 18px; }
.empty-state p, .error-state p { margin-bottom: 24px; }

@media (min-width: 1550px) {
  .hero-grid { gap: 64px; min-height: 610px; }
  .hero h1 { font-size: 3.125rem; }
}

@media (max-width: 1050px) {
  .container { width: calc(100% - 48px); }
  .hero-grid { gap: 30px; grid-template-columns: 1fr 1fr; min-height: 520px; padding-block: 54px; }
  .hero h1 { font-size: 2.25rem; }
  .hero-art img { border-radius: 20px; }
  .hero-intro { font-size: 1rem; }
  .hero-caption { font-size: 0.75rem; }
  .works-grid:has(.work-card:only-child) .work-body { padding: 26px; }
  .works-grid:has(.work-card:only-child) .work-body h3 { font-size: 2rem; }
  .work-tagline { font-size: 1.125rem; }
  .about-contact { gap: 36px; }
  .contact-panel { padding: 28px; }
  .contact-panel h2 { font-size: 1.5625rem; }
  .product-layout { grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr); gap: 24px; }
  .download-panel { padding: 24px; }
  .screenshot-gallery { gap: 16px; }
  .feature-list { gap: 22px; }
}

@media (max-width: 768px) {
  html { scroll-padding-top: 96px; }
  .container { width: calc(100% - 40px); }
  .header-inner { min-height: 74px; flex-wrap: wrap; gap: 0 16px; position: relative; }
  .brand { gap: 9px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-name { font-size: 1.125rem; }
  .site-nav { width: 100%; gap: 26px; padding: 5px 0 15px; }
  .site-nav a { font-size: 0.9375rem; }
  .js .nav-toggle { display: block; }
  .js .site-nav { display: none; position: absolute; inset: 74px -20px auto; width: auto; padding: 14px 20px; background: #fff; box-shadow: 0 12px 20px rgb(16 45 79 / 8%); border-bottom: 1px solid var(--line); }
  .js .site-nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
  .js .site-nav a { padding: 12px 8px; border-radius: 8px; }
  .js .site-nav a:hover { background: var(--sky); }
  .site-nav a[aria-current]::after { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; min-height: 0; padding-block: 44px 38px; }
  .hero-copy { max-width: 540px; }
  .hero-copy .eyebrow { margin-bottom: 16px; }
  .hero h1 { font-size: clamp(2rem, 5.6vw, 2.75rem); line-height: 1.48; margin-bottom: 18px; letter-spacing: -.035em; }
  .hero-intro { max-width: 35em; line-height: 1.9; }
  .hero-actions { margin-top: 24px; gap: 10px; }
  .hero-art img { border-radius: 20px; }
  .hero-caption { font-size: 0.75rem; }
  .section { padding-block: 50px; }
  .section-heading { display: block; margin-bottom: 24px; }
  .section-heading p { margin-top: 10px; }
  .works-grid { gap: 22px; }
  .works-grid:has(.work-card:only-child) .work-card { display: block; }
  .works-grid:has(.work-card:only-child) .work-image img { aspect-ratio: 16/9; height: auto; min-height: 0; }
  .works-grid:has(.work-card:only-child) .work-body { padding: 26px; }
  .works-grid:has(.work-card:only-child) .work-body h3 { font-size: 1.875rem; }
  .work-body { padding: 22px; }
  .work-body h3 { font-size: 1.625rem; }
  .work-tagline { font-size: 1.0625rem; }
  .work-description { font-size: 0.9375rem; }
  .work-meta { gap: 6px; margin-bottom: 12px; }
  .work-actions { margin-top: 20px; }
  .about-contact { grid-template-columns: 1fr; gap: 28px; padding-block: 0 50px; }
  .about-copy { padding: 0; }
  .about-copy h2 { margin-bottom: 14px; }
  .contact-panel { padding: 28px; }
  .email-address { font-size: 1.5625rem; }
  .contact-panel h2 { font-size: 1.625rem; }
  .footer-inner { flex-direction: column; gap: 12px; align-items: center; text-align: center; padding-block: 25px; }
  .product-hero { padding-block: 22px 42px; }
  .breadcrumbs { margin-bottom: 22px; }
  .product-heading { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
  .product-heading h1 { font-size: 2.375rem; }
  .product-heading p { font-size: 1.0625rem; }
  .product-layout { grid-template-columns: 1fr; gap: 22px; }
  .product-visual { border-radius: 20px; }
  .download-panel { padding: 26px; }
  .download-summary { max-width: 38em; }
  .download-state { font-size: 0.875rem; }
  .download-note { font-size: 0.875rem; }
  .product-story > p:not(.eyebrow) { font-size: 1rem; }
  .feature-list { grid-template-columns: 1fr; gap: 26px; margin-top: 30px; }
  .feature-item h3 { margin-bottom: 7px; }
  .screenshot-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 18px; }
  .product-contact { flex-direction: column; align-items: flex-start; gap: 20px; padding: 26px; margin-bottom: 42px; }
}

@media (max-width: 480px) {
  .container { width: calc(100% - 36px); }
  .brand-name { font-size: 1.0625rem; }
  .brand-mark { width: 33px; height: 33px; }
  .header-inner { min-height: 70px; }
  .js .site-nav { inset: 70px -18px auto; padding-inline: 18px; }
  .hero-grid { padding-block: 34px 32px; gap: 28px; }
  .hero h1 { font-size: clamp(1.8125rem, 7.9vw, 2.3125rem); line-height: 1.5; }
  .hero-intro { font-size: 0.9375rem; }
  .eyebrow { font-size: 0.8125rem; }
  .button { min-height: 46px; padding: 10px 23px; font-size: 0.9375rem; }
  .hero-caption { margin-top: 10px; font-size: 0.75rem; }
  .works-grid { grid-template-columns: 1fr; }
  .works-grid:has(.work-card:only-child) .work-body { padding: 23px; }
  .work-card { border-radius: 20px; }
  .work-body h3 { font-size: 1.75rem; }
  .work-tagline { font-size: 1.0625rem; }
  .tag { font-size: 0.75rem; padding: 3px 9px; min-height: 26px; }
  .contact-panel { padding: 25px 23px; border-radius: 22px; }
  .contact-panel h2 { font-size: 1.5rem; }
  .contact-panel > p:not(.eyebrow) { font-size: 0.875rem; }
  .email-address { font-size: clamp(1.3125rem, 5.8vw, 1.5625rem); gap: 8px; }
  .email-address svg { width: 22px; height: 22px; }
  .contact-actions { gap: 7px; }
  .copy-email { font-size: 0.8125rem; padding-inline: 11px; }
  .product-heading h1 { font-size: 2.1875rem; }
  .download-panel { padding: 22px 20px; border-radius: 20px; }
  .download-link { padding: 13px 11px; gap: 9px; }
  .platform-icon { width: 30px; }
  .platform-info strong { font-size: 1rem; }
  .platform-info small { font-size: 0.75rem; }
  .download-state { font-size: 0.875rem; }
  .screenshot-gallery { gap: 22px 12px; }
  .screenshot-gallery img { border-radius: 10px; }
  .screenshot-gallery figcaption { font-size: 0.8125rem; margin-top: 9px; }
  .product-contact p { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .button-primary:hover, .hero-art:hover img, .work-image:hover img { transform: none; }
}

@media print {
  .site-header { position: static; }
  .nav-toggle, .toast, .skip-link, .copy-email { display: none !important; }
  .container { width: 100%; }
  body { font-size: 12pt; }
  .hero-grid { min-height: auto; padding-block: 24px; }
  .section { padding-block: 24px; }
  .about-contact { padding-block: 12px 24px; }
  .work-card, .contact-panel, .download-panel { break-inside: avoid; box-shadow: none; }
}
