@charset "UTF-8";

:root {
  --paper: #f2ede3;
  --paper-dark: #e5ded0;
  --ink: #252321;
  --muted: #77716a;
  --line: #c9c0b2;
  --red: #8d302f;
  --red-dark: #622020;
  --olive: #555c41;
  --blue: #56656a;
  --black: #171716;
  --header-height: 74px;
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  min-width: 320px;
  margin: 0;
  padding-top: var(--header-height);
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.65;
}

body.menu-open {
  overflow: hidden;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  left: 0;
  height: var(--header-height);
  border-bottom: 1px solid rgba(54, 47, 40, 0.18);
  background: rgba(242, 237, 227, 0.97);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
}

.brand img {
  width: 46px;
  height: 46px;
  border: 1px solid #aaa298;
  border-radius: 14px;
  object-fit: cover;
}

.brand > span,
.footer-inner a > span {
  display: grid;
  line-height: 1.17;
}

.brand strong {
  font-family: KaiTi, "STKaiti", serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand small,
.footer-inner small {
  margin-top: 5px;
  color: #837c73;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.main-nav {
  margin-left: auto;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  position: relative;
  display: block;
  padding: 26px 0 23px;
  color: #615b55;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.main-nav a::after {
  position: absolute;
  right: 50%;
  bottom: 0;
  left: 50%;
  height: 2px;
  background: var(--red);
  content: "";
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--red);
}

.main-nav a.active::after {
  right: 0;
  left: 0;
}

.header-download,
.menu-toggle {
  display: none;
}

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-height));
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(242, 237, 227, 1) 0 45%, rgba(242, 237, 227, 0.18) 71%, rgba(242, 237, 227, 0.35)),
    url("../images/4.jpg") center right/cover no-repeat;
}

.hero::before {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(#665f57 0.5px, transparent 0.7px);
  background-size: 7px 7px;
  content: "";
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 80px;
  background: linear-gradient(transparent, rgba(242, 237, 227, 0.82));
  content: "";
}

.hero-art {
  position: absolute;
  inset: 0 0 0 50%;
}

.hero-art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--paper), transparent 34%);
  content: "";
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-thread {
  position: absolute;
  z-index: 2;
  bottom: 14%;
  left: -2%;
  width: 69%;
  height: 140px;
  border-bottom: 3px solid rgba(141, 48, 47, 0.82);
  border-radius: 50%;
  transform: rotate(-4deg);
}

.hero-thread::before,
.hero-thread::after {
  position: absolute;
  border: 3px solid rgba(141, 48, 47, 0.82);
  border-radius: 50%;
  content: "";
}

.hero-thread::before {
  top: 69px;
  left: 24%;
  width: 80px;
  height: 38px;
}

.hero-thread::after {
  top: 56px;
  right: 5%;
  width: 46px;
  height: 25px;
}

.hero-inner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--header-height));
  padding-block: 85px 115px;
}

.hero-copy {
  width: min(600px, 56%);
}

.age-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: #766f67;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.age-chip b {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #8b8379;
  border-radius: 50%;
  color: var(--red);
}

.eyebrow,
.section-heading > div > p,
.choice-copy > p:first-child,
.gallery-heading > p,
.reviews-heading > div:first-child > p,
.review-form > div:first-child > p,
.faq-title > p,
.download-inner > div:first-child > p {
  margin: 0 0 13px;
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: KaiTi, "STKaiti", serif;
  font-size: clamp(72px, 9vw, 128px);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: 0.03em;
}

.hero h1 span {
  display: inline-block;
  margin-left: 0.55em;
}

.hero h2 {
  margin: 35px 0 10px;
  font-family: KaiTi, "STKaiti", serif;
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 600;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 500px;
  margin: 0;
  color: #68615b;
  font-size: 14px;
}

.hero-actions {
  display: flex;
  gap: 11px;
  margin-top: 30px;
}

.hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 165px;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid #686159;
  color: #fff;
  background: var(--olive);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.hero-actions a:last-child {
  background: var(--ink);
}

.hero-actions a:hover {
  border-color: var(--red);
  background: var(--red);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero-meta span {
  padding: 5px 9px;
  border: 1px solid #b5aca1;
  color: #777068;
  font-size: 9px;
}

.route-ticket {
  position: absolute;
  right: 35%;
  bottom: 15%;
  display: grid;
  width: 175px;
  padding: 23px 22px;
  border: 1px solid #bbb0a1;
  background: #e6dcc8;
  box-shadow: 10px 13px 25px rgba(55, 45, 35, 0.2);
  transform: rotate(5deg);
}

.route-ticket::before,
.route-ticket::after {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  content: "";
  transform: translateY(-50%);
}

.route-ticket::before { left: -9px; }
.route-ticket::after { right: -9px; }

.route-ticket small {
  color: #6c655d;
  font: 10px Georgia, serif;
}

.route-ticket strong {
  font: 600 38px Georgia, serif;
}

.route-ticket span {
  color: #70685f;
  font-size: 11px;
}

.route-ticket b {
  position: absolute;
  right: 9px;
  bottom: 9px;
  font: 9px Consolas, monospace;
  writing-mode: vertical-rl;
}

.story-section {
  position: relative;
  padding: 115px 0 95px;
  overflow: hidden;
  background: var(--paper);
}

.story-section::before,
.characters-section::before,
.endings-section::before,
.reviews-section::before,
.faq-section::before {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image: radial-gradient(#777067 0.45px, transparent 0.7px);
  background-size: 7px 7px;
  content: "";
  pointer-events: none;
}

.paper-hole {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 22px;
  width: 24px;
  opacity: 0.38;
  background: radial-gradient(circle, #756d64 0 4px, transparent 5px) center top/24px 38px repeat-y;
}

.section-heading {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  align-items: end;
  gap: 90px;
}

.section-heading h2,
.choice-copy h2,
.gallery-heading h2,
.reviews-heading h2,
.faq-title h2,
.download-inner h2 {
  margin: 0;
  font-family: KaiTi, "STKaiti", serif;
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 600;
  line-height: 1.12;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
}

.story-route {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 64px;
  border-top: 1px solid #7a7269;
}

.story-route button {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 25px 15px 17px 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.story-route button::before {
  position: absolute;
  top: -6px;
  left: 0;
  width: 11px;
  height: 11px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: #81786e;
  box-shadow: 0 0 0 1px #81786e;
  content: "";
}

.story-route button.active::before {
  background: var(--red);
  box-shadow: 0 0 0 1px var(--red), 0 0 0 7px rgba(141, 48, 47, 0.13);
}

.story-route b {
  color: var(--red);
  font: 10px Consolas, monospace;
}

.story-route span {
  font: 600 20px KaiTi, "STKaiti", serif;
}

.story-route small {
  color: #817970;
}

.story-feedback {
  display: grid;
  grid-template-columns: 170px 1fr;
  align-items: center;
  min-height: 74px;
  margin-top: 20px;
  padding: 15px 23px;
  border-left: 3px solid var(--red);
  background: rgba(255, 255, 255, 0.45);
}

.story-feedback strong {
  color: var(--red);
  font: 600 23px KaiTi, "STKaiti", serif;
}

.story-feedback span {
  color: #6f6860;
  font-size: 13px;
}

.game-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 55px;
  background: #c9c0b3;
}

.game-facts div {
  display: grid;
  min-height: 115px;
  place-content: center;
  padding: 20px;
  background: rgba(245, 241, 233, 0.96);
  text-align: center;
}

.game-facts strong {
  font: 600 27px KaiTi, "STKaiti", serif;
}

.game-facts span {
  color: #7a726a;
  font-size: 11px;
}

.characters-section {
  position: relative;
  padding: 115px 0;
  overflow: hidden;
  border-top: 1px solid #d0c7ba;
  background: #ede7dc;
}

.character-stage {
  position: relative;
  margin-top: 62px;
}

.character-stage::before {
  position: absolute;
  z-index: 2;
  top: 53%;
  right: 4%;
  left: 4%;
  height: 3px;
  border-radius: 50%;
  background: var(--red);
  content: "";
  transform: rotate(-3deg);
}

.character-cards {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  align-items: center;
}

.character-card {
  display: grid;
  padding: 17px;
  border: 1px solid #bcb2a6;
  background: #f7f3ea;
  box-shadow: 0 12px 35px rgba(65, 55, 45, 0.12);
  text-align: left;
  cursor: pointer;
}

.character-card:nth-child(1) { transform: rotate(-2deg); }
.character-card:nth-child(2) { transform: translateY(34px) rotate(1.5deg); }
.character-card:nth-child(3) { transform: rotate(2deg); }

.character-card.active {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(141, 48, 47, 0.13), 0 12px 35px rgba(65, 55, 45, 0.12);
}

.character-card > span {
  margin-bottom: 9px;
  color: var(--red);
  font: 9px Consolas, monospace;
  letter-spacing: 0.1em;
}

.character-card > div {
  height: 355px;
  overflow: hidden;
  background: #d6d0c6;
}

.character-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-card:nth-child(1) img { object-position: center; }
.character-card:nth-child(2) img { object-position: 56% center; }
.character-card:nth-child(3) img { object-position: 48% center; }

.character-card strong {
  margin-top: 17px;
  font: 600 24px KaiTi, "STKaiti", serif;
}

.character-card small {
  color: #797168;
}

.character-note {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 190px 1fr auto;
  align-items: center;
  gap: 25px;
  min-height: 83px;
  margin-top: 62px;
  padding: 18px 24px;
  color: #fff;
  background: var(--ink);
}

.character-note b {
  color: #dfb3ab;
  font: 600 23px KaiTi, "STKaiti", serif;
}

.character-note p {
  margin: 0;
  color: #bbb4ac;
  font-size: 13px;
}

.character-note i {
  width: 27px;
  height: 27px;
}

.choice-section {
  padding: 110px 0;
  color: #eee9df;
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    #1b1b1a;
  background-size: 30px 30px;
}

.choice-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(55px, 8vw, 120px);
  align-items: center;
}

.choice-copy > p:not(:first-child) {
  margin: 26px 0 35px;
  color: #a8a29b;
}

.emotion-meter {
  display: grid;
  gap: 9px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.emotion-meter > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #bab3ac;
  font-size: 11px;
}

.emotion-meter > div span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.emotion-meter > div i {
  width: 15px;
  height: 15px;
}

.emotion-meter em {
  display: block;
  height: 5px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.emotion-meter em i {
  display: block;
  height: 100%;
  background: var(--red);
}

.dialog-preview {
  display: grid;
  grid-template-columns: 55px 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 15px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.17);
}

.dialog-preview img {
  width: 55px;
  height: 55px;
  border-radius: 7px;
  object-fit: cover;
}

.dialog-preview p {
  display: grid;
  margin: 0;
}

.dialog-preview span {
  color: #8f8983;
  font-size: 9px;
}

.dialog-preview b {
  font: 500 15px KaiTi, "STKaiti", serif;
}

.branch-board {
  display: grid;
  grid-template-columns: 0.65fr 1fr 0.7fr;
  align-items: center;
  min-height: 430px;
}

.branch-origin {
  position: relative;
  display: grid;
  min-height: 80px;
  place-content: center;
  border: 1px solid #77716b;
  text-align: center;
}

.branch-origin::after {
  position: absolute;
  top: 50%;
  left: 100%;
  width: 40px;
  height: 1px;
  background: #817a73;
  content: "";
}

.branch-origin i {
  width: 25px;
  height: 25px;
  margin: 0 auto 4px;
}

.branch-options,
.branch-results {
  display: grid;
  gap: 13px;
}

.branch-options {
  padding-left: 40px;
}

.branch-options button {
  position: relative;
  min-height: 55px;
  border: 1px solid #706a64;
  background: #1e1e1d;
  cursor: pointer;
}

.branch-options button::before,
.branch-options button::after {
  position: absolute;
  top: 50%;
  height: 1px;
  background: #706a64;
  content: "";
}

.branch-options button::before { right: 100%; width: 40px; }
.branch-options button::after { left: 100%; width: 24px; }

.branch-options button.active {
  border-color: #b76058;
  color: #fff;
  background: var(--red-dark);
}

.branch-results {
  padding-left: 24px;
}

.branch-results span {
  display: grid;
  min-height: 55px;
  place-content: center;
  border: 1px dashed #5f5a55;
  color: #716b66;
  font: 10px Consolas, monospace;
}

.gallery-section {
  padding: 100px 0 110px;
  overflow: hidden;
  background: var(--paper);
}

.gallery-heading {
  margin-bottom: 42px;
}

.gallery-track {
  display: flex;
  gap: 20px;
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--red) #d8d0c4;
  scrollbar-width: thin;
}

.gallery-track figure {
  flex: 0 0 min(620px, 59vw);
  margin: 0;
  padding: 13px 13px 0;
  border: 1px solid #bbb2a6;
  background: #faf7f0;
  box-shadow: 0 10px 24px rgba(54, 47, 39, 0.1);
  scroll-snap-align: start;
}

.gallery-track figure:nth-child(even) {
  transform: translateY(12px) rotate(0.7deg);
}

.gallery-track img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.gallery-track figcaption {
  padding: 10px 0 12px;
  color: #726b63;
  font: 10px Consolas, monospace;
}

.endings-section {
  position: relative;
  padding: 115px 0;
  overflow: hidden;
  background: #e9e2d7;
}

.ending-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 35px;
  margin-top: 70px;
  padding: 50px 45px;
  background: #ddd2bd;
  clip-path: polygon(0 6%, 19% 0, 39% 7%, 59% 1%, 79% 8%, 100% 3%, 98% 93%, 78% 100%, 58% 92%, 39% 98%, 20% 91%, 2% 97%);
}

.ending-map::before {
  position: absolute;
  top: 50%;
  right: 8%;
  left: 8%;
  border-top: 2px dashed #8b8072;
  content: "";
}

.ending-map button {
  position: relative;
  z-index: 2;
  display: grid;
  width: 120px;
  height: 120px;
  margin-inline: auto;
  place-content: center;
  border: 2px dashed #80766a;
  border-radius: 50%;
  background: #ded4c2;
  cursor: pointer;
}

.ending-map button.active {
  border-style: solid;
  border-color: var(--red-dark);
  color: #fff;
  background: var(--red-dark);
  box-shadow: 0 0 0 7px rgba(98, 32, 32, 0.16);
}

.ending-map small {
  font: 9px Consolas, monospace;
}

.ending-map b {
  font: 500 29px Georgia, serif;
}

.ending-note {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  min-height: 82px;
  padding: 18px 24px;
  color: #fff;
  background: var(--ink);
}

.ending-note strong {
  color: #d4a7a2;
  font: 13px Consolas, monospace;
}

.ending-note span {
  color: #b9b2aa;
  font-size: 13px;
}

.reviews-section {
  position: relative;
  padding: 115px 0;
  overflow: hidden;
  background: var(--paper);
}

.reviews-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

.reviews-content,
.review-form {
  border: 1px solid #c3baae;
  background: rgba(250, 247, 239, 0.88);
}

.reviews-content {
  padding: 35px;
}

.reviews-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 35px;
}

.reviews-heading > div:last-child {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 13px;
}

.reviews-heading > div:last-child strong {
  grid-row: span 2;
  color: var(--red-dark);
  font: 500 55px/1 Georgia, serif;
}

.reviews-heading > div:last-child span {
  color: var(--red);
  letter-spacing: 0.08em;
}

.reviews-heading > div:last-child small {
  color: #777067;
}

.review-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 30px;
}

.review-toolbar button {
  padding: 8px 11px;
  border: 1px solid #beb5a9;
  color: #6c655e;
  background: transparent;
  cursor: pointer;
}

.review-toolbar button.active {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

.review-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.review-card {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 22px;
  border: 1px solid #c9c0b5;
  background: #f5f0e7;
}

.review-card header {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.review-card h3 {
  margin: 0;
  font-size: 14px;
}

.review-card time {
  color: #817970;
  font-size: 12px;
}

.review-card header > span {
  color: var(--red);
  white-space: nowrap;
}

.review-card > p {
  flex: 1;
  margin: 20px 0;
  font-family: KaiTi, "STKaiti", serif;
  font-size: 16px;
}

.review-card footer {
  padding-top: 12px;
  border-top: 1px solid #d2c9bd;
  color: #797168;
  font-size: 9px;
}

.review-form {
  position: sticky;
  top: calc(var(--header-height) + 30px);
  display: grid;
  gap: 18px;
  padding: 35px;
}

.review-form h3 {
  margin: 5px 0 8px;
  font: 600 32px KaiTi, "STKaiti", serif;
}

.review-form label,
.review-form fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 11px;
  font-weight: 700;
}

.review-form legend {
  margin-bottom: 8px;
}

.review-form input,
.review-form textarea {
  width: 100%;
  border: 1px solid #bbb2a6;
  border-radius: 0;
  outline: 0;
  background: #f7f3eb;
}

.review-form input {
  height: 48px;
  padding: 0 13px;
}

.review-form textarea {
  min-height: 135px;
  padding: 12px 13px;
  resize: vertical;
}

.review-form input:focus,
.review-form textarea:focus {
  border-color: var(--red);
}

.rating-input {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 9px;
  border: 1px solid #bbb2a6;
  background: #f7f3eb;
}

.rating-input button {
  padding: 2px 6px;
  color: #b6ada1;
  background: transparent;
  font-size: 21px;
  cursor: pointer;
}

.rating-input button.active {
  color: var(--red);
}

.review-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.review-submit span {
  color: #8c837a;
  font-size: 10px;
}

.review-submit button {
  min-width: 160px;
  height: 48px;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.form-feedback {
  min-height: 20px;
  margin: -8px 0 0;
  color: var(--red);
  font-size: 11px;
}

.faq-section {
  position: relative;
  padding: 105px 0;
  overflow: hidden;
  background: #e8e1d6;
}

.faq-grid {
  position: relative;
  display: grid;
  grid-template-columns: 0.42fr 0.58fr;
  gap: clamp(55px, 9vw, 135px);
}

.faq-title > span {
  display: block;
  max-width: 330px;
  margin-top: 25px;
  color: #756e66;
}

.faq-list {
  border-top: 1px solid #aaa196;
}

.faq-item {
  border-bottom: 1px solid #aaa196;
}

.faq-item > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 70px;
  padding: 0 5px 0 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.faq-item > button span {
  display: flex;
  gap: 22px;
  align-items: center;
  font-weight: 700;
}

.faq-item > button b {
  color: var(--red);
  font: 10px Consolas, monospace;
}

.faq-item .icon-plus::before {
  filter: brightness(0.25);
}

.faq-item.open .icon-plus {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 38px 22px;
  color: #706961;
  font-size: 13px;
}

.faq-answer p {
  margin: 0;
}

.download-section {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(20, 25, 29, 0.95), rgba(20, 25, 29, 0.45), rgba(20, 25, 29, 0.88)),
    url("../images/3.jpg") center/cover no-repeat;
}

.download-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(transparent 65%, rgba(9, 12, 14, 0.88)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.016) 3px 4px);
}

.download-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 70px;
  min-height: 520px;
  padding-block: 80px;
}

.download-inner > div:first-child > span {
  display: block;
  max-width: 520px;
  margin-top: 25px;
  color: #bbb7b2;
  font-size: 11px;
}

.download-links {
  display: grid;
  gap: 10px;
  width: min(100%, 340px);
}

.download-links a {
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: center;
  min-height: 82px;
  padding: 13px 22px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(28, 29, 27, 0.88);
}

.download-links a:first-child {
  border-color: #87906f;
  background: rgba(73, 82, 56, 0.92);
}

.download-links a:hover {
  border-color: #c47870;
  background: rgba(98, 32, 32, 0.92);
}

.download-links i {
  width: 34px;
  height: 34px;
}

.download-links a > span {
  display: grid;
  font-weight: 800;
  white-space: nowrap;
}

.download-links small {
  color: #c2beb8;
  font-size: 10px;
  font-weight: 400;
}

.site-footer {
  padding: 24px 0;
  color: #d8d3cb;
  background: #171716;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner > a {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-inner img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.footer-inner strong {
  font-family: KaiTi, "STKaiti", serif;
}

.footer-inner p {
  color: #827c75;
  font-size: 12px;
}

.back-to-top {
  position: fixed;
  z-index: 800;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(37, 35, 33, 0.9);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

i[class^="icon-"] {
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

i[class^="icon-"]::before {
  display: block;
  width: 100%;
  height: 100%;
  background: center/contain no-repeat;
  content: "";
}

.icon-download::before { background-image: url("../icons/download.svg") !important; }
.icon-arrow::before { background-image: url("../icons/arrow.svg") !important; }
.icon-heart::before { background-image: url("../icons/heart.svg") !important; }
.icon-bolt::before { background-image: url("../icons/bolt.svg") !important; }
.icon-plus::before { background-image: url("../icons/plus.svg") !important; }
.icon-route::before { background-image: url("../icons/route.svg") !important; }
.icon-android::before { background-image: url("../images/安卓.svg") !important; }
.icon-ios::before { background-image: url("../images/iOS.svg") !important; }

.icon-top {
  width: 24px !important;
  height: 24px !important;
}

.icon-top::before {
  background-image: url("../images/top.png") !important;
}

.hero-actions .icon-android::before,
.hero-actions .icon-ios::before,
.download-links .icon-android::before,
.download-links .icon-ios::before {
  filter: brightness(0) invert(1);
}

@media (max-width: 1000px) {
  :root {
    --header-height: 68px;
  }

  .container {
    width: min(calc(100% - 36px), var(--container));
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    visibility: hidden;
    border-top: 1px solid #c4bbaf;
    background: rgba(242, 237, 227, 0.99);
    opacity: 0;
    pointer-events: none;
  }

  .main-nav.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav ul {
    display: block;
    width: min(calc(100% - 36px), var(--container));
    margin-inline: auto;
  }

  .main-nav li {
    border-bottom: 1px solid #d0c7bb;
  }

  .main-nav a {
    padding: 15px 0;
  }

  .main-nav a::after {
    display: none;
  }

  .header-download {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    margin-left: auto;
    padding: 0 13px;
    border: 1px solid #777067;
    color: #fff;
    background: var(--olive);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
  }

  .header-download i {
    width: 16px;
    height: 16px;
  }

  .menu-toggle {
    display: grid;
    width: 40px;
    height: 40px;
    margin-left: 8px;
    place-content: center;
    gap: 5px;
    border: 1px solid #797168;
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    width: 18px;
    height: 1px;
    background: var(--ink);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .hero-copy {
    width: 62%;
  }

  .route-ticket {
    right: 16%;
  }

  .section-heading,
  .choice-grid,
  .reviews-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 22px;
  }

  .character-card > div {
    height: 300px;
  }

  .choice-grid {
    gap: 60px;
  }

  .ending-map {
    grid-template-columns: repeat(5, 145px);
    overflow-x: auto;
  }

  .review-form {
    position: static;
  }

  .download-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

@media (max-width: 680px) {
  .container {
    width: calc(100% - 28px);
  }

  .brand {
    gap: 8px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand small {
    font-size: 12px;
  }

  .header-download {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .header-download span {
    display: none;
  }

  .section-heading h2,
  .choice-copy h2,
  .gallery-heading h2,
  .reviews-heading h2,
  .faq-title h2,
  .download-inner h2 {
    font-size: 39px;
  }

  .hero {
    min-height: 780px;
    background: var(--paper);
  }

  .hero-art {
    inset: 0 0 auto;
    height: 45%;
  }

  .hero-art::after {
    background: linear-gradient(0deg, var(--paper), transparent 72%);
  }

  .hero-inner {
    align-items: flex-end;
    min-height: 780px;
    padding-block: 270px 70px;
  }

  .hero-copy {
    width: 100%;
  }

  .age-chip {
    margin-bottom: 17px;
  }

  .hero h1 {
    font-size: 72px;
  }

  .hero h2 {
    margin-top: 25px;
    font-size: 22px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-actions a {
    min-width: 0;
    padding-inline: 11px;
    white-space: nowrap;
  }

  .route-ticket,
  .hero-thread {
    display: none;
  }

  .story-section,
  .characters-section,
  .choice-section,
  .gallery-section,
  .endings-section,
  .reviews-section,
  .faq-section {
    padding-block: 76px;
  }

  .paper-hole {
    display: none;
  }

  .story-route {
    grid-template-columns: repeat(4, 150px);
    overflow-x: auto;
    padding-top: 8px;
    scroll-snap-type: x proximity;
  }

  .story-route button {
    min-width: 150px;
    scroll-snap-align: start;
  }

  .story-feedback {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .game-facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .character-cards {
    grid-template-columns: repeat(3, 78vw);
    align-items: start;
    overflow-x: auto;
    padding: 4px 4px 35px;
    scroll-snap-type: x mandatory;
  }

  .character-card,
  .character-card:nth-child(1),
  .character-card:nth-child(2),
  .character-card:nth-child(3) {
    min-width: 78vw;
    transform: none;
    scroll-snap-align: start;
  }

  .character-card > div {
    height: 355px;
  }

  .character-stage::before {
    display: none;
  }

  .character-note {
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 14px;
  }

  .character-note p {
    grid-column: 1 / -1;
  }

  .branch-board {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .branch-origin::after,
  .branch-options button::before,
  .branch-options button::after {
    display: none;
  }

  .branch-options,
  .branch-results {
    grid-template-columns: repeat(4, 142px);
    overflow-x: auto;
    padding: 0 0 8px;
  }

  .branch-options button,
  .branch-results span {
    min-width: 142px;
  }

  .gallery-track {
    width: calc(100% - 28px);
    gap: 14px;
    padding-bottom: 14px;
  }

  .gallery-track figure {
    flex-basis: 86vw;
  }

  .ending-map {
    grid-template-columns: repeat(5, 130px);
    gap: 20px;
    margin-top: 45px;
    padding-inline: 28px;
    scroll-snap-type: x proximity;
  }

  .ending-map button {
    width: 105px;
    height: 105px;
    scroll-snap-align: center;
  }

  .ending-note {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .reviews-content,
  .review-form {
    padding: 24px 20px;
  }

  .reviews-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-toolbar {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .review-toolbar button {
    white-space: nowrap;
  }

  .review-list {
    grid-template-columns: 1fr;
  }

  .faq-grid {
    gap: 40px;
  }

  .faq-item > button {
    min-height: 68px;
  }

  .faq-item > button span {
    gap: 13px;
    padding-right: 10px;
  }

  .faq-answer {
    padding-left: 32px;
  }

  .download-section,
  .download-inner {
    min-height: 620px;
  }

  .download-inner {
    gap: 48px;
  }

  .download-links {
    width: 100%;
  }

  .footer-inner {
    align-items: center;
    flex-direction: column;
  }

  .footer-inner p {
    margin: 0;
    text-align: center;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  * {
    scroll-behavior: auto !important;
  }
}
