

@font-face {
  font-family: "ArkPixel";
  src: url("fonts/ark-pixel-12px-zh_cn.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {

  --near-black: #0e0d0c;
  --off-black: #171615;
  --panel: #1b1918;
  --panel-2: #221f1e;
  --black: #000000;

  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);

  --white: #ffffff;
  --grey-2: #d0c5c0;
  --grey-3: #aba09c;
  --grey-4: #8a807c;

  --gold-1: #fff27a;
  --gold-2: #ffd953;
  --gold-3: #ffc42b;
  --gold-4: #db9f21;
  --gold-5: #b87918;

  --green: #3c8527;
  --green-light: #52a535;
  --green-dark: #2a641c;

  --font-pixel: "ArkPixel", "Microsoft YaHei", "PingFang SC", monospace;
  --font-sans: "Noto Sans", "Microsoft YaHei", "PingFang SC",
               system-ui, -apple-system, sans-serif;

  --shadow-hard: 0 4px 0 rgba(0, 0, 0, .45);
  --stage-h: 420px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--near-black);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 700; }

a { color: var(--gold-3); }

.btn {
  --btn-bg: var(--gold-3);
  --btn-light: var(--gold-2);
  --btn-dark: var(--gold-5);
  --btn-text: #33170a;

  display: inline-block;
  position: relative;
  padding: 14px 26px;
  font-family: var(--font-pixel);
  font-size: 24px;
  line-height: 1.05;
  text-decoration: none;
  text-align: center;
  color: var(--btn-text);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .16);
  background-color: var(--btn-bg);
  border: 0;
  border-radius: 0;
  cursor: pointer;

  box-shadow: inset 0 -4px 0 var(--btn-dark), inset 0 4px 0 var(--btn-light);
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35));
  transition: background-color .18s, filter .18s, transform .06s;
}

.btn:hover { --btn-bg: var(--gold-2); }
.btn:active { transform: translateY(3px); filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .35)); }
.btn:disabled {
  --btn-bg: var(--panel-2);
  --btn-light: rgba(255, 255, 255, .06);
  --btn-dark: rgba(0, 0, 0, .4);
  --btn-text: var(--grey-4);
  cursor: not-allowed;
  filter: none;
  text-shadow: none;
}

.btn--sm { padding: 9px 16px; font-size: 12px; }
.btn--wide { display: block; width: 100%; }
.btn--green {
  --btn-bg: var(--green);
  --btn-light: var(--green-light);
  --btn-dark: var(--green-dark);
  --btn-text: #ffffff;
  text-shadow: 0 2px 0 var(--green-dark);
}
.btn--green:hover { --btn-bg: var(--green-light); }
.btn--ghost {
  --btn-bg: transparent;
  --btn-light: transparent;
  --btn-dark: transparent;
  --btn-text: var(--gold-3);
  box-shadow: inset 0 0 0 2px var(--gold-5);
  text-shadow: none;
}
.btn--ghost:hover { --btn-text: var(--gold-2); box-shadow: inset 0 0 0 2px var(--gold-3); }

.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--grey-3);
  font-family: inherit;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}
.link:hover { color: var(--gold-3); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--black);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
}
.brand__logo {

  width: 48px;
  height: 36px;
  display: block;
  image-rendering: pixelated;
}
.brand__text { display: flex; flex-direction: column; }
.brand__title {
  font-family: var(--font-pixel);
  font-size: 24px;
  line-height: 1.05;
  color: var(--white);
}
.brand__sub {
  font-size: 12px;
  line-height: 1.2;
  color: var(--grey-4);
  letter-spacing: .02em;
}
.nav { margin-left: auto; display: flex; gap: 22px; }
.nav__link {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--grey-2);
  text-decoration: none;
  white-space: nowrap;
}
.nav__link:hover { color: var(--gold-3); }
.topbar__top { flex: 0 0 auto; }

.hero {
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(255, 196, 43, .07), transparent 60%),
    var(--near-black);
  border-bottom: 1px solid var(--line);
}
.hero__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 76px 22px 64px;
  text-align: center;
}
.hero__title {
  font-family: var(--font-pixel);
  font-size: clamp(36px, 5vw, 48px);
  line-height: 1.14;
  letter-spacing: .01em;
}
.hero__sub {
  margin: 18px auto 0;
  max-width: 620px;
  color: var(--grey-3);
  font-size: 15px;
}
.hero__actions {
  margin-top: 30px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero__feats {
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 26px;
  text-align: left;
}
.hero__feats li {
  position: relative;
  padding-left: 26px;
  color: var(--grey-2);
  font-size: 14px;
}
.hero__feats li::before {
  content: "▪";
  position: absolute;
  left: 6px;
  color: var(--gold-3);
}

.work { background: var(--near-black); }
.work__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 22px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 28px;
  align-items: start;
}
.work__left { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.work__right { position: sticky; top: 88px; min-width: 0; }

.panel {
  background: var(--off-black);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 26px 26px 28px;
  box-shadow: var(--shadow-hard);
}
.panel__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-pixel);
  font-size: 24px;
  line-height: 1.15;
}
.panel__title--plain { font-size: 24px; }
.panel__title i {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--gold-3);
  color: #33170a;
  font-size: 18px;
  font-style: normal;
}
.panel__desc { margin: 12px 0 18px; color: var(--grey-3); font-size: 14px; }
.sub {
  margin: 24px 0 10px;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--gold-3);
  letter-spacing: .06em;
}
.hint { margin: 10px 0 0; color: var(--grey-4); font-size: 13px; }
.hint--center { text-align: center; }

.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab {
  flex: 1;
  padding: 12px 10px;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--grey-3);
  font-family: var(--font-pixel);
  font-size: 12px;
  cursor: pointer;
}
.tab:hover { color: var(--white); }
.tab.is-active { color: var(--gold-3); border-bottom-color: var(--gold-3); }
.pane { display: none; }
.pane.is-active { display: block; }

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 18px;
  border: 2px dashed var(--line-strong);
  background: var(--panel);
  text-align: center;
  cursor: pointer;
  transition: border-color .18s, background-color .18s;
}
.drop:hover, .drop.is-over { border-color: var(--gold-3); background: var(--panel-2); }
.drop__icon { font-size: 26px; color: var(--gold-3); line-height: 1; }
.drop__main { font-size: 14px; color: var(--grey-2); }
.drop__sub { font-size: 12px; color: var(--grey-4); }

.field { display: flex; gap: 10px; }
.input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
}
.input:focus { outline: none; border-color: var(--gold-3); }
.input::placeholder { color: var(--grey-4); }

.result {
  margin-top: 20px;
  padding: 18px;
  background: var(--panel);
  border-left: 5px solid var(--green);
}
.result__head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--green-light);
}
.result__head .link { margin-left: auto; }
.dot {
  width: 10px;
  height: 10px;
  background: var(--green-light);
  flex: 0 0 auto;
}
.result__grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.kv { display: flex; flex-direction: column; gap: 4px; }
.kv b {
  font-family: var(--font-pixel);
  font-size: 12px;
  font-weight: 400;
  color: var(--grey-4);
}
.kv span {
  font-family: var(--font-pixel);
  font-size: 24px;
  line-height: 1.1;
  color: var(--gold-3);
}

.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.seg--center { justify-content: center; }
.seg__btn {
  padding: 9px 14px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--grey-2);
  font-family: var(--font-pixel);
  font-size: 12px;
  cursor: pointer;
}
.seg__btn:hover { color: var(--white); border-color: var(--gold-4); }
.seg__btn.is-active {
  background: var(--gold-3);
  border-color: var(--gold-3);
  color: #33170a;
}

.tpls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tpl {
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  text-align: center;
  cursor: pointer;
}
.tpl:hover { border-color: var(--gold-4); }
.tpl.is-active { border-color: var(--gold-3); box-shadow: inset 0 0 0 1px var(--gold-3); }
.tpl__art {
  width: 100%;
  height: 132px;
  display: grid;
  place-items: center;
  background:
    repeating-conic-gradient(var(--panel-2) 0% 25%, transparent 0% 50%) 0 0 / 16px 16px;
  margin-bottom: 12px;
}
.tpl__art canvas { image-rendering: pixelated; max-width: 100%; max-height: 132px; }
.tpl__name {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--white);
}
.tpl.is-active .tpl__name { color: var(--gold-3); }
.tpl__desc { margin: 4px 0 0; font-size: 12px; color: var(--grey-4); }

.tips { margin: 16px 0 0; padding: 0 0 0 20px; color: var(--grey-4); font-size: 13px; }
.tips li { margin-bottom: 6px; }

.msg {
  margin: 14px 0 0;
  padding: 10px 14px;
  background: rgba(255, 196, 43, .1);
  border-left: 4px solid var(--gold-3);
  color: var(--gold-1);
  font-size: 13px;
}
.msg[data-kind="err"] {
  background: rgba(220, 60, 60, .12);
  border-left-color: #d9534f;
  color: #ffb3b3;
}

.preview {
  background: var(--off-black);
  border: 1px solid var(--line);
  padding: 22px 22px 24px;
  box-shadow: var(--shadow-hard);
}
.stage {
  position: relative;
  margin-top: 14px;
  height: var(--stage-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(60% 60% at 50% 42%, rgba(255, 196, 43, .06), transparent 70%),
    var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: grab;
  perspective: 900px;

  touch-action: pan-y;
}
.stage:active { cursor: grabbing; }
.stage__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--grey-4);
  font-size: 13px;
  padding: 0 30px;
}
.stage__empty[hidden] { display: none; }

.figure {
  position: relative;
  transform-style: preserve-3d;
  transition: transform .05s linear;
}
.p3 { position: absolute; transform-style: preserve-3d; }
.p3__f {
  position: absolute;
  image-rendering: pixelated;
  background-repeat: no-repeat;
  backface-visibility: hidden;
}

.flat { margin-top: 20px; text-align: center; }
.flat__canvas {
  display: block;
  margin: 10px auto 0;
  width: 192px;
  height: 192px;
  image-rendering: pixelated;
  background: var(--panel);
  border: 1px solid var(--line);
}
#dlBtn2 { margin-top: 14px; }

.footer { background: var(--black); border-top: 1px solid var(--line); }
.footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 22px 34px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.footer__brand { flex: 1 1 320px; }
.footer__logo { width: 48px; height: 36px; image-rendering: pixelated; }
.footer__copy {
  margin: 14px 0 4px;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--white);
}
.footer__note { margin: 0; color: var(--grey-4); font-size: 13px; }
.footer__cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer__col-title {
  margin: 0 0 10px;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--gold-3);
}
.footer__cols a {
  display: block;
  color: var(--grey-3);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 6px;
}
.footer__cols a:hover { color: var(--gold-3); }
.footer__bottom { border-top: 1px solid var(--line); }
.footer__bottom-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--grey-4);
  font-size: 12px;
}
.footer__totop { color: var(--grey-3); text-decoration: none; }
.footer__totop:hover { color: var(--gold-3); }

@media (max-width: 1080px) {
  .nav { display: none; }
  .work__inner { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }

  .work__right {
    order: -1;
    position: static;
    padding-bottom: 12px;
  }
  :root { --stage-h: 300px; }
  .hero__inner { padding: 46px 22px 40px; }
  .hero__feats { grid-template-columns: minmax(0, 1fr); }
  .tpls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .panel { padding: 20px 16px 22px; }
  .preview { padding: 16px 14px 18px; }
  .brand__sub { display: none; }
  .brand__title { font-size: 12px; }
  .field { flex-direction: column; }
  .result__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .figure, .btn { transition: none; }
}
