:root {
  --ink: #17191c;
  --paper: #f4f2ec;
  --paper-strong: #fffef9;
  --line: #c9c6bc;
  --muted: #686a68;
  --signal: #e0432f;
  --acid: #d7ef61;
  --mint: #8fd8c7;
  --amber: #e5a84a;
  --blue: #4d79aa;
  --black: #0b0c0e;
  --shadow: 0 18px 48px rgba(16, 18, 19, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--black);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--acid);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.intro {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: white;
  background-color: #161719;
  background-image: url("assets/exhibition-hall.jpg");
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.intro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(6, 8, 10, 0.66);
}

.intro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.15;
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.16) 4px
  );
  pointer-events: none;
}

.intro-topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 5vw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-weight: 800;
}

.wordmark span {
  color: var(--acid);
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.incident-tag {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.76);
  font-family: Consolas, monospace;
  font-size: 12px;
}

.incident-tag::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--signal);
  animation: pulse 1.4s infinite;
}

.intro-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(320px, 1.2fr);
  align-items: center;
  gap: 5vw;
  width: min(1400px, 90vw);
  min-height: calc(100svh - 72px);
  margin: 0 auto;
  padding: 52px 0 72px;
}

.intro-copy {
  align-self: end;
  padding-bottom: 6vh;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--acid);
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: currentColor;
}

.intro h1 {
  max-width: 6em;
  margin: 0;
  font-family: SimHei, "Microsoft YaHei", sans-serif;
  font-size: 76px;
  line-height: 0.98;
  font-weight: 900;
}

.intro-lead {
  max-width: 510px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.9;
}

.knock-copy {
  margin: 25px 0 30px;
  color: white;
  font-family: Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  word-spacing: 16px;
}

.primary-action,
.secondary-action,
.dark-action,
.ghost-action {
  min-height: 46px;
  border: 0;
  border-radius: 4px;
  padding: 0 20px;
  font-weight: 800;
}

.primary-action {
  color: var(--ink);
  background: var(--acid);
}

.primary-action:hover {
  background: white;
}

.secondary-action {
  color: white;
  background: var(--signal);
}

.dark-action {
  color: white;
  background: var(--ink);
}

.ghost-action {
  border: 1px solid currentColor;
  color: inherit;
  background: transparent;
}

.door-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 640px;
}

.door-stage::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 74px;
  left: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.36);
}

.door-wrap {
  position: relative;
  width: 300px;
  height: 500px;
  filter: drop-shadow(0 34px 24px rgba(0, 0, 0, 0.62));
}

.door-frame {
  position: absolute;
  inset: 0;
  border: 12px solid #e9e5d8;
  border-bottom-width: 6px;
  background: #0e0f10;
}

.door-panel {
  position: absolute;
  inset: 20px 18px 8px;
  overflow: hidden;
  border: 1px solid #8f8d84;
  background: #212326;
  transition: opacity 300ms ease, transform 450ms ease;
}

.door-panel::before,
.door-panel::after {
  content: "";
  position: absolute;
  right: 32px;
  left: 32px;
  border: 2px solid #3b3e43;
}

.door-panel::before {
  top: 40px;
  height: 145px;
}

.door-panel::after {
  bottom: 36px;
  height: 182px;
}

.door-handle {
  position: absolute;
  z-index: 2;
  top: 52%;
  right: 34px;
  width: 50px;
  height: 9px;
  background: var(--acid);
  box-shadow: 0 0 20px rgba(215, 239, 97, 0.5);
}

.door-handle::after {
  content: "";
  position: absolute;
  top: -8px;
  right: -5px;
  width: 18px;
  height: 24px;
  border: 3px solid var(--acid);
}

.knock-mark {
  position: absolute;
  z-index: 3;
  top: 29%;
  left: -54px;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border: 1px solid rgba(215, 239, 97, 0.7);
  border-radius: 50%;
  color: var(--acid);
  font-family: Consolas, monospace;
  font-size: 12px;
  animation: knockRing 1.8s infinite;
}

.door-caption {
  position: absolute;
  right: -92px;
  bottom: -38px;
  color: rgba(255, 255, 255, 0.6);
  font-family: Consolas, monospace;
  font-size: 11px;
  writing-mode: vertical-rl;
}

.door-wrap.is-ghost .door-panel {
  opacity: 0.22;
  transform: translateX(8px) skewY(-1deg);
}

.door-wrap.is-ghost::after {
  content: "SIGNAL LOST / NO COLLISION";
  position: absolute;
  top: 46%;
  left: -44px;
  width: calc(100% + 88px);
  padding: 10px;
  color: var(--ink);
  background: var(--acid);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.reveal-note {
  max-width: 530px;
  margin-top: 30px;
  padding-left: 20px;
  border-left: 3px solid var(--signal);
  color: white;
  font-size: 16px;
  line-height: 1.8;
}

.reveal-note strong {
  color: var(--acid);
}

.archive-app {
  min-height: 100svh;
  background: #e6e5de;
}

.archive-header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  min-height: 68px;
  padding: 0 32px;
  color: white;
  background: var(--ink);
}

.archive-brand {
  font-weight: 900;
}

.archive-brand span {
  margin-left: 12px;
  color: var(--mint);
  font-family: Consolas, monospace;
  font-size: 11px;
}

.case-id {
  color: rgba(255, 255, 255, 0.58);
  font-family: Consolas, monospace;
  font-size: 11px;
}

.header-actions {
  justify-self: end;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  color: white;
  background: transparent;
  font-size: 18px;
}

.timeline {
  display: flex;
  align-items: stretch;
  min-height: 74px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: var(--paper-strong);
}

.timeline-step {
  position: relative;
  flex: 1 0 128px;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  font-family: Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
}

.timeline-step::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: transparent;
}

.timeline-step.active {
  color: var(--ink);
  background: var(--acid);
}

.timeline-step.active::before {
  background: var(--signal);
}

.timeline-step.locked {
  cursor: not-allowed;
  opacity: 0.36;
}

.timeline-step small {
  display: block;
  margin-top: 5px;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 10px;
  font-weight: 400;
}

.archive-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0;
  width: min(1480px, 100%);
  min-height: calc(100svh - 142px);
  margin: 0 auto;
}

.chapter {
  min-width: 0;
  padding: 48px 46px 80px;
}

.chapter-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.chapter-index {
  margin: 0 0 8px;
  color: var(--signal);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.chapter h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.15;
}

.chapter-intro {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.evidence-panel {
  padding: 32px 24px;
  border-left: 1px solid var(--line);
  background: var(--paper-strong);
}

.evidence-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.evidence-title span {
  color: var(--signal);
  font-family: Consolas, monospace;
}

.evidence-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.evidence-item {
  position: relative;
  padding: 14px 12px 14px 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
}

.evidence-item::before {
  content: attr(data-no);
  position: absolute;
  top: 14px;
  left: 12px;
  color: var(--signal);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.evidence-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
}

.evidence-item p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.empty-evidence {
  padding: 22px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.evidence-foot {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 10px;
  line-height: 1.7;
}

.qq-window {
  overflow: hidden;
  border: 1px solid #a9b3be;
  border-radius: 6px;
  background: #eef3f7;
  box-shadow: var(--shadow);
}

.qq-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 15px;
  color: white;
  background: #4a77a3;
  font-size: 12px;
}

.window-dots {
  color: rgba(255, 255, 255, 0.68);
  font-family: Consolas, monospace;
}

.qq-searchbar {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 70px;
  padding: 12px 16px;
  border-bottom: 1px solid #ccd5dd;
  background: white;
}

.qq-searchbar span {
  color: #7290aa;
  font-size: 20px;
}

.qq-searchbar input {
  width: 100%;
  min-height: 42px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
}

.year-filter {
  padding: 7px 10px;
  border: 1px solid #c4cfd8;
  border-radius: 3px;
  color: #4a6074;
  background: #eef3f7;
  font-family: Consolas, monospace;
  font-size: 11px;
}

.qq-body {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 420px;
}

.qq-index {
  padding: 24px 16px;
  border-right: 1px solid #ccd5dd;
  background: #e2eaf1;
}

.qq-index h3 {
  margin: 0 0 15px;
  color: #5f7182;
  font-size: 11px;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-chip {
  border: 1px solid #b8c8d6;
  border-radius: 4px;
  padding: 7px 9px;
  color: #385876;
  background: white;
  font-size: 11px;
}

.qq-index-note {
  margin-top: 28px;
  color: #718393;
  font-size: 10px;
  line-height: 1.7;
}

.search-results {
  padding: 22px;
  background: #f7fafc;
}

.search-empty {
  display: grid;
  place-items: center;
  min-height: 330px;
  color: #718393;
  text-align: center;
}

.search-empty strong {
  display: block;
  margin-bottom: 9px;
  color: #43576a;
}

.result-count {
  margin: 0 0 14px;
  color: #708292;
  font-size: 11px;
}

.message-result {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  margin-bottom: 10px;
  border: 1px solid #d5dee5;
  border-radius: 4px;
  padding: 13px;
  color: var(--ink);
  background: white;
  text-align: left;
}

.message-result:hover {
  border-color: #4a77a3;
  background: #f3f8fc;
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: white;
  background: var(--blue);
  font-weight: 900;
}

.message-result strong {
  display: block;
  margin-bottom: 6px;
  color: #375a79;
  font-size: 12px;
}

.message-result p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.message-result time {
  color: #8998a4;
  font-family: Consolas, monospace;
  font-size: 10px;
}

mark {
  padding: 1px 2px;
  color: inherit;
  background: #fff0a4;
}

.chat-context {
  padding: 18px;
  border-top: 1px solid #cbd5dd;
  background: white;
}

.chat-log {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.chat-line {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.chat-line .avatar {
  width: 34px;
  height: 34px;
  font-size: 11px;
}

.bubble {
  width: fit-content;
  max-width: 78%;
  border-radius: 4px;
  padding: 9px 12px;
  background: #e8f1f8;
  font-size: 12px;
  line-height: 1.6;
}

.attachment {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(440px, 100%);
  border: 1px solid #b8c5ce;
  border-radius: 4px;
  padding: 12px;
  background: #f6f8fa;
  text-align: left;
}

.attachment-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 50px;
  color: white;
  background: var(--signal);
  font-family: Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
}

.attachment strong,
.attachment small {
  display: block;
}

.attachment small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.attachment-arrow {
  font-size: 18px;
}

.file-tool {
  border: 1px solid #2d3136;
  border-radius: 5px;
  background: #f8f8f6;
  box-shadow: var(--shadow);
}

.tool-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  color: white;
  background: #24282d;
  font-family: Consolas, monospace;
  font-size: 11px;
}

.path-bar {
  padding: 12px 16px;
  border-bottom: 1px solid #d2d1cc;
  color: #555;
  background: #ecebe7;
  font-family: Consolas, monospace;
  font-size: 11px;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 24px;
}

.file-item {
  position: relative;
  min-height: 180px;
  border: 1px solid #cbc9c1;
  border-radius: 4px;
  padding: 18px;
  color: var(--ink);
  background: white;
  text-align: left;
}

.file-item:hover {
  border-color: var(--signal);
}

.file-item.selected {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--acid);
}

.file-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 54px;
  margin-bottom: 20px;
  color: white;
  background: var(--blue);
  font-family: Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
}

.file-item strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.5;
}

.file-meta {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 10px;
  line-height: 1.6;
}

.sequence-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 14px 24px;
  border-top: 1px solid #d2d1cc;
  background: #ecebe7;
}

.sequence-slot {
  display: grid;
  place-items: center;
  width: 48px;
  height: 38px;
  border: 1px dashed #99978f;
  color: #77746c;
  background: white;
  font-family: Consolas, monospace;
  font-size: 10px;
}

.sequence-slot.filled {
  border-style: solid;
  color: white;
  background: var(--ink);
}

.sequence-status {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.recovered-note {
  margin: 22px 24px 24px;
  padding: 20px;
  border-left: 5px solid var(--signal);
  background: #fff8d7;
}

.recovered-note strong {
  display: block;
  margin-bottom: 8px;
}

.recovered-note p {
  margin: 0 0 16px;
  color: #5d5a50;
  font-size: 13px;
  line-height: 1.8;
}

.web-archive {
  overflow: hidden;
  border: 1px solid #2a2d2f;
  border-radius: 5px;
  box-shadow: var(--shadow);
}

.browser-chrome {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 0 16px;
  color: white;
  background: #25282b;
}

.browser-nav {
  font-family: Consolas, monospace;
  font-size: 13px;
  word-spacing: 8px;
}

.address-bar {
  min-width: 0;
  overflow: hidden;
  border-radius: 3px;
  padding: 8px 12px;
  color: #bec1c3;
  background: #3d4145;
  font-family: Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snapshot-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 16px;
  background: var(--mint);
}

.snapshot-bar strong {
  margin-right: auto;
  font-family: Consolas, monospace;
  font-size: 11px;
  white-space: nowrap;
}

.snapshot-date {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 3px;
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.snapshot-date.active {
  color: white;
  background: var(--ink);
}

.archive-page {
  display: grid;
  min-height: 420px;
  place-items: center;
  padding: 42px;
  background: #f9f5e8;
}

.error-page {
  max-width: 500px;
  text-align: center;
}

.error-code {
  margin: 0;
  color: var(--signal);
  font-family: Consolas, monospace;
  font-size: 70px;
  font-weight: 900;
}

.error-page h2 {
  margin: 8px 0 12px;
}

.error-page p {
  color: var(--muted);
  line-height: 1.8;
}

.restored-page {
  width: min(680px, 100%);
  border: 4px double var(--ink);
  padding: 30px;
  background: #fffdf5;
}

.retro-logo {
  display: inline-block;
  margin-bottom: 22px;
  padding: 8px 12px;
  color: white;
  background: var(--signal);
  font-family: SimHei, sans-serif;
  font-weight: 900;
}

.restored-page h2 {
  margin: 0 0 12px;
}

.message-board {
  margin: 24px 0;
  padding: 16px;
  border: 1px dashed #8e8b82;
  background: #f2efdf;
  font-size: 12px;
  line-height: 1.8;
}

.map-terminal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  overflow: hidden;
  border: 1px solid #222;
  border-radius: 5px;
  color: white;
  background: #111416;
  box-shadow: var(--shadow);
}

.map-view {
  position: relative;
  min-height: 490px;
  padding: 24px;
  background-image: linear-gradient(rgba(143, 216, 199, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 216, 199, 0.1) 1px, transparent 1px);
  background-size: 32px 32px;
}

.map-label {
  color: var(--mint);
  font-family: Consolas, monospace;
  font-size: 11px;
}

.floor-plan {
  position: absolute;
  inset: 72px 56px 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
  border: 2px solid var(--mint);
  padding: 18px;
}

.booth {
  display: grid;
  place-items: center;
  border: 1px solid rgba(143, 216, 199, 0.5);
  color: rgba(255, 255, 255, 0.46);
  font-family: Consolas, monospace;
  font-size: 9px;
}

.map-void {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid var(--signal);
  border-radius: 50%;
  color: white;
  background: rgba(224, 67, 47, 0.2);
  transform: translate(-50%, -50%);
  animation: pulseRing 1.6s infinite;
}

.map-void.found {
  color: var(--ink);
  background: var(--acid);
  animation: none;
}

.terminal-side {
  padding: 24px 18px;
  border-left: 1px solid #3c4448;
  background: #1b1f22;
}

.terminal-side h3 {
  margin: 0 0 22px;
  color: var(--acid);
  font-family: Consolas, monospace;
  font-size: 12px;
}

.terminal-reading {
  margin-bottom: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #343a3d;
  color: #aeb6ba;
  font-family: Consolas, monospace;
  font-size: 10px;
  line-height: 1.7;
}

.terminal-reading strong {
  display: block;
  color: white;
}

.terminal-alert {
  margin: 20px 0;
  padding: 13px;
  color: var(--ink);
  background: var(--acid);
  font-size: 11px;
  line-height: 1.7;
}

.player-shell {
  overflow: hidden;
  border: 1px solid #252525;
  border-radius: 5px;
  color: white;
  background: #121212;
  box-shadow: var(--shadow);
}

.player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid #303030;
  font-size: 12px;
}

.live-mark {
  padding: 5px 8px;
  color: white;
  background: var(--signal);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.player-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
}

.video-frame {
  position: relative;
  display: grid;
  min-height: 380px;
  place-items: center;
  overflow: hidden;
  background: #202225;
}

.video-room {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #282b2f 0 66%, #16181b 66%);
}

.video-room::before {
  content: "";
  position: absolute;
  right: 10%;
  bottom: 0;
  width: 22%;
  height: 76%;
  border: 8px solid #5b5e61;
  border-bottom: 0;
  background: #0d0e0f;
}

.video-room::after {
  content: "";
  position: absolute;
  bottom: 12%;
  left: 8%;
  width: 36%;
  height: 5px;
  background: #676b70;
  box-shadow: 0 -8px 0 #2f3236, 0 8px 0 #17191b;
}

.video-timecode {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 7px 9px;
  color: var(--acid);
  background: rgba(0, 0, 0, 0.72);
  font-family: Consolas, monospace;
  font-size: 11px;
}

.subtitle {
  position: relative;
  z-index: 2;
  max-width: 78%;
  margin-top: auto;
  margin-bottom: 38px;
  padding: 10px 14px;
  color: white;
  background: rgba(0, 0, 0, 0.74);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.danmaku-panel {
  padding: 18px;
  border-left: 1px solid #303030;
  background: #181818;
}

.danmaku-panel h3 {
  margin: 0 0 18px;
  color: #aaa;
  font-size: 11px;
}

.danmaku {
  margin-bottom: 13px;
  font-size: 11px;
  line-height: 1.6;
}

.danmaku span {
  margin-right: 8px;
  color: var(--mint);
  font-family: Consolas, monospace;
}

.player-controls {
  padding: 18px;
  border-top: 1px solid #303030;
}

.waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 42px;
  margin-bottom: 8px;
  overflow: hidden;
}

.waveform i {
  flex: 1;
  min-width: 2px;
  height: var(--h);
  background: #575b5e;
}

.waveform i.hot {
  background: var(--signal);
}

.scrubber {
  width: 100%;
  accent-color: var(--acid);
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
}

.control-time {
  font-family: Consolas, monospace;
  font-size: 11px;
}

.final-stage {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border-radius: 5px;
  color: white;
  background: #151719;
  box-shadow: var(--shadow);
}

.final-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image: url("assets/exhibition-hall.jpg");
  background-position: center;
  background-size: cover;
}

.final-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  align-items: center;
  min-height: 620px;
}

.final-door-area {
  display: grid;
  place-items: center;
  min-height: 620px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.final-door {
  position: relative;
  width: 190px;
  height: 330px;
  border: 9px solid #e9e5d8;
  background: #24272a;
  box-shadow: 0 28px 40px rgba(0, 0, 0, 0.6);
  transition: transform 800ms ease, box-shadow 800ms ease;
  transform-origin: left center;
}

.final-door::after {
  content: "";
  position: absolute;
  top: 51%;
  right: 18px;
  width: 26px;
  height: 7px;
  background: var(--acid);
}

.final-stage.complete .final-door {
  box-shadow: 60px 0 90px rgba(215, 239, 97, 0.32);
  transform: perspective(700px) rotateY(-72deg);
}

.origin-form {
  padding: 48px;
}

.origin-form h2 {
  margin: 0 0 12px;
  font-size: 30px;
}

.origin-form > p {
  max-width: 480px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  line-height: 1.8;
}

.form-field {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.form-field label {
  color: var(--mint);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.form-field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #54585b;
  border-radius: 4px;
  padding: 0 12px;
  color: white;
  background: #292c2f;
}

.form-error {
  min-height: 22px;
  margin: 10px 0;
  color: #ff806e;
  font-size: 12px;
}

.ending-copy {
  max-width: 440px;
  padding: 52px;
}

.ending-copy .ending-time {
  color: var(--acid);
  font-family: Consolas, monospace;
  font-size: 12px;
}

.ending-copy h2 {
  margin: 16px 0 20px;
  font-size: 42px;
}

.ending-copy blockquote {
  margin: 0 0 25px;
  padding-left: 18px;
  border-left: 3px solid var(--signal);
  font-size: 18px;
  line-height: 1.8;
}

.ending-copy p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.9;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  border-left: 5px solid var(--acid);
  border-radius: 4px;
  padding: 14px 18px;
  color: white;
  background: var(--ink);
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.6;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

@keyframes knockRing {
  0%,
  45%,
  100% {
    opacity: 0.35;
    transform: scale(0.86);
  }
  10%,
  30% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulseRing {
  50% {
    box-shadow: 0 0 0 18px rgba(224, 67, 47, 0);
  }
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(224, 67, 47, 0.45);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .intro-layout {
    grid-template-columns: 1fr 0.8fr;
  }

  .intro h1 {
    font-size: 58px;
  }

  .door-wrap {
    width: 230px;
    height: 390px;
  }

  .door-stage {
    min-height: 520px;
  }

  .archive-shell {
    grid-template-columns: 1fr;
  }

  .evidence-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .evidence-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-terminal,
  .player-grid {
    grid-template-columns: 1fr;
  }

  .terminal-side,
  .danmaku-panel {
    border-top: 1px solid #3c4448;
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .intro-topbar {
    min-height: 60px;
    padding: 0 18px;
  }

  .incident-tag {
    display: none;
  }

  .intro-layout {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0;
    width: 100%;
    padding: 20px 20px 44px;
  }

  .door-stage {
    grid-row: 1;
    min-height: 390px;
  }

  .door-wrap {
    width: 180px;
    height: 310px;
  }

  .door-caption {
    display: none;
  }

  .knock-mark {
    left: -36px;
    width: 74px;
    height: 74px;
  }

  .intro-copy {
    padding: 10px 0 0;
  }

  .intro h1 {
    font-size: 48px;
  }

  .intro-lead {
    margin-top: 18px;
    font-size: 14px;
  }

  .archive-header {
    grid-template-columns: 1fr auto;
    min-height: 62px;
    padding: 0 16px;
  }

  .case-id {
    display: none;
  }

  .archive-brand span {
    display: none;
  }

  .timeline {
    min-height: 64px;
  }

  .timeline-step {
    flex-basis: 106px;
  }

  .chapter {
    padding: 32px 16px 56px;
  }

  .chapter-head {
    align-items: start;
    flex-direction: column;
    margin-bottom: 22px;
  }

  .chapter h1 {
    font-size: 30px;
  }

  .qq-body {
    grid-template-columns: 1fr;
  }

  .qq-index {
    border-right: 0;
    border-bottom: 1px solid #ccd5dd;
    padding: 14px;
  }

  .qq-index-note {
    display: none;
  }

  .qq-searchbar {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .year-filter {
    display: none;
  }

  .search-results {
    padding: 14px;
  }

  .message-result {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .message-result time {
    grid-column: 2;
  }

  .file-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .file-item {
    min-height: 132px;
  }

  .file-badge {
    margin-bottom: 10px;
  }

  .sequence-strip {
    flex-wrap: wrap;
    padding: 14px 16px;
  }

  .sequence-status {
    width: 100%;
    margin-left: 0;
  }

  .archive-page {
    min-height: 390px;
    padding: 20px;
  }

  .snapshot-bar strong {
    display: none;
  }

  .map-view {
    min-height: 390px;
  }

  .floor-plan {
    inset: 64px 24px 36px;
  }

  .player-grid {
    display: block;
  }

  .video-frame {
    min-height: 300px;
  }

  .danmaku-panel {
    max-height: 180px;
    overflow-y: auto;
  }

  .control-row {
    align-items: stretch;
    flex-direction: column;
  }

  .final-grid {
    grid-template-columns: 1fr;
  }

  .final-door-area {
    min-height: 380px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  .origin-form,
  .ending-copy {
    padding: 32px 22px;
  }

  .form-field {
    grid-template-columns: 1fr;
    gap: 6px;
  }

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

/* 2019 archive: contemporary QQ desktop layout, adapted from the supplied reference. */
.qq-modern {
  border-color: #090909;
  color: #ededed;
  background: #202020;
}

.qq-modern .qq-titlebar {
  min-height: 58px;
  padding: 0 18px;
  color: #f4f4f4;
  background: #090909;
}

.qq-account,
.qq-system {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.qq-logo {
  color: #d2d2d2;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #6c6c6c;
  border-radius: 50%;
  color: #161616;
  background: var(--mint);
  font-size: 11px;
  font-weight: 900;
}

.qq-account strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-status {
  overflow: hidden;
  color: #a9a9a9;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qq-system {
  gap: 22px;
  color: #aaa;
  font-size: 11px;
}

.qq-modern .qq-body {
  display: grid;
  grid-template-columns: 64px 326px minmax(0, 1fr);
  min-height: 610px;
  background: #202020;
}

.qq-rail {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 9px;
  padding: 18px 10px 14px;
  border-right: 1px solid #353535;
  background: #1d1d1d;
}

.rail-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 4px;
  color: #aaa;
  background: transparent;
}

.rail-button:hover,
.rail-button.active {
  color: white;
  background: #303030;
}

.rail-button.active {
  color: #47a4ff;
}

.rail-button .fa-solid {
  width: 24px;
  font-size: 20px;
  text-align: center;
}

.rail-spacer {
  flex: 1;
}

.qq-list-panel {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid #393939;
  background: #202020;
}

.qq-modern .qq-searchbar {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 38px;
  min-height: 68px;
  padding: 12px 14px;
  border-bottom: 0;
  background: #202020;
}

.qq-modern .qq-searchbar > span {
  display: grid;
  place-items: center;
  height: 40px;
  border-radius: 6px 0 0 6px;
  color: #979797;
  background: #303030;
}

.qq-modern .qq-searchbar input {
  min-height: 40px;
  color: #eee;
  background: #303030;
  font-size: 13px;
}

.qq-modern .qq-searchbar input::placeholder {
  color: #aaa;
}

.search-add {
  width: 34px;
  height: 40px;
  margin-left: 6px;
  border: 0;
  border-radius: 6px;
  color: #aaa;
  background: #303030;
  font-size: 22px;
}

.qq-conversations {
  min-height: 0;
  overflow-y: auto;
}

.conversation {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 78px;
  border: 0;
  padding: 10px 14px;
  color: #efefef;
  background: transparent;
  text-align: left;
}

.conversation:hover,
.conversation.selected {
  background: #2c2c2c;
}

.chat-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #111;
  background: #d7d7d7;
  font-size: 15px;
  font-weight: 900;
}

.tone-cyan {
  background: var(--mint) !important;
}

.tone-amber {
  background: var(--amber) !important;
}

.tone-violet {
  color: white !important;
  background: #8b6ab8 !important;
}

.tone-red {
  color: white !important;
  background: var(--signal) !important;
}

.tone-green {
  background: var(--acid) !important;
}

.conversation-copy {
  min-width: 0;
}

.conversation-copy strong,
.conversation-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-copy strong {
  margin-bottom: 7px;
  font-size: 13px;
}

.conversation-copy small,
.conversation time {
  color: #929292;
  font-size: 10px;
}

.conversation time {
  align-self: start;
  padding-top: 5px;
  font-family: Consolas, monospace;
}

.qq-keywords {
  margin-top: auto;
  padding: 16px 14px 18px;
  border-top: 1px solid #343434;
  background: #1c1c1c;
}

.qq-keywords > span {
  display: block;
  margin-bottom: 10px;
  color: #777;
  font-size: 10px;
}

.qq-modern .keyword-chip {
  border-color: #444;
  color: #bbb;
  background: #292929;
}

.qq-modern .keyword-chip:hover {
  border-color: var(--mint);
  color: white;
}

.qq-main-panel {
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr);
  min-width: 0;
  background: #222;
}

.qq-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 22px;
  border-bottom: 1px solid #353535;
}

.qq-chat-header strong,
.qq-chat-header small {
  display: block;
}

.qq-chat-header strong {
  margin-bottom: 5px;
  font-size: 14px;
}

.qq-chat-header small {
  color: #777;
  font-size: 10px;
}

.qq-chat-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qq-chat-tools button {
  border: 0;
  color: #aaa;
  background: transparent;
  font-size: 16px;
}

.qq-modern .year-filter {
  border-color: #555;
  color: var(--mint);
  background: #292929;
}

.qq-chat-scroll {
  min-height: 0;
  overflow-y: auto;
}

.qq-modern .search-results {
  padding: 24px;
  background: #222;
}

.qq-modern .search-empty {
  min-height: 465px;
  color: #696969;
}

.qq-modern .search-empty::before {
  content: "QQ";
  display: block;
  margin: 0 auto 20px;
  color: #303030;
  font-family: Arial, sans-serif;
  font-size: 64px;
  font-weight: 900;
}

.qq-modern .search-empty strong {
  color: #888;
}

.qq-modern .result-count {
  color: #777;
}

.qq-modern .message-result {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  border-color: #3b3b3b;
  color: #ededed;
  background: #282828;
}

.qq-modern .message-result:hover {
  border-color: #5a5a5a;
  background: #303030;
}

.qq-modern .message-result strong {
  color: var(--mint);
}

.qq-modern .message-result time {
  color: #777;
}

.qq-modern mark {
  color: white;
  background: rgba(224, 67, 47, 0.68);
}

.qq-modern .chat-context {
  min-height: 542px;
  padding: 24px 28px 32px;
  border-top-color: #3a3a3a;
  background: #222;
}

.chat-date-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 0 26px;
  color: #686868;
  font-family: Consolas, monospace;
  font-size: 10px;
}

.chat-date-divider::before,
.chat-date-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #343434;
}

.qq-modern .chat-log {
  padding: 8px 0;
}

.qq-modern .bubble {
  color: #eee;
  background: #343434;
}

.qq-modern .chat-line:nth-child(3) .bubble,
.qq-modern .chat-line:nth-child(5) .bubble {
  color: #101010;
  background: var(--mint);
}

.qq-modern .attachment {
  border-color: #454545;
  color: #eee;
  background: #2c2c2c;
}

.qq-modern .attachment:hover {
  border-color: var(--mint);
}

.qq-modern .attachment small {
  color: #888;
}

@media (max-width: 1120px) {
  .qq-modern .qq-body {
    grid-template-columns: 58px 280px minmax(0, 1fr);
  }

  .conversation {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .chat-avatar {
    width: 44px;
    height: 44px;
  }

  .conversation time {
    display: none;
  }
}

@media (max-width: 720px) {
  .qq-modern .qq-titlebar {
    min-height: 52px;
    padding: 0 12px;
  }

  .account-status,
  .qq-system > span:first-child {
    display: none;
  }

  .qq-modern .qq-body {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .qq-rail {
    grid-column: 1;
    padding: 12px 5px;
  }

  .rail-button {
    width: 38px;
    height: 38px;
  }

  .qq-list-panel {
    grid-column: 2;
    border-right: 0;
  }

  .conversation:not(.selected) {
    display: none;
  }

  .qq-keywords {
    padding: 12px;
  }

  .qq-main-panel {
    grid-column: 1 / -1;
    min-height: 520px;
    border-top: 1px solid #3a3a3a;
  }

  .qq-modern .search-empty {
    min-height: 300px;
  }

  .qq-modern .chat-context {
    min-height: 452px;
    padding: 20px 14px 26px;
  }

  .qq-modern .message-result {
    grid-template-columns: 38px minmax(0, 1fr);
  }
}

/* Minimal door-first opening composition. */
.intro-minimal {
  display: grid;
  min-height: 100svh;
  place-items: center;
  background-position: center 46%;
}

.intro-minimal::before {
  background: rgba(7, 10, 13, 0.38);
}

.intro-minimal::after {
  display: none;
}

.minimal-stage {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
}

.minimal-stage::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 34%;
  background: rgba(7, 9, 12, 0.27);
  clip-path: polygon(37% 100%, 45% 0, 55% 0, 63% 100%);
}

.door-platform {
  position: absolute;
  z-index: 1;
  bottom: 14%;
  left: 50%;
  width: min(720px, 70vw);
  height: 130px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(13, 16, 20, 0.72);
  box-shadow: 0 38px 80px rgba(0, 0, 0, 0.5);
  clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%);
  transform: translateX(-50%);
}

.minimal-door-trigger {
  position: relative;
  z-index: 3;
  display: grid;
  width: 336px;
  height: 548px;
  margin-bottom: 7vh;
  border: 0;
  padding: 0;
  place-items: stretch;
  color: inherit;
  background: transparent;
  filter: drop-shadow(0 38px 34px rgba(0, 0, 0, 0.62));
}

.minimal-door-trigger .door-wrap {
  display: block;
  width: 100%;
  height: 100%;
  filter: none;
}

.minimal-door-trigger .door-frame {
  border-width: 11px;
  border-color: #e8e5da;
  background: #0c0e10;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 38px rgba(143, 216, 199, 0.12);
}

.minimal-door-trigger .door-panel {
  background: #1c1f22;
}

.minimal-door-trigger:hover .door-frame,
.minimal-door-trigger:focus-visible .door-frame {
  border-color: white;
  box-shadow: 0 0 0 1px white, 0 0 54px rgba(215, 239, 97, 0.34);
}

.minimal-door-trigger:focus-visible {
  outline: 0;
}

.minimal-door-trigger .door-handle {
  background: var(--acid);
}

.minimal-door-trigger .door-wrap:not(.is-ghost) .door-panel {
  animation: doorBreath 3.2s ease-in-out infinite;
}

.minimal-door-trigger .door-wrap.is-ghost::after {
  content: "无法触碰";
  top: 48%;
  left: 8%;
  width: 84%;
  padding: 8px 10px;
  font-size: 10px;
}

.minimal-entry-prompt {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 88px;
  padding: 14px 20px 22px;
  color: white;
  background: rgba(5, 7, 9, 0.68);
  text-align: center;
}

.minimal-entry-prompt p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.minimal-enter-button {
  min-width: 220px;
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.48);
  color: white;
  background: transparent;
  font-size: 15px;
  font-weight: 800;
}

.minimal-enter-button:hover {
  color: var(--acid);
  border-bottom-color: var(--acid);
}

.intro-minimal.has-touched-door::before {
  background: rgba(7, 10, 13, 0.56);
}

@keyframes doorBreath {
  0%,
  100% {
    box-shadow: inset 0 0 0 rgba(215, 239, 97, 0);
  }
  50% {
    box-shadow: inset 0 0 36px rgba(215, 239, 97, 0.08);
  }
}

@media (max-width: 720px) {
  .minimal-stage {
    align-items: center;
  }

  .minimal-door-trigger {
    width: 220px;
    height: 370px;
    margin-bottom: 10vh;
  }

  .door-platform {
    bottom: 18%;
    width: 92vw;
    height: 90px;
  }

  .minimal-entry-prompt {
    min-height: 82px;
    padding-bottom: 18px;
  }
}

/* Door-only opening: the object itself is the sole control. */
.door-only-intro::before {
  background: rgba(7, 10, 13, 0.3);
}

.door-only-intro .minimal-stage {
  align-items: end;
  padding-bottom: 10vh;
}

.door-only-intro .minimal-stage::before {
  display: none;
}

.door-only-intro .minimal-door-trigger {
  width: 318px;
  height: 536px;
  margin: 0;
  filter: none;
}

.portal-frame {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 8px solid #4d535d;
  border-radius: 48% 48% 5px 5px / 19% 19% 5px 5px;
  background: #171a20;
  box-shadow: inset 0 0 0 2px #20252c;
  transition: border-color 180ms ease, opacity 240ms ease, transform 240ms ease;
}

.portal-frame::before {
  content: "";
  position: absolute;
  inset: -15px;
  z-index: -1;
  border: 3px solid #242932;
  border-radius: 48% 48% 7px 7px / 20% 20% 7px 7px;
}

.portal-frame::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -7px;
  left: -18px;
  height: 12px;
  border: 2px solid #303640;
  background: #171a20;
}

.portal-inner {
  position: absolute;
  inset: 14px;
  overflow: hidden;
  border: 2px solid #626a75;
  border-radius: 48% 48% 2px 2px / 18% 18% 2px 2px;
  background: #11151b;
}

.portal-inner::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 8%;
  bottom: 5%;
  left: 50%;
  width: 1px;
  background: #515964;
  transform: translateX(-50%);
}

.portal-leaf {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: #171b22;
}

.portal-leaf-left {
  left: 0;
  border-right: 1px solid #0a0d11;
}

.portal-leaf-right {
  right: 0;
  border-left: 1px solid #2b3038;
}

.portal-ornament {
  position: absolute;
  top: 19%;
  width: 74%;
  height: 62%;
  border: 1px solid #414955;
  border-radius: 50% 50% 8px 8px / 15% 15% 8px 8px;
}

.portal-ornament::before,
.portal-ornament::after {
  content: "";
  position: absolute;
  left: 50%;
  border: 1px solid #38404a;
  transform: translateX(-50%) rotate(45deg);
}

.portal-ornament::before {
  top: 18%;
  width: 38px;
  height: 38px;
}

.portal-ornament::after {
  bottom: 18%;
  width: 54px;
  height: 54px;
}

.portal-leaf-left .portal-ornament {
  right: 8%;
  border-right: 0;
}

.portal-leaf-right .portal-ornament {
  left: 8%;
  border-left: 0;
}

.portal-medallion {
  position: absolute;
  z-index: 4;
  top: 49%;
  left: 50%;
  width: 38px;
  height: 38px;
  border: 2px solid #69727e;
  background: #171b22;
  transform: translate(-50%, -50%) rotate(45deg);
}

.portal-medallion::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid #7d8794;
  border-radius: 50%;
}

.minimal-door-trigger:hover .portal-frame,
.minimal-door-trigger:focus-visible .portal-frame {
  border-color: #8c96a3;
}

.minimal-door-trigger:hover .portal-inner,
.minimal-door-trigger:focus-visible .portal-inner {
  border-color: #8c96a3;
}

.portal-frame.is-ghost {
  opacity: 0.44;
  transform: translateX(4px);
}

.portal-frame.is-ghost::before {
  transform: translateX(-8px);
}

.minimal-door-message {
  position: absolute;
  z-index: 6;
  right: 20px;
  bottom: 22px;
  left: 20px;
  color: white;
  text-align: center;
  pointer-events: none;
}

.minimal-door-message p {
  margin: 0 0 6px;
  font-size: 13px;
}

.minimal-door-message small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.door-only-intro.has-touched-door::before {
  background: rgba(7, 10, 13, 0.44);
}

@media (max-width: 720px) {
  .door-only-intro .minimal-stage {
    padding-bottom: 15vh;
  }

  .door-only-intro .minimal-door-trigger {
    width: 218px;
    height: 370px;
    margin: 0;
  }

  .portal-frame::before {
    inset: -10px;
  }

  .portal-frame::after {
    right: -12px;
    left: -12px;
  }

  .minimal-door-message {
    bottom: 18px;
  }
}

/* Cinematic motion for the door scene. */
.door-only-intro {
  animation: ambientCamera 16s ease-in-out infinite alternate;
}

.ambient-particles {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-particles i {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  opacity: 0;
  background: rgba(232, 238, 225, 0.7);
  animation: particleDrift var(--duration) linear var(--delay) infinite;
}

.portal-frame:not(.is-ghost) {
  animation: portalArrival 900ms cubic-bezier(0.22, 0.78, 0.24, 1) both,
    portalKnock 5.2s ease-in-out 1.3s infinite;
}

.portal-inner {
  animation: doorSurfaceBreath 4.6s ease-in-out infinite;
}

.portal-medallion {
  animation: medallionBreath 2.8s ease-in-out infinite;
}

.portal-frame.is-ghost {
  animation: portalPhaseSlip 900ms ease-out both, portalGhostIdle 3.4s ease-in-out 900ms infinite;
}

.portal-frame.is-ghost .portal-inner {
  animation: none;
}

.minimal-door-message {
  animation: messageReveal 520ms ease-out 260ms both;
}

.archive-app {
  animation: archiveReveal 420ms ease-out both;
}

@keyframes ambientCamera {
  0% {
    background-position: 48% 46%;
  }
  100% {
    background-position: 52% 44%;
  }
}

@keyframes particleDrift {
  0% {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
  }
  14% {
    opacity: 0.45;
  }
  70% {
    opacity: 0.22;
  }
  100% {
    opacity: 0;
    transform: translate3d(18px, -120px, 0);
  }
}

@keyframes portalArrival {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes portalKnock {
  0%,
  70%,
  78%,
  100% {
    transform: translateX(0);
  }
  71% {
    transform: translateX(-2px);
  }
  72% {
    transform: translateX(3px);
  }
  73% {
    transform: translateX(-1px);
  }
  75% {
    transform: translateX(2px);
  }
  76% {
    transform: translateX(-1px);
  }
}

@keyframes doorSurfaceBreath {
  0%,
  100% {
    border-color: #626a75;
    background: #11151b;
  }
  50% {
    border-color: #75808d;
    background: #141920;
  }
}

@keyframes medallionBreath {
  0%,
  100% {
    border-color: #69727e;
  }
  50% {
    border-color: #a1adba;
  }
}

@keyframes portalPhaseSlip {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  18% {
    opacity: 0.18;
    transform: translateX(-12px);
  }
  34% {
    opacity: 0.76;
    transform: translateX(7px);
  }
  52% {
    opacity: 0.24;
    transform: translateX(-5px);
  }
  72% {
    opacity: 0.6;
    transform: translateX(6px);
  }
  100% {
    opacity: 0.44;
    transform: translateX(4px);
  }
}

@keyframes portalGhostIdle {
  0%,
  100% {
    opacity: 0.44;
  }
  50% {
    opacity: 0.31;
  }
}

@keyframes messageReveal {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes archiveReveal {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Story flow v2: date lock, QQ classified search, reverse timeline and endings. */
.date-lock-home .portal-frame.is-ghost {
  opacity: 0.72;
}

.knock-caption {
  position: absolute;
  z-index: 5;
  top: 48%;
  left: calc(50% + 190px);
  display: flex;
  gap: 8px;
  pointer-events: none;
}

.knock-caption i {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(215, 239, 97, 0.72);
  border-radius: 50%;
  opacity: 0;
  animation: knockDot 5.2s ease-in-out infinite;
}

.knock-caption i:nth-child(2) {
  animation-delay: 120ms;
}

.knock-caption i:nth-child(3) {
  animation-delay: 240ms;
}

.date-lock-modal {
  position: absolute;
  z-index: 20;
  top: 50%;
  left: 50%;
  width: min(560px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  padding: 34px;
  color: white;
  background: rgba(17, 20, 25, 0.96);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
  animation: modalEnter 300ms ease-out both;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  border: 0;
  place-items: center;
  color: #aaa;
  background: transparent;
  font-size: 22px;
}

.modal-close:hover {
  color: white;
}

.modal-kicker {
  margin: 0 0 12px;
  color: var(--acid);
  font-family: Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
}

.date-lock-modal h1 {
  margin: 0 0 14px;
  font-size: 29px;
}

.date-lock-modal > p:not(.modal-kicker) {
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.8;
}

.date-answer-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.date-answer-form label {
  position: relative;
}

.date-answer-form label span {
  position: absolute;
  top: 50%;
  right: 12px;
  color: #777;
  font-size: 11px;
  transform: translateY(-50%);
}

.date-answer-form input {
  width: 100%;
  height: 52px;
  border: 1px solid #4b5159;
  border-radius: 4px;
  padding: 0 34px 0 12px;
  color: white;
  background: #24282e;
  font-family: Consolas, monospace;
}

.date-answer-form input::-webkit-inner-spin-button {
  appearance: none;
}

.date-submit {
  grid-column: 1 / -1;
  min-height: 46px;
  border: 0;
  border-radius: 4px;
  color: #111;
  background: var(--acid);
  font-weight: 900;
}

.date-answer-feedback {
  min-height: 20px;
  margin-top: 12px;
  color: #ff9c8e;
  font-size: 11px;
}

.archive-clue-link {
  min-height: 40px;
  border: 1px solid #606771;
  border-radius: 4px;
  padding: 0 15px;
  color: white;
  background: transparent;
}

.archive-clue-link:hover {
  border-color: var(--mint);
}

.friendly-hint {
  display: block;
  margin-top: 14px;
  color: #858b92;
}

.door-is-opening .date-lock-modal,
.door-is-opening .knock-caption {
  display: none;
}

.door-is-opening .portal-frame {
  opacity: 1;
  animation: doorBecomeReal 420ms ease-out both;
}

.door-is-opening .portal-leaf-left {
  transform-origin: left center;
  animation: openLeftDoor 900ms ease-in 300ms forwards;
}

.door-is-opening .portal-leaf-right {
  transform-origin: right center;
  animation: openRightDoor 900ms ease-in 300ms forwards;
}

.qq-story-app {
  min-height: 100svh;
  overflow: hidden;
  color: #ececec;
  background: #171717;
  animation: archiveReveal 420ms ease-out both;
}

.qq-story-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 18px;
  border-bottom: 1px solid #292929;
  background: #090909;
}

.qq-story-layout {
  display: grid;
  grid-template-columns: 64px 300px minmax(0, 1fr);
  min-height: calc(100svh - 56px);
}

.qq-story-rail {
  min-height: calc(100svh - 56px);
}

.story-conversations {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid #343434;
  background: #202020;
}

.story-list-search {
  min-height: 40px;
  margin: 12px 14px;
  border-radius: 6px;
  padding: 10px 13px;
  color: #989898;
  background: #303030;
  font-size: 12px;
}

.story-conversation {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 76px;
  border: 0;
  padding: 10px 14px;
  color: white;
  background: transparent;
  text-align: left;
}

.story-conversation:hover,
.story-conversation.selected {
  background: #303030;
}

.story-conversation span:last-child {
  min-width: 0;
}

.story-conversation strong,
.story-conversation small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-conversation strong {
  margin-bottom: 7px;
  font-size: 12px;
}

.story-conversation small {
  color: #888;
  font-size: 10px;
}

.archive-progress {
  margin-top: auto;
  padding: 18px 16px;
  border-top: 1px solid #343434;
}

.archive-progress > span,
.archive-progress > strong {
  font-size: 10px;
}

.archive-progress > strong {
  float: right;
  color: var(--mint);
  font-family: Consolas, monospace;
}

.archive-progress > div {
  height: 3px;
  margin-top: 11px;
  overflow: hidden;
  background: #3c3c3c;
}

.archive-progress i {
  display: block;
  height: 100%;
  background: var(--mint);
  transition: width 300ms ease;
}

.qq-story-main {
  display: grid;
  grid-template-rows: 70px 58px 50px minmax(0, 1fr);
  min-width: 0;
  max-height: calc(100svh - 56px);
  background: #222;
}

.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 22px;
  border-bottom: 1px solid #353535;
}

.group-header strong,
.group-header small {
  display: block;
}

.group-header strong {
  margin-bottom: 5px;
  font-size: 15px;
}

.group-header small {
  color: #777;
  font-size: 10px;
}

.return-door {
  min-height: 34px;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 0 12px;
  color: #bbb;
  background: transparent;
  font-size: 11px;
}

.return-door:hover {
  border-color: var(--acid);
  color: white;
}

.archive-search-form {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-bottom: 1px solid #353535;
}

.archive-search-form > i {
  color: #777;
  text-align: center;
}

.archive-search-form input {
  width: 100%;
  min-height: 38px;
  border: 0;
  color: white;
  background: transparent;
}

.archive-search-form button {
  min-width: 38px;
  min-height: 34px;
  border: 0;
  border-radius: 4px;
  padding: 0 12px;
  color: #ccc;
  background: #343434;
}

.archive-search-form button[type="submit"] {
  color: #111;
  background: var(--mint);
  font-weight: 800;
}

.archive-tabs {
  display: flex;
  align-items: stretch;
  gap: 24px;
  padding: 0 22px;
  border-bottom: 1px solid #353535;
}

.archive-tabs button {
  position: relative;
  border: 0;
  color: #888;
  background: transparent;
  font-size: 12px;
}

.archive-tabs button.active {
  color: white;
}

.archive-tabs button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--mint);
}

.archive-content {
  min-height: 0;
  overflow: auto;
}

.date-browser {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: 100%;
}

.calendar-panel {
  padding: 22px;
  border-right: 1px solid #353535;
  background: #1c1c1c;
}

.calendar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.calendar-heading strong,
.calendar-heading small {
  display: block;
}

.calendar-heading strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.calendar-heading small,
.calendar-heading > span {
  color: #777;
  font-size: 10px;
}

.calendar-heading > span {
  font-family: Consolas, monospace;
}

.calendar-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.calendar-controls select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #424242;
  border-radius: 4px;
  padding: 0 9px;
  color: #ddd;
  background: #292929;
  font-size: 11px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-weekdays {
  margin-bottom: 4px;
}

.calendar-weekdays span {
  padding: 6px 0;
  color: #686868;
  font-size: 9px;
  text-align: center;
}

.calendar-day {
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #626262;
  background: transparent;
  font-family: Consolas, monospace;
  font-size: 10px;
}

.calendar-day:disabled {
  cursor: default;
}

.calendar-day.key-date {
  color: #777;
  background: #292929;
}

.calendar-day.key-date.unlocked {
  border-color: #5e6c6a;
  color: white;
  background: #31423e;
  cursor: pointer;
}

.calendar-day.selected {
  border-color: var(--acid);
  color: #111;
  background: var(--acid);
}

.timeline-index {
  display: grid;
  gap: 6px;
  margin-top: 20px;
}

.timeline-record {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  border: 0;
  border-left: 2px solid #444;
  padding: 7px 10px;
  color: #aaa;
  background: transparent;
  text-align: left;
}

.timeline-record time {
  font-family: Consolas, monospace;
  font-size: 9px;
}

.timeline-record span {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-record.active {
  border-left-color: var(--acid);
  color: white;
  background: #2b2b2b;
}

.timeline-record.locked {
  opacity: 0.35;
}

.record-panel {
  padding: 28px 34px 46px;
  overflow: hidden;
  background: #222;
}

.record-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #393939;
}

.record-heading p {
  margin: 0 0 6px;
  color: var(--mint);
  font-size: 10px;
  font-weight: 800;
}

.record-heading h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.record-heading small {
  color: #777;
  font-size: 10px;
}

.record-heading > span {
  color: #353535;
  font-family: Consolas, monospace;
  font-size: 48px;
  font-weight: 900;
}

.record-summary {
  max-width: 620px;
  margin: 18px 0 24px;
  color: #929292;
  font-size: 12px;
  line-height: 1.8;
}

.story-chat-log {
  display: grid;
  gap: 18px;
  max-width: 720px;
}

.story-message {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.story-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #111;
  font-size: 11px;
  font-weight: 900;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
}

.message-meta strong {
  color: #929292;
  font-size: 10px;
}

.message-meta time {
  color: #555;
  font-family: Consolas, monospace;
  font-size: 9px;
}

.story-message p {
  width: fit-content;
  max-width: min(620px, 100%);
  margin: 0;
  border-radius: 4px;
  padding: 10px 13px;
  color: #e8e8e8;
  background: #343434;
  font-size: 12px;
  line-height: 1.65;
}

.story-message.organizer p {
  color: #111;
  background: var(--mint);
}

.secret-word {
  border: 0;
  border-bottom: 1px dashed currentColor;
  padding: 0 2px;
  color: inherit;
  background: transparent;
  font-weight: 900;
}

.secret-word.collected::after {
  content: " ✓";
}

.answer-found {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 720px;
  margin-top: 28px;
  border: 1px solid #58655f;
  border-radius: 4px;
  padding: 15px;
  background: #29332f;
}

.answer-found span {
  color: #9da8a3;
  font-size: 10px;
}

.answer-found strong {
  color: var(--acid);
  font-family: Consolas, monospace;
  font-size: 16px;
}

.answer-found button,
.trace-earlier {
  min-height: 38px;
  border: 0;
  border-radius: 4px;
  padding: 0 14px;
  font-weight: 800;
}

.answer-found button {
  margin-left: auto;
  color: #111;
  background: var(--acid);
}

.trace-earlier {
  margin-top: 28px;
  color: #111;
  background: var(--mint);
}

.origin-quote {
  margin: 6px 0 24px;
  color: white;
  font-size: 25px;
  font-weight: 900;
  animation: originQuoteReveal 700ms ease-out both;
}

.timeline-complete {
  max-width: 720px;
  margin-top: 26px;
  border-left: 3px solid var(--acid);
  padding: 10px 14px;
  color: #aaa;
  font-size: 11px;
}

.search-result-page,
.simple-archive-view {
  padding: 28px;
}

.search-result-count {
  margin: 0 0 18px;
  color: #888;
  font-size: 11px;
}

.archive-search-result {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: min(820px, 100%);
  margin-bottom: 9px;
  border: 1px solid #3e3e3e;
  border-radius: 4px;
  padding: 15px;
  color: white;
  background: #292929;
  text-align: left;
}

.archive-search-result:hover {
  border-color: var(--mint);
}

.archive-search-result time {
  color: var(--mint);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.archive-search-result strong,
.archive-search-result small {
  display: block;
}

.archive-search-result strong {
  margin-bottom: 7px;
  font-size: 12px;
}

.archive-search-result small {
  overflow: hidden;
  color: #888;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.no-search-result,
.ddl-easter-egg {
  width: min(620px, 100%);
  border: 1px solid #3e3e3e;
  border-radius: 4px;
  padding: 22px;
  color: #aaa;
  background: #292929;
  line-height: 1.8;
}

.no-search-result strong,
.ddl-easter-egg strong {
  color: white;
}

.simple-archive-view header {
  margin-bottom: 24px;
}

.simple-archive-view h2,
.simple-archive-view p {
  margin: 0;
}

.simple-archive-view h2 {
  margin-bottom: 7px;
}

.simple-archive-view header p {
  color: #777;
  font-size: 11px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.member-grid > div {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  border: 1px solid #3e3e3e;
  border-radius: 4px;
  padding: 14px;
  background: #292929;
}

.member-grid .story-avatar {
  grid-row: 1 / 3;
}

.member-grid strong {
  align-self: end;
  font-size: 12px;
}

.member-grid small {
  align-self: start;
  color: #777;
  font-size: 10px;
}

.archive-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.archive-image {
  display: flex;
  min-height: 190px;
  align-items: end;
  overflow: hidden;
  border: 1px solid #444;
  border-radius: 4px;
  background-image: url("assets/exhibition-hall.jpg");
  background-position: center;
  background-size: cover;
}

.archive-image:nth-child(2) {
  background-position: 25% center;
}

.archive-image:nth-child(3) {
  background-position: 72% center;
}

.archive-image span {
  width: 100%;
  padding: 12px;
  color: white;
  background: rgba(0, 0, 0, 0.72);
  font-size: 11px;
}

.archive-file-list {
  display: grid;
  width: min(760px, 100%);
}

.archive-file-list > div {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border-bottom: 1px solid #393939;
}

.archive-file-list > div > i {
  color: var(--mint);
  text-align: center;
}

.archive-file-list strong,
.archive-file-list small {
  display: block;
}

.archive-file-list strong {
  margin-bottom: 5px;
  font-size: 11px;
}

.archive-file-list small {
  color: #777;
  font-family: Consolas, monospace;
  font-size: 9px;
}

.settings-modal {
  position: fixed;
  z-index: 100;
  top: 50%;
  left: 50%;
  width: min(380px, calc(100vw - 32px));
  border: 1px solid #4a4a4a;
  border-radius: 6px;
  padding: 28px;
  color: white;
  background: #202020;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%);
}

.settings-modal h2 {
  margin: 0 0 10px;
}

.settings-modal p {
  margin: 0 0 22px;
  color: #888;
  font-size: 11px;
}

.reset-progress {
  min-height: 40px;
  border: 1px solid var(--signal);
  border-radius: 4px;
  padding: 0 14px;
  color: #ff9b8d;
  background: transparent;
}

.story-ending {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  align-items: center;
  min-height: 100svh;
  overflow: hidden;
  color: white;
  background-color: #0c0f12;
  background-image: url("assets/exhibition-hall.jpg");
  background-position: center;
  background-size: cover;
  isolation: isolate;
}

.story-ending::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(7, 10, 13, 0.76);
}

.ending-door-open {
  position: relative;
  z-index: 2;
  width: 280px;
  height: 470px;
  justify-self: center;
}

.ending-door-open .portal-frame {
  opacity: 1;
  animation: none;
}

.ending-door-open .portal-leaf-left {
  transform: perspective(600px) rotateY(-72deg);
  transform-origin: left center;
}

.ending-door-open .portal-leaf-right {
  transform: perspective(600px) rotateY(72deg);
  transform-origin: right center;
}

.ending-door-open .portal-inner {
  background: var(--acid);
  box-shadow: inset 0 0 90px rgba(255, 255, 255, 0.7);
  animation: none;
}

.ending-door-open .portal-medallion {
  animation: none;
}

.ending-narrative {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 42px 8vw 42px 24px;
  animation: messageReveal 700ms ease-out 260ms both;
}

.ending-label {
  margin: 0 0 16px;
  color: var(--acid);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 900;
}

.ending-narrative h1 {
  margin: 0 0 22px;
  font-size: 44px;
  line-height: 1.2;
}

.ending-narrative > p:not(.ending-label),
.ending-narrative blockquote {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 2;
}

.ending-narrative blockquote {
  margin: 24px 0 30px;
  border-left: 3px solid var(--signal);
  padding-left: 18px;
}

.ending-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ending-actions button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  padding: 0 16px;
  color: white;
  background: transparent;
}

.ending-actions button:first-child {
  color: #111;
  background: var(--acid);
}

@keyframes knockDot {
  0%,
  67%,
  78%,
  100% {
    opacity: 0;
    transform: scale(0.6);
  }
  70%,
  74% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 12px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes doorBecomeReal {
  from {
    opacity: 0.5;
  }
  to {
    opacity: 1;
  }
}

@keyframes openLeftDoor {
  to {
    transform: perspective(600px) rotateY(-78deg);
  }
}

@keyframes openRightDoor {
  to {
    transform: perspective(600px) rotateY(78deg);
  }
}

@keyframes originQuoteReveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1050px) {
  .qq-story-layout {
    grid-template-columns: 58px 240px minmax(0, 1fr);
  }

  .date-browser {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .record-panel {
    padding: 24px;
  }

  .member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .knock-caption {
    left: calc(50% + 118px);
  }

  .date-lock-modal {
    padding: 28px 20px 22px;
  }

  .date-lock-modal h1 {
    padding-right: 24px;
    font-size: 24px;
  }

  .date-answer-form {
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
  }

  .qq-story-titlebar {
    min-height: 52px;
  }

  .qq-story-layout {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .qq-story-rail {
    grid-column: 1;
    min-height: calc(100svh - 52px);
  }

  .story-conversations {
    grid-column: 2;
    min-height: 170px;
  }

  .story-conversation:not(.selected) {
    display: none;
  }

  .archive-progress {
    padding: 12px 16px;
  }

  .qq-story-main {
    grid-column: 1 / -1;
    max-height: none;
    min-height: 760px;
  }

  .group-header,
  .archive-tabs {
    padding-right: 14px;
    padding-left: 14px;
  }

  .archive-search-form {
    padding-right: 12px;
    padding-left: 12px;
  }

  .date-browser {
    grid-template-columns: 1fr;
  }

  .calendar-panel {
    border-right: 0;
    border-bottom: 1px solid #353535;
  }

  .record-panel {
    padding: 22px 16px 34px;
  }

  .record-heading > span {
    font-size: 34px;
  }

  .answer-found {
    align-items: stretch;
    flex-direction: column;
  }

  .answer-found button {
    margin-left: 0;
  }

  .member-grid,
  .archive-image-grid {
    grid-template-columns: 1fr;
  }

  .story-ending {
    grid-template-columns: 1fr;
    padding: 60px 20px;
  }

  .ending-door-open {
    width: 190px;
    height: 320px;
  }

  .ending-narrative {
    padding: 28px 0 0;
  }

  .ending-narrative h1 {
    font-size: 32px;
  }
}
