:root {
  color-scheme: light;
  --bg:#f5f4ee; --bg2:#e4eadd; --panel:#edf0e7; --line:#b4bfb3;
  --mint:#3e694b; --sage:#88bba1; --pale:#455b50; --text:#162921;
  --dim:#455b50; --amber:#83501f; --pink:#a34560; --px:4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 24px/1.5 var(--pixel);
  -webkit-font-smoothing: none; font-smooth: never;
}
/* faint scanlines over the whole page */
img { image-rendering: pixelated; }
a { color: var(--mint); }
code { font: inherit; color: var(--amber); }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }

/* Language: static text is duplicated per language; hide the inactive one. */
html[lang="en"] body [lang="zh-CN"], html[lang="zh-CN"] body [lang="en"] { display: none !important; }

/* Header */
.bar {
  position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between;
  padding: 10px max(20px, 50% - 590px); background: rgba(245, 244, 238, .96); border-bottom: var(--px) solid var(--panel);
  backdrop-filter: blur(4px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 24px; letter-spacing: 2px; }
.brand img { width: 36px; height: 36px; }
.bar nav { display: flex; gap: 22px; }
.bar nav a { color: var(--dim); text-decoration: none; font-size: 12px; }
.bar nav a:hover { color: var(--mint); }
.bar-actions { display: flex; align-items: center; gap: 14px; }
.btn.small { padding: 4px 14px; font-size: 12px; border-width: 2px; box-shadow: 3px 3px 0 #b4bfb3; }
.lang-switch { display: flex; border: 2px solid var(--line); }
.lang-switch button { background: var(--bg); border: 0; padding: 3px 10px; font-size: 12px; color: var(--dim); }
.lang-switch button[aria-pressed="true"] { background: var(--mint); color: var(--bg); }

/* Buttons: hard pixel shadows */
.btn {
  display: inline-block; padding: 12px 22px; border: var(--px) solid var(--sage); color: var(--text);
  text-decoration: none; background: var(--panel); box-shadow: var(--px) var(--px) 0 #b4bfb3; transition: transform .08s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #b4bfb3; }
.btn.primary { background: var(--mint); border-color: var(--pale); color: var(--bg); }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; padding: 72px 0 88px; }
.kicker { color: var(--mint); letter-spacing: 3px; font-size: 12px; margin: 0; }
.blink { color: var(--pink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
h1 { font-size: 72px; line-height: 1.1; margin: 16px 0 20px; font-weight: normal; text-shadow: var(--px) var(--px) 0 #b4bfb3; }
h1 em { font-style: normal; color: var(--mint); }
.lead { color: var(--pale); font-size: 24px; margin: 0 0 28px; }
.cta { display: flex; gap: 16px; flex-wrap: wrap; }
.model { margin-top: 26px; font-size: 12px; color: var(--dim); border-left: var(--px) solid var(--amber); padding-left: 12px; }

.console { background: var(--panel); border: var(--px) solid var(--line); padding: 18px; box-shadow: 10px 10px 0 #b4bfb3; }
.prompt {
  background: var(--bg); border: var(--px) solid var(--line); padding: 12px 14px; min-height: 108px;
  /* Fusion Pixel has a 12px grid: render prompts at an exact 2x scale. */
  font-size: 24px; line-height: 36px; color: var(--pale);
}
.chev { color: var(--mint); margin-right: 8px; }
.caret { color: var(--mint); animation: blink .8s steps(1) infinite; }
.arrow { text-align: center; color: var(--dim); font-size: 12px; margin: 8px 0; letter-spacing: 2px; transition: color .2s; }
.console.done .arrow { color: var(--amber); }
/* Keep hero screenshots above the page's decorative scanlines. */
.crt { position: relative; z-index: 51; aspect-ratio: 16/9; background: #000; border: var(--px) solid #000; overflow: hidden; }
.crt img { width: 100%; height: 100%; object-fit: contain; display: block; cursor: pointer; opacity: 0; transition: opacity .3s steps(4); }
.crt::before { content: "GENERATING…"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--mint); letter-spacing: 3px; animation: blink .6s steps(1) infinite; }
.console.done .crt::before { display: none; }
.console.done .crt img { opacity: 1; filter: none; }
.crt::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 40px rgba(0, 0, 0, .7); }
.crt-label { position: absolute; right: 8px; bottom: 8px; z-index: 1; background: var(--bg); color: var(--mint); padding: 2px 8px; font-size: 12px; opacity: 0; transition: opacity .25s; }
.console.done .crt-label { opacity: 1; }
.dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.dots button { width: 12px; height: 12px; border: 0; background: var(--line); padding: 0; }
.dots button.on { background: var(--mint); }

/* Sections */
.section { padding: 88px 0; border-top: var(--px) solid var(--panel); }
.section.alt { background: var(--bg2); }
.num { color: var(--amber); letter-spacing: 2px; font-size: 24px; margin: 0; }
h2 { font-size: 48px; line-height: 1.25; margin: 10px 0 14px; font-weight: normal; }
h3 { font-size: 24px; font-weight: normal; margin: 0; }
.sub { color: var(--pale); max-width: 820px; margin: 0 0 36px; }
.fine { color: var(--dim); font-size: 12px; margin-top: 24px; }

/* Screenshot button shared by gallery and comparisons */
.shot { position: relative; display: block; width: 100%; padding: 0; border: var(--px) solid #000; background: #000; aspect-ratio: 16/9; overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .2s; }
.shot .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--mint); color: var(--bg);
  padding: 8px 16px; box-shadow: var(--px) var(--px) 0 #b4bfb3; opacity: 0; transition: opacity .15s; white-space: nowrap; text-decoration: none;
}
.shot:hover .play, .shot:focus-visible .play { opacity: 1; }
.shot:hover img { transform: none; }

/* CMD showcase: full-resolution Classic captures; links open the original image. */
.cmd-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.cmd-card { margin: 0; padding: 16px; background: var(--panel); border: var(--px) solid var(--line); }
.cmd-card > a { display: flex; justify-content: center; background: #000; overflow: auto; }
.cmd-card img { display: block; width: 256px; height: 144px; max-width: none; flex-shrink: 0; image-rendering: auto; }
.cmd-card h3 { color: var(--mint); margin-top: 12px; font-size: 12px; font-weight: normal; line-height: 1.5; }
.cmd-card p { color: var(--pale); font-size: 12px; line-height: 1.5; margin: 8px 0 0; }
@media (max-width: 980px) { .cmd-grid { grid-template-columns: 1fr; } }
@media (min-width: 600px) and (max-width: 980px) { .cmd-card img { width: 512px; height: 288px; } }
@media (max-width: 340px) { .cmd-card { padding: 8px; } }

/* Gallery */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--panel); border: var(--px) solid var(--line); padding: 10px; display: flex; flex-direction: column; }
.card:hover { border-color: var(--mint); }
.quote { color: var(--pale); font-size: 24px; line-height: 36px; margin: 8px 2px; flex: 1; }
.card h3 { font-size: 12px; font-weight: normal; line-height: 1.5; color: var(--mint); display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin: 0 2px; }
.card h3 { flex-wrap: wrap; }
.card small { color: var(--dim); font-size: 12px; white-space: nowrap; }

/* AI steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps li { background: var(--panel); border: var(--px) solid var(--line); padding: 10px; display: flex; flex-direction: column; }
.steps img { width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: top; display: block; border: 2px solid #000; image-rendering: auto; }
.steps a[lang="en"] img { object-fit: contain; background: var(--bg); }
.steps b { color: var(--mint); font-weight: normal; margin-top: 12px; }
.steps span { color: var(--dim); font-size: 12px; }

/* Comparisons */
.pair { background: var(--panel); border: var(--px) solid var(--line); padding: 20px; margin-bottom: 26px; }
.pair header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.idx { color: var(--amber); font-size: 24px; }
.pair h3 { font-size: 24px; flex: 1; }
.chip { background: var(--bg); color: var(--mint); padding: 2px 10px; font-size: 12px; border: 2px solid var(--line); }
.sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; }
.sides figure { margin: 0; }
.sides figcaption { font-size: 12px; color: var(--dim); margin-bottom: 6px; }
.sides .t8 figcaption { color: var(--mint); }
.sides figure:first-child .shot img { object-fit: contain; }
.sides .t8 .shot { border-color: var(--mint); }
.to { font-size: 36px; color: var(--amber); }
.note { color: var(--dim); font-size: 12px; margin: 14px 0 0; }

/* Studio tabs */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { background: var(--panel); border: var(--px) solid var(--line); padding: 8px 18px; letter-spacing: 1px; }
.tabs button[aria-selected="true"] { background: var(--mint); color: var(--bg); border-color: var(--pale); }
.studio-view { margin: 0; background: var(--panel); border: var(--px) solid var(--line); padding: 10px; box-shadow: 10px 10px 0 #b4bfb3; }
.studio-view img { width: 100%; display: block; image-rendering: auto; }
.studio-view figcaption { color: var(--pale); padding: 12px 4px 2px; }
.studio-view b { color: var(--mint); font-weight: normal; margin-right: 10px; }

/* Native-size FX captures; isolate from the page's decorative scanline overlay. */
#effects { position: relative; z-index: 51; background: var(--bg); }
.effect-viewport { width: max-content; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.effect-viewport::-webkit-scrollbar { display: none; }
.effect-card { width: max-content; margin: 0; padding: 0; border: 0; }
.effect-shot { display: block; width: max-content; cursor: zoom-in; margin: 0 auto; }
.effect-shot img { display: block; width: auto; height: auto; max-width: none; max-height: none; }
.effect-shot:focus-visible, .effect-controls button:focus-visible, .effect-viewport:focus-visible,
.zoom-scroll:focus-visible, .zoom-close:focus-visible { outline: var(--px) solid var(--amber); outline-offset: -4px; }
.effect-controls { display: flex; align-items: center; gap: 12px; width: 1088px; max-width: 100%; margin-bottom: 16px; }
.effect-controls button { flex: none; min-height: 44px; background: var(--panel); border: var(--px) solid var(--line); padding: 6px 12px; }
.effect-controls button:hover { border-color: var(--mint); }
#effectLabel { flex: 1; min-width: 0; text-align: center; color: var(--mint); line-height: 1.4; }
@media (max-width: 640px) { .effect-controls { gap: 8px; } .effect-controls button { padding: 4px 8px; } #effectLabel { font-size: 12px; } }


/* Specs */
.specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; border: var(--px) solid var(--line); }
.specs div { padding: 22px; border: 2px solid var(--line); margin: -1px; }
.specs dt { color: var(--dim); font-size: 12px; }
.specs dd { margin: 4px 0; font-size: 36px; color: var(--mint); }
.specs p { margin: 0; font-size: 12px; color: var(--pale); }

/* Inline on first load, idle behind its own PLAY overlay; no autoplay. */
.api-demo { margin-top: 32px; padding: 24px; border: var(--px) solid var(--line); background: var(--panel); position: relative; z-index: 51; }
.api-demo h3 { color: var(--mint); font-size: 36px; }
.api-demo p { color: var(--pale); }
.api-hint { font-size: 24px; }
#apiScreen { margin-top: 20px; height: clamp(360px, 52vw, 640px); max-height: none; aspect-ratio: auto; background: #000; }
#apiScreen iframe { width: 100%; height: 100%; border: 0; display: block; }
#apiScreen.expanded-player { position: fixed; inset: 0; width: 100vw; height: 100dvh; margin: 0; z-index: 100; }
.api-demo:has(.expanded-player) { z-index: 100; }
body:has(#apiScreen.expanded-player) { overflow: hidden; }
@media (max-width: 640px) { .api-demo { padding: 14px; } #apiScreen { height: 420px; } }

/* Stores */
.stores { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.store { background: var(--panel); border: var(--px) solid var(--line); padding: 22px; display: flex; flex-direction: column; }
.store h3 { font-size: 36px; color: var(--mint); }
.store ul { color: var(--pale); padding-left: 20px; flex: 1; margin: 12px 0 20px; }
.store b { color: var(--amber); font-weight: normal; }
.store .btn { text-align: center; }
.btn.disabled { opacity: .45; pointer-events: none; box-shadow: none; }

/* Q&A */
.qa { display: grid; gap: 12px; max-width: 920px; font: 24px/36px var(--pixel); font-synthesis: none; overflow-wrap: anywhere; }
.qa :where(summary, p, ol, ul, li, a, b, strong, code, kbd, span) { font: inherit; }
.qa details { background: var(--panel); border: var(--px) solid var(--line); }
.qa details[open] { border-color: var(--mint); }
.qa summary { cursor: pointer; padding: 14px 18px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; color: var(--amber); }
.qa details[open] summary::after { content: "−"; }
.qa details > :not(summary) { margin: 0 18px 14px; color: var(--pale); }
.qa li { margin: 4px 0; }
.qa b { color: var(--mint); font-weight: normal; }
kbd { border: 2px solid var(--line); padding: 0 6px; background: var(--bg); font: inherit; color: var(--amber); }
.end { text-align: center; padding: 96px 0; }
.end img { display: block; margin: 0 auto 10px; }
footer .legal { font-size: 12px; line-height: 1.8; }
footer { border-top: var(--px) solid var(--panel); padding: 28px 0 40px; color: var(--dim); font-size: 12px; }

/* Dialogs */
dialog { border: var(--px) solid var(--mint); background: #000; color: var(--text); padding: 0; box-shadow: 12px 12px 0 #b4bfb3; }
dialog::backdrop { background: rgba(4, 12, 16, .88); }
#player { width: min(1100px, 96vw); }
#player.expanded-player { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; }
#player.expanded-player .player-screen { height: calc(100dvh - 48px); max-height: none; aspect-ratio: auto; }
.player-bar { display: flex; align-items: center; gap: 14px; padding: 8px 12px; background: var(--panel); font-size: 12px; }
#playerTitle { color: var(--mint); }
#playerKeys { flex: 1; color: var(--dim); font-size: 12px; }
.player-bar button { background: var(--bg); border: 2px solid var(--line); padding: 2px 12px; }
.player-screen { aspect-ratio: 16/9; max-height: 82vh; }
.player-screen iframe { width: 100%; height: 100%; border: 0; display: block; }
#zoom { width: min(1280px, calc(100vw - 24px)); height: min(900px, calc(100dvh - 24px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow: hidden; }
#zoom[open] { display: flex; flex-direction: column; }
.zoom-bar, .zoom-hint { flex: none; }
.zoom-hint { margin: 0; padding: 4px 10px; background: var(--panel); color: var(--dim); font-size: 12px; }
.zoom-scroll { flex: 1; min-height: 0; min-width: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.zoom-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 10px; background: var(--panel); }
#zoomCaption { min-width: 0; overflow-wrap: anywhere; color: var(--mint); font-size: 12px; }
#zoom img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; image-rendering: auto; }
#zoom.effect-zoom img { image-rendering: pixelated; }
.zoom-close { flex: none; width: 44px; height: 44px; background: var(--bg); border: 2px solid var(--line); }
body:has(#zoom[open]) { overflow: hidden; }

/* itch hosts the showcase in a 1200px frame, even on wider desktop screens. */
@media (min-width: 961px) and (max-width: 1240px) {
  .wrap { width: min(1120px, 100% - 48px); }
  .bar { padding-inline: 24px; }
  .bar nav { gap: 14px; }
  .hero { grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); gap: 28px; padding: 40px 0 56px; }
  h1 { font-size: 60px; }
  h2 { font-size: 36px; }
  .lead { margin-bottom: 20px; }
  .console { padding: 12px; }
  .section { padding: 64px 0; }
  .sub { margin-bottom: 24px; }
  .end { padding: 64px 0; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 40px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .specs { grid-template-columns: repeat(2, 1fr); }
  .bar nav { display: none; }
  .stores { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 24px; }
  h1 { font-size: 48px; }
  h2 { font-size: 36px; }
  .grid, .steps { grid-template-columns: 1fr; }
  .sides { grid-template-columns: 1fr; }
  .to { transform: rotate(90deg); justify-self: center; line-height: 1; }
  .specs dd { font-size: 24px; }
  .section { padding: 60px 0; }
  .shot .play { opacity: 1; }
  #playerKeys { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.sides .original-still {display:block;width:100%;height:auto;image-rendering:pixelated;}

/* Account and cloud plans extend the reference showcase without changing its order. */
html {scroll-padding-top:80px}
[hidden] {display:none !important}
.bar {gap:12px}
.account {font-size:12px;text-decoration:none;color:var(--text)}
.cloud-qa {margin-top:12px}
.price {font-size:36px;color:var(--mint)}
.availability {font-size:12px;color:var(--dim)}
#releases {overflow-wrap:anywhere}
#releases a,#releases code {display:block}
#releases code {font:12px var(--pixel)}
.hero,.grid,.specs {min-width:0}
.hero {grid-template-columns:minmax(0,1fr) minmax(0,1.05fr)}
.card,.specs div {min-width:0}
.specs dd {overflow-wrap:anywhere}
.shot:focus-visible .play {opacity:1}
:where(a,button,summary):focus-visible {outline:3px solid var(--amber);outline-offset:3px}
body:has(#player[open]) {overflow:hidden}
@media(max-width:960px){.hero{grid-template-columns:1fr}}
@media(max-width:640px){
 .bar{padding:8px 12px;flex-wrap:wrap}.brand{font-size:20px}.brand img{width:28px;height:28px}
 .bar-actions{gap:8px}.btn.small{padding:4px 8px}.lang-switch button{padding:4px 6px}
 .player-screen{height:70dvh;aspect-ratio:auto}.player-bar{gap:8px}.player-bar button{min-height:36px}
 .pair{padding:12px}.chip{white-space:normal}.play{max-width:95%;text-align:center}
}
@media(hover:none){.shot .play{opacity:1}}

#convert .sub { margin-bottom: .75rem; }
.conversion-examples { max-width: 820px; margin: 0 0 2rem; padding: 0 0 0 1rem; border-left: 2px solid var(--pale); list-style: none; }
.conversion-examples strong { white-space: nowrap; }
.conversion-examples li + li { margin-top: .6rem; }
