:root {
  color-scheme: light;
  --paper: #e0d8c9;
  --surface: #e8e0d2;
  --ink: #302320;
  --muted: #5e4b3d;
  --line: #b9aa95;
  --red: #73272d;
  --jade: #254c47;
  --indigo: #34516b;
  --thread: #b58b50;
  --serif: "Songti SC", "Noto Serif CJK SC", SimSun, "Cormorant Garamond", Georgia, serif;
  font: 16px/1.65 Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
body {
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 32% 12%, #f2eadb75, transparent 62%),
    radial-gradient(ellipse at 95% 88%, #978c7b30, transparent 65%),
    linear-gradient(#e0d8c9ef, #e0d8c9ef),
    url("brand/frost-grain.svg");
  background-size: auto, auto, auto, 192px 192px;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible { outline: 2px solid #ac7740; outline-offset: 5px; }
img { display: block; width: 100%; }
.wrap { width: min(1280px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: absolute; z-index: 2; top: 8px; left: 12px; transform: translateY(-160%); background: var(--paper); padding: 8px 12px; }
.skip:focus { transform: translateY(0); }
.site-header { border-bottom: 1px solid var(--line); }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 88px; }
.wordmark { display: block; position: relative; width: 214px; flex: 0 0 auto; aspect-ratio: 1280 / 386; overflow: hidden; }
.wordmark img { position: absolute; inset: 0 auto auto 0; }
nav { display: flex; gap: clamp(18px, 4vw, 46px); align-items: center; font-size: .9rem; }
nav a:hover, footer a:hover { text-decoration: underline; text-underline-offset: 5px; }
nav span { margin-left: 3px; color: #3f2b20; }
.hero { display: grid; grid-template-columns: .9fr 1.1fr; align-items: stretch; gap: clamp(28px, 6vw, 96px); padding-block: clamp(36px, 5vw, 72px) clamp(44px, 6vw, 84px); }
.intro { padding-block: clamp(20px, 4vw, 62px); }
.eyebrow { color: var(--red); font-size: .73rem; font-weight: 700; letter-spacing: .22em; }
h1, h2 { font-family: var(--serif); font-weight: 700; line-height: 1.17; }
h1 { margin-top: 23px; font-size: clamp(3.3rem, 6.3vw, 6.3rem); letter-spacing: -.055em; }
h2 { font-size: clamp(2.2rem, 4vw, 3.65rem); margin-top: 10px; }
.lede { color: var(--muted); max-width: 27em; margin-top: 25px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 19px; border: 1px solid #9b8163; border-radius: 2px; padding: 10px 15px; font-size: .9rem; font-weight: 650; white-space: nowrap; transition: background .2s, color .2s; }
.button:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dark-button { margin-top: 30px; color: var(--paper); background: var(--red); border-color: var(--red); }
.dark-button:hover { background: #522127; border-color: #522127; }
.brand-panel { position: relative; display: grid; place-items: center; min-height: 360px; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 45% 35%, #eee6d8, #d3c8b8); color: var(--muted); }
.brand-panel::before { content: ""; position: absolute; inset: 16px; z-index: -1; border: 1px solid var(--line); box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px #c9b39480; }
.brand-foil { width: 84%; margin-bottom: 3%; }
.brand-foil img { filter: drop-shadow(0 0 1px #563916) drop-shadow(2px 3px 2px #78501e55); }
.brand-panel figcaption { position: absolute; inset: auto 32px 27px; display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: .68rem; letter-spacing: .12em; }
.about, .downloads { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(20px, 6vw, 92px); padding-block: clamp(42px, 6vw, 82px); }
.about { border-top: 1px solid var(--line); }
.about-content { font-size: clamp(.91rem, 1.1vw, 1rem); line-height: 1.9; color: var(--muted); max-width: 41em; }
.about-content p + p { margin-top: 14px; }
.work { color: var(--ink); padding-block: clamp(46px, 7vw, 94px); }
.work-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 29px; }
.work-heading > p { color: var(--muted); font-size: .93rem; }
.gallery { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 14px; }
.gallery figure { border: 1px solid #c09b5d80; min-width: 0; }
.gallery a { display: block; aspect-ratio: 4/3; overflow: hidden; background: #040506; }
.gallery img { height: 100%; object-fit: cover; transition: transform .35s; }
.gallery a:hover img { transform: scale(1.06); }
.gallery figcaption { display: flex; justify-content: space-between; padding: 11px 13px; color: var(--ink); font-size: .82rem; }
.section-copy { color: var(--muted); margin-top: 12px; }
.release { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-block: 17px; border-top: 1px solid var(--line); }
.release h3 { font-size: 1.25rem; }
.release p, details p { color: var(--muted); font-size: .86rem; }
details { border-block: 1px solid var(--line); padding-block: 12px; }
summary { cursor: pointer; font-weight: 650; }
details p { margin-top: 10px; }
footer { color: var(--ink); }
.footer-content { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 28px; color: var(--muted); font-size: .83rem; }
.footer-brand { font-family: Georgia, serif; letter-spacing: .13em; color: var(--red); margin-bottom: 3px; }
@media (max-width: 800px) {
  .wrap { width: calc(100% - 40px); }
  .hero, .about, .downloads { grid-template-columns: 1fr; }
  .hero { gap: 22px; }
  .intro { padding-block: 8px; }
  .brand-panel { min-height: 0; aspect-ratio: 1.4; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery .feature { grid-column: 1 / -1; }
  .gallery .feature a { aspect-ratio: 16/9; }
}
@media (max-width: 450px) {
  .masthead { min-height: 72px; gap: 12px; }
  .wordmark { width: clamp(105px, 32vw, 132px); }
  nav { gap: 12px; font-size: .75rem; }
  nav span { display: none; }
  .brand-panel figcaption { inset: auto 22px 21px; font-size: .55rem; letter-spacing: .06em; }
  .work-heading { align-items: start; flex-direction: column; gap: 12px; }
  .release { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}


.gallery.poster-gallery { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.poster-gallery a { display: flex; flex-direction: column; height: 100%; aspect-ratio: auto; }
.poster-gallery img { aspect-ratio: 2/3; height: auto; object-fit: contain; background: #182e2c; }
.poster-gallery a:hover img { transform: none; }
.poster-caption { display: flex; justify-content: space-between; gap: 8px; padding: 11px 13px; color: var(--ink); font-size: .82rem; }
@media (max-width: 900px) {
  .gallery.poster-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 550px) {
  .gallery.poster-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .masthead nav { justify-content: flex-end; flex-wrap: wrap; column-gap: 12px; row-gap: 3px; }
  .masthead nav a { white-space: nowrap; }
}

.gallery.work-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.work-gallery img { aspect-ratio: 4/5; height: auto; object-fit: contain; background: #040506; }

@media (max-width: 800px) {
  .gallery.work-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.site-header::before {
  content: "";
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--indigo) 20%, #eadcc2 20% 40%, var(--red) 40% 60%, var(--jade) 60% 80%, #c7994d 80%);
}

.work, footer { position: relative; }
.work::before, footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 9px;
  opacity: .72;
  background:
    linear-gradient(45deg, transparent 41%, var(--thread) 42% 51%, transparent 52%) 0 0 / 14px 9px repeat-x,
    linear-gradient(-45deg, transparent 41%, var(--thread) 42% 51%, transparent 52%) 0 0 / 14px 9px repeat-x;
}
.intro .eyebrow { display: flex; gap: 13px; align-items: center; }
.intro .eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--red);
  transform: rotate(45deg);
}
.brand-panel { border: 1px solid #8a6c43; }
.work-heading { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.work-gallery figure, .poster-caption { background: var(--paper); }
.work-gallery figcaption { flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.work-gallery figcaption a { aspect-ratio: auto; background: transparent; overflow: visible; color: var(--red); white-space: nowrap; }
.work-gallery figcaption a:hover { text-decoration: underline; text-underline-offset: 4px; }
.gallery a:hover .poster-caption { color: var(--red); }
.release .button { background: var(--jade); border-color: var(--jade); color: #fff0d8; }
.release .button:hover { background: #193834; border-color: #193834; }
.release:nth-child(2) .button { background: var(--red); border-color: var(--red); }
.release:nth-child(2) .button:hover { background: #522127; border-color: #522127; }

.gallery.sticker-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sticker-gallery a { display: flex; flex-direction: column; height: 100%; aspect-ratio: auto; }
.sticker-gallery img { aspect-ratio: 2/1; height: auto; object-fit: contain; background: #202020; }
.sticker-gallery figure:nth-of-type(odd) img { background: radial-gradient(ellipse at center, #ad5054, #84323d); }
.sticker-gallery a:hover img { transform: none; }
@media (max-width: 550px) {
  .gallery.sticker-gallery { grid-template-columns: 1fr; }
}

.contact { display: grid; grid-template-columns: 1fr minmax(220px, 285px); align-items: center; gap: 30px; border-top: 1px solid var(--line); padding-block: clamp(38px, 6vw, 70px); }
.contact-orders { margin-top: 12px; font-size: .88rem; color: var(--muted); }
.contact-support {
  max-width: 40rem;
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--thread);
  background: var(--paper);
  color: var(--muted);
  font-size: .9rem;
}
.contact-support h3 { color: var(--ink); font-family: var(--serif); font-size: 1.1rem; }
.contact-support p { margin-top: 5px; }
.wechat-card { display: grid; justify-items: center; text-align: center; padding: 18px 14px; background: var(--paper); border: 1px solid var(--line); }
.wechat-card a { display: block; width: min(100%, 192px); }
.wechat-card img { height: auto; background: #fff; }
.wechat-card figcaption { margin-top: 10px; }
.wechat-card figcaption span { display: block; margin-top: 3px; color: var(--muted); font-size: .8rem; }
@media (max-width: 620px) {
  .contact { grid-template-columns: 1fr; gap: 20px; }
  .wechat-card { width: 100%; max-width: 340px; }
}

button.button { cursor: pointer; }
#software-download-status { margin: .5rem 0; font-size: .875rem; color: var(--muted); }
.download-dialog {
  width: min(460px, calc(100% - 32px));
  padding: clamp(20px, 5vw, 32px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
}
.download-dialog::backdrop { background: #18110caa; }
.download-dialog h2 { font-size: 1.4rem; }
.download-dialog p { margin: 14px 0 24px; line-height: 1.8; }
.download-dialog form { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.download-dialog .accept { background: var(--jade); border-color: var(--jade); color: #fff0d8; }
.download-dialog .accept:hover { background: #193834; }

.downloads {
  grid-template-areas: "heading releases" "support releases";
  row-gap: 20px;
  align-content: start;
}
.downloads-heading { grid-area: heading; }
.release-list { grid-area: releases; }
.support-card {
  grid-area: support;
  align-self: start;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--thread);
  background: var(--paper);
}
.support-card h3 { font-family: var(--serif); font-size: 1.2rem; }
.support-card p, .download-dialog .support-status { color: var(--muted); font-size: .875rem; }
.support-card p { margin: 5px 0 12px; }
.support-card .button { background: transparent; color: var(--ink); }
.support-card .button:hover { background: var(--ink); color: var(--paper); }
.download-dialog .support-status { padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 800px) {
  .downloads { grid-template-areas: "heading" "releases" "support"; }
}

/* Keep the original grid and captions when JavaScript is disabled. */
.gallery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(180px, 22%, 265px);
  grid-template-areas: "stage details" "title details" "controls details";
  column-gap: clamp(22px, 4vw, 60px);
}
.gallery.is-carousel {
  --card-width: min(32%, 320px);
  grid-area: stage;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  justify-items: center;
  isolation: isolate;
  gap: 0;
  overflow: clip;
  padding-block: 20px 43px;
  touch-action: pan-y pinch-zoom;
}
.gallery.sticker-gallery.is-carousel { --card-width: min(44%, 470px); }
.gallery.is-carousel figure, .gallery-shadow {
  grid-area: 1 / 1;
  width: var(--card-width);
}
.gallery.is-carousel figure {
  position: relative;
  border: 0;
  z-index: var(--card-depth, 2);
  transform-origin: center bottom;
  transform: translate(var(--card-x, 0px), var(--card-y, 0px))
    scale(var(--card-scale, 1)) perspective(900px) rotateY(var(--card-turn, 0deg));
}
.gallery.is-carousel figure > a { background: transparent; }
.gallery.is-carousel figure img {
  filter: brightness(var(--card-light, 1));
}
.gallery.is-carousel figure:hover img { transform: none; }
.gallery.is-carousel figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #f1ece2;
  opacity: var(--card-mist, 0);
  pointer-events: none;
}
.gallery.is-carousel figcaption,
.gallery.is-carousel .poster-caption { display: none; }
.gallery-shadow {
  z-index: 0;
  height: 44px;
  background: radial-gradient(ellipse, #523725af 0%, #654a385c 35%, transparent 72%);
  opacity: var(--shadow-opacity, 0);
  transform: translate(var(--shadow-x, 0px), var(--shadow-y, 0px)) scaleX(var(--shadow-width, 1)) skewX(-24deg);
  pointer-events: none;
}
.gallery.is-carousel:focus-visible { outline: 1px solid #a8793e; outline-offset: 4px; }
.gallery.is-carousel a:focus-visible { outline-offset: -3px; }
.gallery.is-dragging, .gallery.is-dragging * { cursor: grabbing; }
.gallery-controls {
  grid-area: controls;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  color: var(--muted);
}
.gallery-controls button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.gallery-controls button:hover, .gallery-controls button:focus-visible { background: var(--surface); }
.gallery-count { min-width: 5ch; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; }
.gallery-title {
  grid-area: title;
  margin: 0 0 14px;
  color: var(--ink);
  font: 700 clamp(1.2rem, 2.4vw, 1.7rem)/1.4 var(--serif);
  text-align: center;
}
.gallery-details {
  grid-area: details;
  align-self: center;
  padding-block: 20px;
  border-block: 1px solid var(--line);
  color: var(--muted);
  overflow-wrap: anywhere;
}
.gallery-action {
  display: inline-block;
  margin-top: 18px;
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: .9rem;
}
@media (pointer: fine) {
  .gallery.is-carousel { cursor: grab; user-select: none; }
  .gallery.is-carousel figure img { -webkit-user-drag: none; }
  .gallery.is-carousel.is-dragging { cursor: grabbing; }
}
@media (max-width: 700px) {
  .gallery-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "stage" "title" "controls" "details";
  }
  .gallery.is-carousel { --card-width: min(57%, 300px); }
  .gallery.sticker-gallery.is-carousel { --card-width: min(65%, 360px); }
  .gallery-details { margin-top: 22px; }
}
