.desk-icon[hidden] { display: none; }

.story-layer {
  --story-bg: #F8F4EC;
  --story-paper: #FFFDF8;
  --story-ink: #2B2422;
  --story-muted: #7A6A63;
  --story-wine: #6E2B35;
  --story-wine-2: #8C3A47;
  --story-line: #E2D6C6;
  --story-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  position: fixed;
  inset: 0;
  z-index: 300;
  overflow: auto;
  background:
    radial-gradient(circle at 50% 0%, rgba(140, 58, 71, .08), transparent 55%),
    var(--story-bg);
  color: var(--story-ink);
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

.story-layer.is-start,
.story-layer.is-intro,
.story-layer.is-ending,
.story-layer.is-result,
.story-layer.is-accuse,
.story-layer.is-final {
  display: grid;
  place-items: center;
  padding: 42px 24px;
}

.story-layer.is-prompt {
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(30, 20, 18, .55);
  backdrop-filter: blur(6px);
}

.story-figure {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--story-line);
  background: #EFE8DC;
}

.story-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.story-ph {
  display: none;
  padding: 70px 20px;
  color: var(--story-muted);
  font-size: 12px;
  letter-spacing: .12em;
}
.story-ph.is-shown { display: block; }

.story-layer.is-start { align-content: center; }
.story-layer.is-start .story-figure {
  width: min(760px, 86vw);
  height: min(42vh, 380px);
  margin-bottom: 34px;
}
.story-layer.is-start .story-ph { padding: 120px 20px; }

.story-title {
  margin: 0;
  font-family: var(--story-serif);
  font-size: clamp(38px, 6vw, 74px);
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--story-wine);
  text-align: center;
}

.story-start-lines {
  margin: 24px 0 34px;
  text-align: center;
}
.story-start-lines p {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: .06em;
  color: var(--story-muted);
}

.story-main-btn,
.story-btn {
  cursor: pointer;
  border: 1px solid var(--story-wine);
  border-radius: 2px;
  padding: 12px 42px;
  background: var(--story-wine);
  color: #FFF8EF;
  font-size: 14px;
  letter-spacing: .18em;
  transition: background .2s ease, color .2s ease;
}
.story-main-btn:hover,
.story-btn.primary:hover { background: var(--story-wine-2); border-color: var(--story-wine-2); }
.story-btn.ghost { background: transparent; color: var(--story-wine); }
.story-btn.ghost:hover { background: rgba(110, 43, 53, .06); }

.story-layer.is-intro { align-content: center; }
.story-card {
  width: min(720px, 88vw);
  min-height: 300px;
  padding: 64px 52px 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--story-paper);
  border: 1px solid var(--story-line);
  box-shadow: 0 26px 70px rgba(74, 56, 44, .13);
}
.story-type {
  margin: 0;
  white-space: pre-line;
  text-align: center;
  font-family: var(--story-serif);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 2.3;
  letter-spacing: .06em;
}
.story-hint {
  margin: 34px 0 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--story-muted);
  animation: story-hint 2.4s ease-in-out infinite;
}
@keyframes story-hint { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }

.story-layer.is-ending { align-content: center; }
.story-ending-stage {
  width: min(780px, 90vw);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.story-ending-stage .story-figure {
  width: min(620px, 84vw);
  height: min(34vh, 310px);
  margin-bottom: 34px;
}
.story-ending-stage .story-ph { padding: 100px 20px; }
.story-layer.is-ending .story-type {
  max-width: 720px;
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 2.15;
}
.story-layer.is-ending .story-hint { margin-top: 26px; }

.story-prompt-card {
  width: min(560px, 92vw);
  padding: 46px 42px 38px;
  background: var(--story-paper);
  border: 1px solid var(--story-line);
  box-shadow: 0 30px 90px rgba(30, 20, 18, .35);
  text-align: center;
}
.story-kicker {
  margin: 0 0 16px;
  font-size: 11px;
  letter-spacing: .34em;
  color: var(--story-wine);
}
.story-prompt-card h2,
.story-heading {
  margin: 0;
  font-family: var(--story-serif);
  font-size: clamp(20px, 2.4vw, 27px);
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: .04em;
}
.story-actions {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  gap: 14px;
}

.story-layer.is-accuse { align-content: center; }
.story-heading { margin-bottom: 38px; text-align: center; }
.story-suspects {
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
}
.story-suspect {
  width: 210px;
  padding: 0 0 18px;
  background: var(--story-paper);
  border: 1px solid var(--story-line);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.story-suspect:hover {
  transform: translateY(-4px);
  border-color: var(--story-wine);
  box-shadow: 0 18px 34px rgba(74, 56, 44, .18);
}
.story-suspect .story-figure {
  width: 100%;
  height: 230px;
  border: 0;
  border-bottom: 1px solid var(--story-line);
}
.story-suspect .story-ph { padding: 100px 0; }
.story-suspect strong {
  display: block;
  margin-top: 16px;
  font-family: var(--story-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--story-ink);
}

.story-layer.is-result { align-content: center; text-align: center; }
.story-result-card {
  width: min(620px, 90vw);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.story-mark {
  margin: 0 0 26px;
  font-family: var(--story-serif);
  font-size: clamp(58px, 10vw, 104px);
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1;
}
.story-mark.perfect { color: var(--story-wine); }
.story-mark.wrong { color: #3A2D2A; }
.story-result-line {
  margin: 0 0 12px;
  font-family: var(--story-serif);
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: .18em;
}
.story-result-sub {
  margin: 4px 0;
  font-size: 14px;
  letter-spacing: .1em;
  color: var(--story-muted);
}
.story-result-card .story-btn { margin-top: 38px; }

.story-layer.is-final { align-content: start; }
.story-final {
  width: min(820px, 92vw);
  padding: 30px 0 60px;
}
.story-final-title {
  margin: 0;
  font-family: var(--story-serif);
  font-size: clamp(56px, 9vw, 96px);
  font-weight: 600;
  letter-spacing: .3em;
  text-align: center;
  color: var(--story-wine);
}
.story-final-sub {
  margin: 18px 0 26px;
  text-align: center;
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--story-muted);
}
.story-archive { border-top: 1px solid var(--story-line); }
.story-archive-item { border-bottom: 1px solid var(--story-line); }
.story-archive-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 6px;
  cursor: pointer;
  list-style: none;
}
.story-archive-item summary::-webkit-details-marker { display: none; }
.story-archive-item summary strong {
  font-family: var(--story-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .08em;
}
.story-archive-item summary span {
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--story-muted);
}
.story-archive-body { padding: 4px 6px 22px; }
.story-archive-body .story-figure {
  width: min(360px, 80%);
  height: 210px;
  margin-bottom: 16px;
}
.story-archive-body .story-ph { padding: 88px 0; }
.story-archive-text {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--story-ink);
}
.story-archive-note {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--story-wine);
}
.story-archive-dialogue p {
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--story-muted);
}
.story-archive-dialogue strong { color: var(--story-ink); font-weight: 500; }
.story-final .story-main-btn {
  display: block;
  margin: 38px auto 0;
}

@media (max-width: 760px) {
  .story-layer.is-start,
  .story-layer.is-intro,
  .story-layer.is-ending,
  .story-layer.is-result,
  .story-layer.is-accuse,
  .story-layer.is-final { padding: 26px 16px; }
  .story-layer.is-start .story-figure { height: 30vh; margin-bottom: 24px; }
  .story-title { letter-spacing: .1em; }
  .story-card { padding: 44px 24px 34px; min-height: 260px; }
  .story-ending-stage .story-figure { height: 28vh; margin-bottom: 24px; }
  .story-suspects { gap: 12px; }
  .story-suspect { width: calc(50% - 6px); }
  .story-suspect:last-child { width: 100%; display: flex; align-items: center; gap: 14px; padding: 10px; }
  .story-suspect:last-child .story-figure { width: 110px; height: 110px; flex: 0 0 auto; border: 1px solid var(--story-line); }
  .story-suspect .story-figure { height: 180px; }
  .story-suspect strong { margin-top: 12px; }
  .story-suspect:last-child strong { margin-top: 0; }
  .story-actions { flex-direction: column; align-items: stretch; }
  .story-prompt-card { padding: 34px 22px 28px; }
  .story-final { padding-bottom: 40px; }
  .story-final-title { letter-spacing: .18em; }
}

.story-note {
  width: min(420px, 86%);
  margin: 4px 0 18px;
  padding: 22px 26px;
  background: #FFFDF8;
  border: 1px solid #E2D6C6;
  box-shadow: 0 12px 28px rgba(82, 30, 38, .12);
  transform: rotate(-.5deg);
}
.story-note p {
  margin: 8px 0;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 15px;
  line-height: 1.9;
  color: #2B2422;
}