:root {
  --ink: #0c1017;
  --ink-2: #141a22;
  --paper: #fff7dd;
  --paper-muted: rgba(255, 247, 221, 0.72);
  --gold: #d8b15d;
  --gold-soft: #ffe8a3;
  --jade: #4fb79f;
  --jade-dark: #173832;
  --cinnabar: #b94c3d;
  --line: rgba(255, 232, 163, 0.16);
  --panel: rgba(15, 19, 25, 0.78);
  --font-title: "Songti SC", "STSong", "Noto Serif SC", serif;
  --font-ui: "Noto Sans SC", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 18% 12%, rgba(216, 177, 93, 0.22), transparent 26%),
    radial-gradient(circle at 84% 16%, rgba(79, 183, 159, 0.14), transparent 26%),
    linear-gradient(180deg, #0e1219 0%, #171717 45%, #0a0d12 100%);
  font-family: var(--font-ui);
}

button,
input {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--paper);
  background: rgba(255, 232, 163, 0.06);
  cursor: pointer;
  overflow-wrap: anywhere;
}

button:hover {
  border-color: rgba(255, 232, 163, 0.34);
  background: rgba(255, 232, 163, 0.1);
}

.academy-app {
  position: relative;
  min-height: 100vh;
  padding-top: 58px;
}

.academy-app.is-auth-locked {
  pointer-events: none;
  filter: blur(2px) saturate(0.8);
}

.academy-app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("./assets/ink-bg.png") center / cover no-repeat;
  opacity: 0.22;
}

.academy-app::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 16, 23, 0.88), rgba(12, 16, 23, 0.22), rgba(12, 16, 23, 0.84)),
    linear-gradient(180deg, rgba(12, 16, 23, 0.1), rgba(12, 16, 23, 0.82));
}

.academy-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 8px clamp(14px, 3vw, 36px);
  border-bottom: 1px solid rgba(255, 232, 163, 0.12);
  background: rgba(10, 13, 18, 0.82);
  backdrop-filter: blur(18px);
}

.academy-auth {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(360px, 0.78fr);
  align-items: center;
  gap: clamp(20px, 5vw, 70px);
  padding: clamp(20px, 5vw, 64px);
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(216, 177, 93, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(12, 16, 23, 0.96), rgba(18, 31, 34, 0.94));
}

.academy-auth[hidden] {
  display: none;
}

.auth-scene {
  position: relative;
  min-height: min(620px, 72vh);
  border: 1px solid rgba(255, 232, 163, 0.12);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 232, 163, 0.1), transparent 34%),
    linear-gradient(180deg, #16222a 0%, #10151c 62%, #0b0e13 100%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.auth-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("./assets/ink-bg.png") center / cover no-repeat;
  opacity: 0.28;
}

.auth-sun,
.auth-peak,
.auth-water,
.auth-stamp {
  position: absolute;
}

.auth-sun {
  top: 16%;
  right: 18%;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle, #fff0b8, rgba(216, 177, 93, 0.14) 68%, transparent 70%);
}

.auth-peak {
  bottom: 18%;
  width: 68%;
  height: 45%;
  clip-path: polygon(0 100%, 42% 8%, 100% 100%);
  background: linear-gradient(145deg, rgba(79, 183, 159, 0.28), rgba(9, 12, 18, 0.82));
}

.peak-a {
  left: -6%;
}

.peak-b {
  right: -10%;
  bottom: 10%;
  opacity: 0.76;
}

.auth-water {
  left: 0;
  right: 0;
  bottom: 0;
  height: 32%;
  background:
    repeating-linear-gradient(0deg, rgba(255, 232, 163, 0.12) 0 1px, transparent 1px 16px),
    linear-gradient(180deg, rgba(79, 183, 159, 0.16), rgba(6, 8, 12, 0.88));
}

.auth-stamp {
  left: 8%;
  bottom: 9%;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(185, 76, 61, 0.78);
  color: #ffb09f;
  font-family: var(--font-title);
  font-size: 2.4rem;
  transform: rotate(-8deg);
}

.academy-auth-panel {
  position: relative;
  max-width: 520px;
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid rgba(255, 232, 163, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0%, rgba(216, 177, 93, 0.15), transparent 36%),
    rgba(13, 17, 23, 0.9);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.44);
}

.academy-auth-panel h1,
.academy-auth-panel p {
  margin: 0;
}

.academy-auth-panel h1 {
  margin: 8px 0 12px;
  color: var(--gold-soft);
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.academy-auth-panel > p:not(.eyebrow) {
  color: var(--paper-muted);
  line-height: 1.75;
}

.academy-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0 14px;
}

.academy-auth-tabs button,
.academy-auth-form button {
  min-height: 42px;
  font-weight: 900;
}

.academy-auth-tabs button.is-active {
  color: #211609;
  border-color: transparent;
  background: linear-gradient(145deg, #fff0b8, var(--gold));
}

.academy-auth-form {
  display: grid;
  gap: 12px;
}

.academy-auth-form label {
  display: grid;
  gap: 6px;
  color: var(--paper-muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.academy-auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 232, 163, 0.16);
  border-radius: 8px;
  color: var(--paper);
  background: rgba(0, 0, 0, 0.22);
  outline: none;
}

.academy-auth-form input:focus {
  border-color: rgba(255, 232, 163, 0.42);
  box-shadow: 0 0 0 3px rgba(216, 177, 93, 0.12);
}

.academy-auth-form[data-mode="login"] .academy-auth-nickname {
  display: none;
}

.academy-auth-message {
  min-height: 36px;
  padding: 9px 10px;
  border: 1px solid rgba(79, 183, 159, 0.18);
  border-radius: 8px;
  color: #bdf6e8;
  background: rgba(79, 183, 159, 0.08);
  line-height: 1.45;
  font-size: 0.78rem;
}

.academy-account {
  min-width: 150px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
  justify-items: end;
}

.academy-account span {
  grid-column: 1 / 2;
  color: var(--paper-muted);
  font-size: 0.68rem;
}

.academy-account strong {
  grid-column: 1 / 2;
  max-width: 110px;
  overflow: hidden;
  color: var(--gold-soft);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academy-account button {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  min-height: 30px;
  padding: 0 9px;
  color: #ffd1c8;
  border-color: rgba(185, 76, 61, 0.24);
  background: rgba(185, 76, 61, 0.08);
  font-size: 0.72rem;
  font-weight: 900;
}

.academy-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.academy-brand b {
  color: var(--gold-soft);
  font-family: var(--font-title);
  font-size: 1.3rem;
  letter-spacing: 0.08em;
}

.academy-brand span,
.academy-day span,
.academy-day strong {
  font-family: var(--font-ui);
}

.academy-brand span {
  color: var(--paper-muted);
  font-size: 0.78rem;
}

.academy-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.academy-nav button {
  min-width: 70px;
  min-height: 34px;
  padding: 0 12px;
  color: var(--paper-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.academy-nav button.is-active {
  color: #1d1710;
  border-color: transparent;
  background: linear-gradient(145deg, #fff0b8, var(--gold));
}

.academy-day {
  min-width: 116px;
  display: grid;
  justify-items: end;
  gap: 2px;
}

.academy-day span {
  color: var(--paper-muted);
  font-size: 0.72rem;
}

.academy-day strong {
  color: var(--gold-soft);
  font-size: 0.92rem;
}

.academy-stage {
  width: min(1680px, 100%);
  min-height: calc(100vh - 58px);
  display: grid;
  grid-template-columns: minmax(290px, 0.82fr) minmax(540px, 1.45fr) minmax(300px, 0.84fr);
  gap: clamp(14px, 1.8vw, 24px);
  margin: 0 auto;
  padding: clamp(16px, 2vw, 28px);
}

.student-panel,
.right-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.student-card,
.case-progress-card,
.branch-progress-card,
.mentor-card,
.relations-card,
.clue-card,
.xiaozha-card,
.academy-map-card,
.event-card,
.wide-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 232, 163, 0.055), rgba(79, 183, 159, 0.025)),
    var(--panel);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.22);
}

.student-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.student-seal {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  color: #271809;
  background: linear-gradient(145deg, #fff0b8, var(--gold));
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 900;
}

.student-seal img {
  width: 150%;
  height: 150%;
  object-fit: contain;
  object-position: center top;
  transform: translateY(7%);
}

.student-card p,
.student-card h1 {
  margin: 0;
}

.student-card p {
  color: var(--paper-muted);
  font-size: 0.75rem;
}

.student-card h1 {
  color: var(--gold-soft);
  font-family: var(--font-title);
  font-size: 1.45rem;
}

.soft-button,
.gold-button {
  min-height: 36px;
  padding: 0 13px;
  font-weight: 900;
}

.soft-button {
  color: var(--paper-muted);
}

.gold-button {
  width: 100%;
  color: #211609;
  border-color: transparent;
  background: linear-gradient(145deg, #fff0b8, var(--gold));
}

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

.stat-pill {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(255, 232, 163, 0.11);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.stat-pill span {
  color: var(--paper-muted);
  font-size: 0.72rem;
}

.stat-pill strong {
  color: var(--gold-soft);
  font-size: 1.05rem;
}

.case-progress-card,
.branch-progress-card,
.quest-card,
.relations-card,
.clue-card,
.xiaozha-card {
  padding: 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head span,
.eyebrow {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.section-head h2,
.case-progress-card h2,
.branch-progress-card h2,
.event-card h2,
.wide-panel h2 {
  margin: 0;
  color: var(--gold-soft);
  font-family: var(--font-title);
}

.section-head.compact {
  margin-bottom: 9px;
}

.section-head.compact strong {
  color: #a8f1df;
  font-size: 0.78rem;
}

.case-progress-card h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.branch-progress-card {
  border-color: rgba(79, 183, 159, 0.16);
  background:
    linear-gradient(145deg, rgba(79, 183, 159, 0.08), rgba(255, 232, 163, 0.03)),
    var(--panel);
}

.branch-progress-card h2 {
  margin-bottom: 8px;
  font-size: 1.16rem;
}

.case-progress-card p,
.branch-progress-card p,
.event-card p,
.xiaozha-card p,
.mentor-card p,
.wide-panel p {
  color: var(--paper-muted);
  line-height: 1.68;
}

.progress-line {
  height: 8px;
  overflow: hidden;
  margin: 14px 0;
  border-radius: 999px;
  background: rgba(255, 232, 163, 0.1);
}

.progress-line b {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), var(--gold));
  transition: width 220ms ease;
}

.quest-card {
  border: 1px solid rgba(255, 232, 163, 0.14);
  border-radius: 8px;
  background:
    radial-gradient(circle at 10% 0%, rgba(216, 177, 93, 0.18), transparent 36%),
    linear-gradient(145deg, rgba(255, 232, 163, 0.06), rgba(79, 183, 159, 0.035)),
    var(--panel);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.22);
}

.quest-chapter {
  margin-bottom: 12px;
  padding: 11px 12px 12px;
  border: 1px solid rgba(255, 232, 163, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 232, 163, 0.08), rgba(79, 183, 159, 0.06)),
    rgba(0, 0, 0, 0.12);
}

.quest-chapter h2,
.quest-chapter p {
  margin: 0;
}

.quest-chapter h2 {
  color: var(--gold-soft);
  font-family: var(--font-title);
  font-size: 1.08rem;
}

.quest-chapter p {
  margin-top: 6px;
  color: rgba(255, 247, 221, 0.66);
  line-height: 1.55;
  font-size: 0.76rem;
}

.quest-progress {
  height: 5px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 232, 163, 0.09);
}

.quest-progress b {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), var(--gold));
  transition: width 220ms ease;
}

.flow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 12px;
}

.flow-step {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(255, 232, 163, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.1);
}

.flow-step b {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: rgba(255, 247, 221, 0.64);
  background: rgba(255, 232, 163, 0.08);
  font-size: 0.66rem;
}

.flow-step strong,
.flow-step span {
  display: block;
}

.flow-step strong {
  overflow: hidden;
  color: var(--paper);
  font-size: 0.72rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-step span {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 247, 221, 0.5);
  font-size: 0.64rem;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.flow-step.is-active {
  border-color: rgba(255, 232, 163, 0.24);
  background: rgba(255, 232, 163, 0.06);
}

.flow-step.is-active b {
  color: #211609;
  background: linear-gradient(145deg, #fff0b8, var(--gold));
}

.flow-step.is-done b {
  color: #07120f;
  background: linear-gradient(145deg, #a8f1df, var(--jade));
}

.flow-help-button {
  width: 100%;
  min-height: 32px;
  margin: -3px 0 12px;
  color: #bdf6e8;
  border-color: rgba(79, 183, 159, 0.22);
  background: rgba(79, 183, 159, 0.055);
  font-size: 0.76rem;
  font-weight: 900;
}

.quest-current {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(79, 183, 159, 0.2);
  border-radius: 8px;
  background: rgba(79, 183, 159, 0.08);
}

.quest-current b {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #211609;
  background: linear-gradient(145deg, #fff0b8, var(--gold));
  font-family: var(--font-title);
  font-size: 1.25rem;
}

.quest-current h3,
.quest-current p {
  margin: 0;
}

.quest-current h3 {
  color: var(--gold-soft);
  font-family: var(--font-title);
  font-size: 1.1rem;
}

.quest-current p {
  margin-top: 5px;
  color: var(--paper-muted);
  line-height: 1.6;
  font-size: 0.82rem;
}

.quest-current span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 8px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 232, 163, 0.18);
  border-radius: 999px;
  color: #ffe8a3;
  background: rgba(255, 232, 163, 0.08);
  font-size: 0.7rem;
  line-height: 1.2;
}

.quest-list {
  display: grid;
  gap: 7px;
  max-height: 228px;
  overflow: auto;
  margin-bottom: 12px;
  padding-right: 2px;
}

.quest-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px;
  border: 1px solid rgba(255, 232, 163, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.quest-item b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: rgba(255, 247, 221, 0.72);
  background: rgba(255, 232, 163, 0.08);
  font-size: 0.72rem;
}

.quest-item strong,
.quest-item span {
  display: block;
}

.quest-item strong {
  color: var(--paper);
  font-size: 0.82rem;
}

.quest-item span {
  color: rgba(255, 247, 221, 0.56);
  font-size: 0.72rem;
  line-height: 1.45;
}

.quest-item em {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  color: rgba(255, 232, 163, 0.82);
  background: rgba(255, 232, 163, 0.07);
  font-style: normal;
  font-size: 0.66rem;
  line-height: 1.35;
}

.quest-item.is-active {
  border-color: rgba(255, 232, 163, 0.22);
  background: rgba(255, 232, 163, 0.06);
}

.quest-item.is-active b {
  color: #211609;
  background: linear-gradient(145deg, #fff0b8, var(--gold));
}

.quest-item.is-done {
  opacity: 0.72;
}

.quest-item.is-done b {
  color: #07120f;
  background: linear-gradient(145deg, #a8f1df, var(--jade));
}

.mentor-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  overflow: hidden;
}

.mentor-portrait-wrap {
  height: 128px;
  overflow: hidden;
  border: 1px solid rgba(255, 232, 163, 0.13);
  border-radius: 8px;
  background: radial-gradient(circle at 50% 25%, rgba(255, 232, 163, 0.18), transparent 60%), rgba(0, 0, 0, 0.18);
}

.mentor-portrait-wrap img {
  width: 148%;
  height: 148%;
  object-fit: contain;
  object-position: center top;
  transform: translate(-16%, 2%);
}

.mentor-portrait-wrap img.is-chapter-character {
  width: 118%;
  height: 118%;
  transform: translate(-7%, 6%);
}

.mentor-card span {
  color: #a8f1df;
  font-size: 0.76rem;
}

.mentor-card strong {
  display: block;
  margin: 4px 0;
  color: var(--gold-soft);
  font-family: var(--font-title);
  font-size: 1.22rem;
}

.academy-map-card {
  min-height: 0;
  padding: 16px;
}

.academy-map {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid rgba(255, 232, 163, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 70% 18%, rgba(255, 232, 163, 0.24), transparent 16%),
    linear-gradient(180deg, rgba(22, 35, 37, 0.65), rgba(15, 18, 22, 0.9)),
    url("./assets/ink-bg.png") center / cover;
}

.sun-mark {
  position: absolute;
  right: 10%;
  top: 12%;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 232, 163, 0.88), rgba(255, 232, 163, 0.16) 68%, transparent 70%);
  filter: blur(0.2px);
}

.cloud,
.academy-route,
.academy-building {
  position: absolute;
  pointer-events: none;
}

.cloud {
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 247, 221, 0.1);
  filter: blur(1px);
}

.cloud-a {
  left: 12%;
  top: 20%;
  width: 180px;
}

.cloud-b {
  right: 16%;
  top: 45%;
  width: 240px;
}

.academy-route {
  left: 10%;
  right: 10%;
  top: 57%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 232, 163, 0.42), rgba(79, 183, 159, 0.32), transparent);
  transform: rotate(-6deg);
}

.academy-building {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border: 1px solid rgba(255, 232, 163, 0.2);
  border-radius: 8px;
  color: rgba(255, 232, 163, 0.38);
  background: rgba(0, 0, 0, 0.18);
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 900;
}

.academy-building.main {
  left: 33%;
  top: 34%;
}

.academy-building.library {
  left: 58%;
  top: 22%;
}

.academy-building.gate {
  left: 10%;
  bottom: 20%;
}

.academy-building.dorm {
  right: 8%;
  bottom: 12%;
}

.location-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.location-node {
  position: absolute;
  width: 76px;
  min-height: 76px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 7px;
  transform: translate(-50%, -50%);
  border-radius: 16px;
  border: 1px solid rgba(255, 232, 163, 0.26);
  background:
    linear-gradient(145deg, rgba(255, 240, 184, 0.9), rgba(216, 177, 93, 0.78)),
    rgba(255, 232, 163, 0.28);
  color: #20160d;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  transition: transform 160ms ease, filter 160ms ease;
}

.location-node:hover,
.location-node.is-current {
  transform: translate(-50%, -55%) scale(1.04);
  filter: saturate(1.1);
}

.location-node b,
.location-node span,
.location-node em {
  line-height: 1;
}

.location-node b {
  font-family: var(--font-title);
  font-size: 1.55rem;
}

.location-node span {
  font-size: 0.82rem;
  font-weight: 900;
}

.location-node em {
  color: rgba(32, 22, 13, 0.7);
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 800;
}

.event-card {
  margin-top: 14px;
  padding: 16px;
}

.event-card h2 {
  margin: 6px 0 10px;
}

.event-speaker {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid rgba(79, 183, 159, 0.22);
  border-radius: 8px;
  background: rgba(79, 183, 159, 0.08);
  color: #bdf6e8;
}

.choice-list {
  display: grid;
  gap: 10px;
}

.choice-list button {
  min-height: 48px;
  padding: 10px 12px;
  text-align: left;
  color: var(--paper);
  font-weight: 800;
}

.choice-list button.is-done {
  color: rgba(255, 247, 221, 0.48);
  border-color: rgba(255, 232, 163, 0.08);
}

.relations-list,
.relation-arcs,
.clue-list,
.journal-list,
.academy-codex-grid,
.case-reference-grid,
.evidence-board {
  display: grid;
  gap: 10px;
}

.relation-item,
.relation-arc,
.clue-item,
.journal-item,
.codex-item,
.case-reference-item,
.evidence-item {
  padding: 10px;
  border: 1px solid rgba(255, 232, 163, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.relation-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  color: inherit;
  text-align: left;
}

.relation-item b,
.codex-item b,
.case-reference-item b,
.evidence-item b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #211609;
  background: linear-gradient(145deg, #fff0b8, var(--gold));
}

.relation-item b {
  width: 50px;
  height: 58px;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 232, 163, 0.22), transparent 58%),
    rgba(6, 9, 13, 0.5);
}

.relation-item b img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}

.relation-item:hover {
  border-color: rgba(255, 232, 163, 0.28);
  background:
    linear-gradient(145deg, rgba(255, 232, 163, 0.08), rgba(79, 183, 159, 0.04)),
    rgba(0, 0, 0, 0.18);
}

.relation-item strong,
.clue-item strong,
.journal-item strong,
.codex-item strong,
.case-reference-item strong,
.evidence-item strong {
  display: block;
  color: var(--gold-soft);
}

.relation-item span,
.relation-item em,
.relation-arc span,
.relation-arc em,
.clue-item span,
.journal-item span,
.codex-item span,
.case-reference-item span,
.case-reference-item em,
.evidence-item span {
  color: var(--paper-muted);
  font-style: normal;
  font-size: 0.76rem;
  line-height: 1.55;
}

.relation-arcs {
  margin-top: 10px;
}

.relation-arc {
  display: grid;
  gap: 6px;
  border-color: rgba(79, 183, 159, 0.16);
  background:
    linear-gradient(145deg, rgba(79, 183, 159, 0.07), rgba(255, 232, 163, 0.04)),
    rgba(0, 0, 0, 0.14);
}

.relation-arc.is-done {
  border-color: rgba(255, 232, 163, 0.26);
  background:
    linear-gradient(145deg, rgba(255, 232, 163, 0.1), rgba(79, 183, 159, 0.08)),
    rgba(0, 0, 0, 0.16);
}

.relation-arc div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.relation-arc strong {
  color: var(--gold-soft);
  font-size: 0.88rem;
}

.relation-arc p {
  margin: 0;
  color: rgba(255, 247, 221, 0.72);
  font-size: 0.78rem;
  line-height: 1.65;
}

.clue-list {
  max-height: 234px;
  overflow: auto;
}

.empty-state {
  color: rgba(255, 247, 221, 0.48);
  font-size: 0.82rem;
}

.xiaozha-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 8px;
}

.xiaozha-actions button {
  min-height: 34px;
  padding: 0 8px;
  color: #bdf6e8;
  font-size: 0.78rem;
  font-weight: 900;
}

.overlay-panel {
  position: fixed;
  inset: 58px 0 0;
  z-index: 30;
  overflow: auto;
  padding: clamp(16px, 3vw, 34px);
  background: rgba(8, 10, 14, 0.74);
  backdrop-filter: blur(18px);
}

.wide-panel {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 2.4vw, 30px);
}

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1.08fr) minmax(320px, 0.86fr);
  gap: 18px;
}

.wide-panel h3 {
  color: var(--gold-soft);
  font-family: var(--font-title);
}

.case-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 18px;
}

.case-switch button {
  display: grid;
  gap: 3px;
  flex: 1 1 180px;
  min-width: 0;
  padding: 10px 12px;
  text-align: left;
  border-color: rgba(255, 232, 163, 0.16);
  background: rgba(255, 247, 221, 0.05);
}

.case-switch button.is-active {
  color: #07120f;
  border-color: transparent;
  background: linear-gradient(145deg, #c8fff1, var(--jade));
}

.case-switch span,
.case-switch strong {
  overflow-wrap: anywhere;
}

.case-switch span {
  color: inherit;
  opacity: 0.72;
  font-size: 0.68rem;
  font-weight: 900;
}

.case-switch strong {
  font-family: var(--font-title);
  font-size: 0.92rem;
  line-height: 1.35;
}

.deduction-options {
  display: grid;
  gap: 10px;
}

.reasoning-board {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.reasoning-slot {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid rgba(255, 232, 163, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 232, 163, 0.045), rgba(79, 183, 159, 0.035)),
    rgba(0, 0, 0, 0.14);
}

.reasoning-slot > div {
  display: grid;
  gap: 2px;
}

.reasoning-slot span {
  color: rgba(255, 232, 163, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
}

.reasoning-slot strong {
  color: var(--paper);
  line-height: 1.45;
  font-size: 0.82rem;
}

.reasoning-drop {
  min-height: 38px;
  padding: 8px 10px;
  border-style: dashed;
  color: rgba(255, 247, 221, 0.74);
  background: rgba(255, 247, 221, 0.04);
  line-height: 1.45;
  text-align: left;
}

.reasoning-slot p {
  margin: 0;
  color: rgba(255, 247, 221, 0.58);
  line-height: 1.45;
  font-size: 0.74rem;
}

.reasoning-slot.is-filled {
  border-color: rgba(79, 183, 159, 0.36);
  background:
    linear-gradient(145deg, rgba(79, 183, 159, 0.12), rgba(255, 232, 163, 0.04)),
    rgba(0, 0, 0, 0.16);
}

.reasoning-slot.is-filled .reasoning-drop {
  color: #07120f;
  border-color: transparent;
  background: linear-gradient(145deg, #c8fff1, var(--jade));
  font-weight: 900;
}

.reasoning-slot.is-wrong {
  border-color: rgba(185, 76, 61, 0.42);
}

.reasoning-slot.is-wrong .reasoning-drop {
  color: #ffd1c8;
  border-color: rgba(185, 76, 61, 0.36);
  background: rgba(185, 76, 61, 0.12);
}

.reasoning-clear {
  justify-self: start;
  min-height: 28px;
  padding: 0 8px;
  color: rgba(255, 247, 221, 0.68);
  font-size: 0.7rem;
}

.reasoning-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 232, 163, 0.1);
}

.reasoning-token {
  display: grid;
  min-height: 48px;
  padding: 8px 10px;
  border-color: rgba(255, 232, 163, 0.18);
  background: rgba(255, 232, 163, 0.06);
  cursor: grab;
}

.reasoning-token:active {
  cursor: grabbing;
}

.reasoning-token strong {
  color: var(--gold-soft);
  font-size: 0.8rem;
}

.reasoning-token span {
  color: rgba(255, 247, 221, 0.55);
  font-size: 0.68rem;
}

.reasoning-token.is-used {
  border-color: rgba(79, 183, 159, 0.25);
  background: rgba(79, 183, 159, 0.08);
}

.deduction-options button {
  padding: 12px;
  text-align: left;
  line-height: 1.55;
}

.deduction-options button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.deduction-options button.is-selected {
  color: #07120f;
  border-color: transparent;
  background: linear-gradient(145deg, #c8fff1, var(--jade));
}

.deduction-options button.is-tried {
  border-color: rgba(185, 76, 61, 0.38);
  background: rgba(185, 76, 61, 0.1);
}

.case-rating {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.case-rating article {
  padding: 13px;
  border: 1px solid rgba(79, 183, 159, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(79, 183, 159, 0.12), rgba(255, 232, 163, 0.05)),
    rgba(0, 0, 0, 0.16);
}

.case-rating article.is-empty {
  border-color: rgba(255, 232, 163, 0.12);
  background: rgba(0, 0, 0, 0.14);
}

.case-rating span,
.case-rating strong,
.case-rating p,
.case-rating em {
  display: block;
}

.case-rating span {
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.case-rating strong {
  margin-top: 4px;
  color: var(--gold-soft);
  font-family: var(--font-title);
  font-size: 1rem;
  line-height: 1.35;
}

.case-rating p {
  margin: 8px 0 0;
  color: var(--paper-muted);
  line-height: 1.55;
  font-size: 0.8rem;
}

.case-rating em {
  margin-top: 8px;
  color: #bdf6e8;
  font-style: normal;
  line-height: 1.45;
  font-size: 0.74rem;
}

.deduction-result {
  margin-top: 14px;
  min-height: 80px;
  padding: 12px;
  border: 1px solid rgba(255, 232, 163, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--paper-muted);
  line-height: 1.65;
}

.deduction-result.is-good {
  border-color: rgba(79, 183, 159, 0.34);
  color: #cafff1;
}

.deduction-result.is-bad {
  border-color: rgba(185, 76, 61, 0.38);
  color: #ffd1c8;
}

.codex-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.codex-tabs button {
  min-height: 34px;
  padding: 0 12px;
}

.codex-tabs button.is-active {
  color: #211609;
  border-color: transparent;
  background: linear-gradient(145deg, #fff0b8, var(--gold));
}

.case-reference-panel {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(79, 183, 159, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(79, 183, 159, 0.08), rgba(255, 232, 163, 0.035)),
    rgba(0, 0, 0, 0.12);
}

.case-reference-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.case-reference-item {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 190px;
  border-color: rgba(79, 183, 159, 0.16);
  background:
    linear-gradient(145deg, rgba(79, 183, 159, 0.07), rgba(255, 232, 163, 0.04)),
    rgba(0, 0, 0, 0.16);
}

.case-reference-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.case-reference-heading div {
  min-width: 0;
}

.case-reference-heading span {
  display: block;
  color: #bdf6e8;
  font-weight: 900;
}

.case-reference-item p {
  margin: 0;
  color: rgba(255, 247, 221, 0.68);
  line-height: 1.58;
  font-size: 0.78rem;
}

.case-reference-item em {
  display: block;
  color: rgba(255, 232, 163, 0.72);
  line-height: 1.5;
}

.case-reference-item.is-locked {
  border-color: rgba(255, 232, 163, 0.1);
  opacity: 0.72;
}

.case-reference-item.is-locked b {
  color: rgba(255, 247, 221, 0.56);
  background: rgba(255, 247, 221, 0.1);
}

.reference-pill-row {
  display: flex;
  flex-wrap: wrap;
  align-self: end;
  gap: 6px;
}

.reference-pill {
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid rgba(79, 183, 159, 0.18);
  border-radius: 999px;
  color: #bdf6e8;
  background: rgba(79, 183, 159, 0.1);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.35;
}

.reference-pill.is-locked,
.reference-pill.is-empty {
  color: rgba(255, 247, 221, 0.5);
  border-color: rgba(255, 232, 163, 0.1);
  background: rgba(255, 247, 221, 0.055);
}

.academy-codex-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.codex-item {
  min-height: 126px;
}

.codex-item.is-locked {
  opacity: 0.48;
  filter: grayscale(0.5);
}

.knowledge-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 232, 163, 0.12);
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.knowledge-item {
  min-width: 0;
  min-height: 158px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 232, 163, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 232, 163, 0.055), rgba(79, 183, 159, 0.04)),
    rgba(0, 0, 0, 0.14);
}

.knowledge-item span,
.knowledge-item em {
  width: fit-content;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  color: #bdf6e8;
  background: rgba(79, 183, 159, 0.1);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.4;
}

.knowledge-item strong {
  color: var(--gold-soft);
  font-family: var(--font-title);
  font-size: 1.02rem;
  line-height: 1.35;
}

.knowledge-item p {
  margin: 0;
  color: rgba(255, 247, 221, 0.66);
  line-height: 1.62;
  font-size: 0.8rem;
}

.knowledge-item em {
  align-self: end;
  color: rgba(255, 232, 163, 0.78);
  background: rgba(255, 232, 163, 0.07);
}

.knowledge-item.is-locked {
  opacity: 0.5;
  filter: grayscale(0.55);
}

.journal-list {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 60;
  max-width: min(520px, calc(100vw - 32px));
  transform: translate(-50%, 120%);
  padding: 12px 16px;
  border: 1px solid rgba(255, 232, 163, 0.18);
  border-radius: 999px;
  color: var(--gold-soft);
  background: rgba(10, 13, 18, 0.92);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease;
}

.toast.is-open {
  transform: translate(-50%, 0);
}

.intro-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 46px);
}

.intro-modal[hidden] {
  display: none;
}

.intro-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 18%, rgba(216, 177, 93, 0.24), transparent 34%),
    rgba(4, 6, 10, 0.78);
  backdrop-filter: blur(16px);
}

.intro-dialog {
  position: relative;
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 0.74fr) minmax(320px, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 232, 163, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(20, 26, 34, 0.96), rgba(9, 12, 18, 0.98));
  box-shadow: 0 34px 96px rgba(0, 0, 0, 0.52);
}

.intro-art {
  min-height: 500px;
  display: grid;
  align-items: end;
  justify-items: center;
  overflow: hidden;
  border-right: 1px solid rgba(255, 232, 163, 0.12);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 232, 163, 0.18), transparent 46%),
    rgba(0, 0, 0, 0.18);
}

.intro-art img {
  max-width: 118%;
  max-height: 540px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 24px 32px rgba(0, 0, 0, 0.42));
}

.intro-copy {
  display: grid;
  align-content: center;
  padding: clamp(24px, 4vw, 42px);
}

.intro-copy h2,
.intro-copy p {
  margin: 0;
}

.intro-copy h2 {
  margin: 8px 0 14px;
  color: var(--gold-soft);
  font-family: var(--font-title);
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.intro-copy > p {
  color: var(--paper-muted);
  line-height: 1.85;
  font-size: 1rem;
}

.intro-flow,
.guide-flow {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.intro-flow:empty {
  display: none;
}

.intro-flow article,
.guide-flow article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 232, 163, 0.12);
  border-radius: 8px;
  background: rgba(255, 232, 163, 0.055);
}

.intro-flow b,
.guide-flow b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #211609;
  background: linear-gradient(145deg, #fff0b8, var(--gold));
  font-size: 0.76rem;
}

.intro-flow strong,
.intro-flow span,
.guide-flow strong,
.guide-flow span {
  display: block;
}

.intro-flow strong,
.guide-flow strong {
  color: var(--gold-soft);
  font-size: 0.9rem;
}

.intro-flow span,
.guide-flow span {
  margin-top: 2px;
  color: rgba(255, 247, 221, 0.66);
  line-height: 1.5;
  font-size: 0.78rem;
}

.intro-flow {
  max-height: min(48vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.guide-block {
  display: grid;
  gap: 8px;
}

.guide-block + .guide-block {
  margin-top: 18px;
}

.guide-block h3 {
  margin: 0;
  color: var(--gold-soft);
  font-family: var(--font-title);
  font-size: 1rem;
}

.guide-flow {
  margin-top: 0;
}

.guide-modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.guide-modules article {
  padding: 10px;
  border: 1px solid rgba(255, 232, 163, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.guide-modules strong,
.guide-modules span {
  display: block;
}

.guide-modules strong {
  color: var(--gold-soft);
  font-size: 0.84rem;
}

.guide-modules span {
  margin-top: 4px;
  color: rgba(255, 247, 221, 0.62);
  line-height: 1.5;
  font-size: 0.74rem;
}

.guide-walkthrough {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
  color: rgba(255, 247, 221, 0.72);
  line-height: 1.55;
  font-size: 0.78rem;
}

.intro-progress {
  display: flex;
  gap: 8px;
  margin: 24px 0;
}

.intro-progress span {
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 232, 163, 0.18);
}

.intro-progress span.is-active {
  background: linear-gradient(90deg, var(--gold), var(--jade));
}

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

.intro-actions .gold-button,
.intro-actions .soft-button {
  width: auto;
  min-width: 120px;
}

.character-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 46px);
}

.character-modal[hidden] {
  display: none;
}

.character-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(14px);
}

.character-dialog {
  position: relative;
  width: min(980px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  display: grid;
  grid-template-columns: minmax(260px, 0.84fr) minmax(320px, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 232, 163, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 16%, rgba(216, 177, 93, 0.2), transparent 36%),
    linear-gradient(145deg, rgba(20, 26, 34, 0.96), rgba(9, 12, 18, 0.98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}

.character-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  color: var(--gold-soft);
  font-size: 1.1rem;
}

.character-art {
  min-height: 520px;
  display: grid;
  align-items: end;
  justify-items: center;
  overflow: hidden;
  border-right: 1px solid rgba(255, 232, 163, 0.12);
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 232, 163, 0.16), transparent 42%),
    rgba(0, 0, 0, 0.18);
}

.character-art img {
  max-width: 112%;
  max-height: 560px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 24px 32px rgba(0, 0, 0, 0.4));
}

.character-info {
  min-width: 0;
  overflow: auto;
  padding: clamp(22px, 3vw, 34px);
}

.character-info h2 {
  margin: 6px 0 10px;
  color: var(--gold-soft);
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.character-tags,
.character-clues {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.character-tags span,
.character-clues span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 232, 163, 0.16);
  border-radius: 999px;
  color: var(--paper-muted);
  background: rgba(255, 232, 163, 0.06);
  font-size: 0.78rem;
  font-weight: 800;
}

.character-clues span.is-found {
  color: #bdf6e8;
  border-color: rgba(79, 183, 159, 0.34);
  background: rgba(79, 183, 159, 0.1);
}

.relation-stage-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.relation-stage-list article {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 232, 163, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.relation-stage-list b {
  align-self: start;
  padding: 4px 6px;
  border-radius: 999px;
  color: rgba(255, 247, 221, 0.64);
  background: rgba(255, 232, 163, 0.08);
  font-size: 0.66rem;
  text-align: center;
}

.relation-stage-list strong,
.relation-stage-list span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.relation-stage-list strong {
  color: var(--gold-soft);
  font-size: 0.82rem;
}

.relation-stage-list span {
  margin-top: 3px;
  color: rgba(255, 247, 221, 0.6);
  line-height: 1.48;
  font-size: 0.74rem;
}

.relation-stage-list article.is-unlocked {
  border-color: rgba(79, 183, 159, 0.26);
  background: rgba(79, 183, 159, 0.08);
}

.relation-stage-list article.is-unlocked b {
  color: #07120f;
  background: linear-gradient(145deg, #c8fff1, var(--jade));
}

.character-info p,
.character-facts dd {
  color: var(--paper-muted);
  line-height: 1.75;
}

.character-facts {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.character-facts div {
  padding: 12px;
  border: 1px solid rgba(255, 232, 163, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.character-facts dt {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.character-facts dd {
  margin: 0;
}

@media (max-width: 1180px) {
  .academy-app {
    padding-top: 112px;
  }

  .academy-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .academy-account {
    grid-column: 1 / -1;
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr) auto;
    justify-items: start;
  }

  .academy-account span,
  .academy-account strong,
  .academy-account button {
    grid-column: auto;
    grid-row: auto;
  }

  .academy-account strong {
    max-width: none;
  }

  .academy-stage {
    grid-template-columns: minmax(280px, 0.9fr) minmax(520px, 1.25fr);
  }

  .right-panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .deduction-panel {
    grid-column: 1 / -1;
  }

  .overlay-panel {
    inset: 112px 0 0;
  }
}

@media (max-width: 820px) {
  body {
    overflow-x: hidden;
  }

  .academy-topbar {
    position: static;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .academy-brand,
  .academy-day {
    justify-content: center;
    justify-items: center;
  }

  .academy-nav {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .academy-nav button {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

  .academy-auth {
    grid-template-columns: 1fr;
    overflow: auto;
    padding: 16px;
  }

  .academy-auth-panel {
    min-width: 0;
  }

  .auth-scene {
    min-height: 220px;
  }

  .academy-app {
    padding-top: 0;
  }

  .academy-stage,
  .right-panel,
  .case-layout,
  .character-dialog,
  .intro-dialog {
    grid-template-columns: 1fr;
  }

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

  .guide-modules {
    grid-template-columns: 1fr;
  }

  .character-art {
    min-height: 320px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 232, 163, 0.12);
  }

  .character-art img {
    max-height: 360px;
  }

  .intro-art {
    min-height: 300px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 232, 163, 0.12);
  }

  .intro-art img {
    max-height: 340px;
  }

  .overlay-panel {
    position: static;
    inset: auto;
    overflow: visible;
    padding: 12px;
  }

  .academy-map {
    min-height: 360px;
  }

  .location-node {
    width: 64px;
    min-height: 64px;
    padding: 6px;
    border-radius: 12px;
  }

  .location-node b {
    font-size: 1.3rem;
  }

  .location-node span {
    font-size: 0.74rem;
  }

  .location-node em {
    display: none;
  }

  .intro-dialog {
    max-height: calc(100vh - 24px);
    overflow: auto;
  }

  .knowledge-grid,
  .journal-list,
  .case-reference-grid,
  .academy-codex-grid {
    grid-template-columns: 1fr;
  }
}
