/* =========================================================
   记忆小地图 · 总部版
   参照《头脑特工队》美术：紫罗兰总部 + 记忆球货架
   发光记忆球 / 玻璃管道 / 奶油顶栏 / 九位情绪
   ========================================================= */

:root {
  /* 总部夜色 */
  --bg-0: #150a28;
  --bg-1: #241041;
  --bg-2: #3a1c63;
  --bg-3: #562b8f;
  --bg-4: #7b4bc0;
  --bg-5: #b98fe0;

  /* 字 */
  --ink: #2a1444;
  --ink-soft: #5b3d80;
  --muted: #7a5c9e;
  --on-dark: #f6efff;
  --on-dark-soft: rgba(246, 239, 255, .74);

  /* 纸牌 */
  --paper: #fffaf5;
  --paper-2: #f6ecff;
  --edge: #ffffff;

  /* 颜色 */
  --gold: #ffd24d;
  --gold-deep: #d9901a;
  --rose: #ff7ab3;
  --rose-deep: #c22a6b;
  --cyan: #6fd4ff;
  --cyan-deep: #1f7fb8;
  --mint: #7ee3b0;
  --violet: #b79be8;

  --radius: 24px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg-0);
}

body {
  margin: 0;
  background: transparent;
  color: var(--on-dark);
  font-family: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

button { font-family: inherit; }

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- 总部背景：紫色 + 记忆球货架 ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(100% 62% at 50% -10%, rgba(255, 106, 190, .36), transparent 64%),
    radial-gradient(64% 46% at 88% 6%, rgba(112, 200, 255, .18), transparent 70%),
    radial-gradient(70% 44% at 6% 34%, rgba(160, 106, 255, .22), transparent 72%),
    linear-gradient(180deg,
      #140924 0%,
      #22103d 16%,
      #321954 32%,
      #45207a 50%,
      #5a2b91 68%,
      #7440ad 86%,
      #8d58c4 100%);
}

.shelf {
  position: absolute;
  width: min(660px, 78vw);
  height: auto;
  opacity: .92;
}
.shelf-l { left: -190px; top: -160px; }
.shelf-r { right: -200px; top: -170px; transform: scaleX(-1); }

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}
.glow-a {
  width: 56vw; height: 46vw;
  left: 22%; top: -16%;
  background: radial-gradient(circle, rgba(255, 120, 200, .45), transparent 68%);
}
.glow-b {
  width: 44vw; height: 44vw;
  right: -8%; bottom: 4%;
  background: radial-gradient(circle, rgba(255, 200, 90, .22), transparent 70%);
}
.glow-c {
  width: 40vw; height: 40vw;
  left: -6%; bottom: 16%;
  background: radial-gradient(circle, rgba(110, 210, 255, .2), transparent 70%);
}

.floor {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 30%;
  background:
    radial-gradient(60% 100% at 50% 100%, rgba(216, 178, 255, .3), transparent 70%),
    linear-gradient(180deg, rgba(201, 166, 240, 0), rgba(198, 160, 240, .26));
}

.orb {
  position: absolute;
  border-radius: 50%;
  animation: floatOrb 9s ease-in-out infinite;
}
.orb-a {
  width: 20px; height: 20px; left: 7%; bottom: 30%;
  background: radial-gradient(circle at 34% 30%, #fff6c9, var(--gold) 58%, #e08a1f);
  box-shadow: 0 0 22px rgba(255, 210, 77, .7);
}
.orb-b {
  width: 14px; height: 14px; right: 9%; bottom: 26%;
  background: radial-gradient(circle at 34% 30%, #ffe3ea, var(--rose) 58%, #b0255f);
  box-shadow: 0 0 20px rgba(255, 122, 179, .7);
  animation-delay: -2.4s;
}
.orb-c {
  width: 11px; height: 11px; left: 16%; top: 20%;
  background: radial-gradient(circle at 34% 30%, #eafaff, var(--cyan) 58%, #1f7fb8);
  box-shadow: 0 0 18px rgba(111, 212, 255, .7);
  animation-delay: -4.6s;
}
.orb-d {
  width: 16px; height: 16px; right: 14%; top: 12%;
  background: radial-gradient(circle at 34% 30%, #f3ecff, var(--violet) 58%, #6f4ac0);
  box-shadow: 0 0 20px rgba(183, 155, 232, .7);
  animation-delay: -1.2s;
}
.orb-e {
  width: 12px; height: 12px; left: 48%; bottom: 10%;
  background: radial-gradient(circle at 34% 30%, #e9fff4, var(--mint) 58%, #2aa87a);
  box-shadow: 0 0 18px rgba(126, 227, 176, .6);
  animation-delay: -6s;
}
.orb-f {
  width: 9px; height: 9px; left: 30%; bottom: 44%;
  background: radial-gradient(circle at 34% 30%, #fff0d0, #ffb066 58%, #d9761f);
  box-shadow: 0 0 16px rgba(255, 176, 102, .6);
  animation-delay: -3.2s;
}

@keyframes floatOrb {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -16px, 0); }
}

/* ---------- 顶栏：浮着的奶油片名牌 ---------- */
.top {
  position: sticky;
  top: 10px;
  z-index: 30;
  width: min(1040px, calc(100% - 24px));
  margin: 12px auto 0;
  padding: 8px 10px 8px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(46, 22, 78, .92), rgba(32, 14, 58, .94));
  border: 2px solid rgba(255, 255, 255, .26);
  box-shadow:
    0 7px 0 rgba(9, 3, 20, .5),
    0 18px 38px rgba(8, 2, 20, .55),
    inset 0 1px 0 rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-badge {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, #fff7c8, var(--gold) 56%, #e08a1f);
  box-shadow:
    inset -2px -4px 8px rgba(150, 90, 10, .45),
    inset 2px 2px 6px rgba(255, 255, 255, .85),
    0 0 18px rgba(255, 210, 77, .55);
}
.brand-text { min-width: 0; }
.brand-text h1 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: clamp(19px, 2.6vw, 25px);
  font-weight: 900;
  letter-spacing: .01em;
  line-height: 1.15;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(255, 120, 190, .35);
}
.badge-hq {
  display: inline-block;
  padding: 2px 8px 3px;
  border-radius: 8px;
  font-size: .5em;
  font-weight: 900;
  letter-spacing: .06em;
  color: #4a0c26;
  background: linear-gradient(180deg, #ffc7e0, #ff6aa8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 0 rgba(140, 20, 70, .45);
  transform: rotate(-4deg) translateY(-1px);
}
.brand-text p {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--on-dark-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.icon-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  border: 2px solid rgba(255, 255, 255, .3);
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(9, 3, 20, .45);
  transition: transform .12s, box-shadow .12s, background .2s;
}
.icon-btn:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .1)); }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(9, 3, 20, .45); }
.icon-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn .fs-exit { display: none; }
.icon-btn.is-fs .fs-enter { display: none; }
.icon-btn.is-fs .fs-exit { display: block; }

/* ---------- 开场：一张海报 ---------- */
main, .foot { position: relative; z-index: 1; }

.intro {
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 20px 26px;
}

.notice {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 10px;
  align-items: center;
  padding: 26px 26px 22px;
  border-radius: 34px;
  background:
    radial-gradient(90% 80% at 86% 10%, rgba(255, 120, 190, .3), transparent 62%),
    radial-gradient(80% 70% at 6% 100%, rgba(111, 212, 255, .16), transparent 62%),
    linear-gradient(168deg, #3f2070 0%, #2a1148 56%, #1c0c33 100%);
  border: 3px solid rgba(255, 255, 255, .9);
  box-shadow:
    0 10px 0 rgba(10, 2, 24, .42),
    0 30px 60px rgba(10, 0, 30, .5),
    inset 0 0 90px rgba(255, 120, 190, .14);
  overflow: hidden;
}
.notice::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 9px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 190, 230, .7), transparent);
  pointer-events: none;
}

.notice-copy { position: relative; z-index: 1; min-width: 0; }
.notice-kicker {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  color: #ffd9ec;
  background: rgba(255, 122, 179, .16);
  border: 1px solid rgba(255, 122, 179, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 18px rgba(255, 122, 179, .24);
}
.notice-title {
  margin: 0 0 8px;
  font-size: clamp(32px, 5.4vw, 50px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: .02em;
  color: #fff;
  text-shadow:
    0 3px 0 rgba(90, 20, 70, .5),
    0 0 34px rgba(255, 122, 179, .5);
}
.notice-title span {
  background: linear-gradient(180deg, #fff3b0, var(--gold) 62%, #ff9a3c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 0 rgba(90, 20, 70, .45));
}
.notice-sub {
  margin: 0 0 10px;
  font-size: clamp(14px, 2vw, 16px);
  font-weight: 700;
  color: #ffc9e4;
}
.lead {
  margin: 0;
  font-size: clamp(14.5px, 2vw, 16.5px);
  font-weight: 600;
  line-height: 1.9;
  color: #ddd0f6;
  text-wrap: pretty;
}
.lead b {
  color: #ffe08a;
  font-weight: 900;
  padding: 0 2px;
  border-bottom: 3px solid rgba(255, 210, 77, .6);
  border-radius: 2px;
}

/* 主视觉：九位里的三位 */
.hq-cast {
  position: relative;
  z-index: 1;
  width: 310px;
  height: 208px;
  justify-self: end;
  align-self: end;
  margin-bottom: -30px;
}
.hc { position: absolute; display: block; }
.hc .face {
  display: block;
  width: 100%;
  height: auto;
}
.hc-mid {
  width: 198px;
  left: 56px;
  top: 0;
  z-index: 3;
  filter: drop-shadow(0 16px 26px rgba(4, 0, 16, .65)) drop-shadow(0 0 26px rgba(255, 210, 77, .35));
  animation: bob 5.6s ease-in-out infinite;
}
.hc-l {
  width: 124px;
  left: -2px;
  top: 78px;
  z-index: 2;
  transform: rotate(-7deg);
  filter: drop-shadow(0 12px 20px rgba(4, 0, 16, .6));
  animation: bob 6.4s ease-in-out infinite -1.4s;
}
.hc-r {
  width: 128px;
  right: -2px;
  top: 80px;
  z-index: 2;
  transform: rotate(7deg);
  filter: drop-shadow(0 12px 20px rgba(4, 0, 16, .6));
  animation: bob 7.2s ease-in-out infinite -2.6s;
}
.hc-glow {
  position: absolute;
  left: 50%;
  top: 8%;
  width: 300px;
  height: 300px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 77, .26), rgba(255, 122, 179, .16) 42%, transparent 68%);
  filter: blur(8px);
}
.hc-orb {
  position: absolute;
  border-radius: 50%;
  animation: floatOrb 7s ease-in-out infinite;
}
.hc-orb-a {
  width: 13px; height: 13px; left: 30px; top: 40px;
  background: radial-gradient(circle at 34% 30%, #fff6c9, var(--gold) 58%, #e08a1f);
  box-shadow: 0 0 16px rgba(255, 210, 77, .8);
}
.hc-orb-b {
  width: 10px; height: 10px; right: 34px; top: 30px;
  background: radial-gradient(circle at 34% 30%, #eafaff, var(--cyan) 58%, #1f7fb8);
  box-shadow: 0 0 14px rgba(111, 212, 255, .8);
  animation-delay: -2s;
}
.hc-orb-c {
  width: 9px; height: 9px; left: 8px; bottom: 44px;
  background: radial-gradient(circle at 34% 30%, #ffe3ea, var(--rose) 58%, #b0255f);
  box-shadow: 0 0 14px rgba(255, 122, 179, .8);
  animation-delay: -3.6s;
}
.hc-orb-d {
  width: 11px; height: 11px; right: 12px; bottom: 34px;
  background: radial-gradient(circle at 34% 30%, #e9fff4, var(--mint) 58%, #2aa87a);
  box-shadow: 0 0 14px rgba(126, 227, 176, .7);
  animation-delay: -1.2s;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* ---------- 切换 + 图例 ---------- */
.intro .view-switch { margin-top: 16px; }

.view-switch {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  background: rgba(20, 8, 38, .55);
  border: 2px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  box-shadow: 0 5px 0 rgba(9, 3, 20, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.view-switch button {
  border: 0;
  background: transparent;
  color: var(--on-dark-soft);
  font-size: 13.5px;
  font-weight: 900;
  padding: 8px 15px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, color .2s, box-shadow .2s, transform .12s;
}
.view-switch button:active { transform: translateY(1px); }
.view-switch button[aria-pressed="true"] {
  background: linear-gradient(180deg, #ffe98f, #ffb84d);
  color: #5c3310;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .75), 0 3px 8px rgba(210, 140, 40, .4);
}
.view-switch button[data-view="ai"][aria-pressed="true"] {
  background: linear-gradient(180deg, #b9ecff, #6bb9f0);
  color: #123a56;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .8), 0 3px 8px rgba(60, 140, 200, .45);
}

.legend { margin-top: 16px; display: grid; gap: 8px; }
.legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 13px;
  border-radius: 15px;
  background: rgba(28, 12, 52, .55);
  border: 2px solid rgba(255, 255, 255, .18);
  border-left: 5px solid var(--rose);
  box-shadow: 0 3px 0 rgba(9, 3, 20, .3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.legend-row.ai { border-left-color: var(--cyan); }
.legend-row .who {
  font-size: 12.5px;
  font-weight: 900;
  color: #ffc9e4;
  white-space: nowrap;
}
.legend-row.ai .who { color: #b6e9ff; }
.chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chips span {
  font-size: 12.5px;
  font-weight: 700;
  color: #2a1444;
  background: linear-gradient(180deg, #fffdf8, #f3e6ff);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 9px;
  padding: 3px 9px;
  box-shadow: 0 2px 0 rgba(10, 2, 24, .2);
}
.chips i { font-style: normal; color: rgba(246, 239, 255, .55); font-size: 12px; font-weight: 900; }

/* ---------- 地图：玻璃记忆管道 ---------- */
.map {
  --side: 20px;
  --rail: 62px;
  --dot: 42px;
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px var(--side) 4px;
}
.map::before {
  content: "";
  position: absolute;
  left: calc(var(--side) + var(--dot) / 2 - 4px);
  top: 40px;
  bottom: 46px;
  width: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg,
    #ffd76b 0%,
    #ff8fb1 32%,
    #6fd4ff 68%,
    #b79be8 100%);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, .16),
    0 0 22px rgba(255, 150, 210, .55),
    0 0 46px rgba(120, 190, 255, .3);
  z-index: 0;
}

.stop {
  position: relative;
  padding-left: var(--rail);
  margin-bottom: 34px;
  z-index: 1;
}

.stop-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.num {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  color: #4a2a08;
  font-size: 17px;
  font-weight: 900;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 34% 26%, #fffce0, var(--num-c, var(--gold)) 56%, var(--num-d, #ef9a2c));
  box-shadow:
    inset -3px -4px 8px rgba(150, 80, 10, .3),
    inset 3px 3px 8px rgba(255, 255, 255, .8),
    0 0 0 4px rgba(255, 255, 255, .92),
    0 0 24px var(--num-g, rgba(255, 210, 77, .6)),
    0 6px 14px rgba(6, 0, 16, .45);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
}
.stop[data-id="door"] .num { --num-c: #ffd45c; --num-d: #f09a2c; --num-g: rgba(255, 200, 70, .65); }
.stop[data-id="sensory"] .num { --num-c: #8fe0c0; --num-d: #2fa87f; color: #0d4c38; --num-g: rgba(120, 235, 190, .6); }
.stop[data-id="working"] .num { --num-c: #ffa8b4; --num-d: #d8505f; color: #5d1c25; --num-g: rgba(255, 140, 170, .6); }
.stop[data-id="long"] .num { --num-c: #c8b3ff; --num-d: #7a5bd0; color: #2c1b52; --num-g: rgba(180, 150, 255, .65); }
.stop[data-id="out"] .num { --num-c: #a5dcff; --num-d: #2f8ec4; color: #0e3a53; --num-g: rgba(120, 205, 255, .65); }

.stop-title h2 {
  margin: 0;
  font-size: clamp(17px, 2.3vw, 21px);
  font-weight: 900;
  letter-spacing: .01em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(8, 0, 20, .6);
}
.link-chip {
  font-size: 11.5px;
  font-weight: 900;
  color: #4a2a08;
  background: linear-gradient(180deg, #fff3b8, #ffcf5c);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  padding: 3px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 2px 8px rgba(6, 0, 16, .35);
  white-space: nowrap;
}
.link-chip::before { content: "≈ "; color: #a25c00; }

.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  align-items: stretch;
}
.tie {
  position: relative;
  display: grid;
  place-items: center;
}
.tie::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  border-top: 2px dashed rgba(255, 255, 255, .32);
}
.tie i { display: none; }
.tie span {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, #fffdf4, #ffe3ad 62%, #f4bf5e);
  color: #8a5a1a;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    inset -2px -3px 6px rgba(170, 110, 30, .28),
    inset 2px 2px 5px rgba(255, 255, 255, .85),
    0 0 0 3px rgba(255, 255, 255, .18),
    0 3px 10px rgba(6, 0, 16, .4);
}

.node {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0;
  padding: 17px 17px 13px;
  border-radius: var(--radius);
  border: 2px solid rgba(255, 255, 255, .85);
  cursor: pointer;
  color: var(--ink);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.node::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  background: var(--node-bar);
}
.node::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -34px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--node-glow, rgba(255, 140, 180, .35)), transparent 68%);
  opacity: .55;
  pointer-events: none;
}
.node.brain {
  --node-bar: linear-gradient(90deg, #ff8fb1, #ffc46b);
  --node-glow: rgba(255, 130, 180, .4);
  background: linear-gradient(178deg, #fffcfa 0%, #ffe9f3 100%);
  box-shadow: 0 6px 0 rgba(84, 24, 60, .45), 0 16px 30px rgba(10, 0, 26, .38);
}
.node.ai {
  --node-bar: linear-gradient(90deg, #6fd4ff, #b7a4ff);
  --node-glow: rgba(111, 212, 255, .4);
  background: linear-gradient(178deg, #fbfeff 0%, #e5f4ff 100%);
  box-shadow: 0 6px 0 rgba(24, 60, 96, .45), 0 16px 30px rgba(10, 0, 26, .38);
}
.node:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 0 rgba(84, 24, 60, .45), 0 24px 40px rgba(10, 0, 26, .45), 0 0 26px rgba(255, 150, 200, .35);
}
.node.ai:hover { box-shadow: 0 10px 0 rgba(24, 60, 96, .45), 0 24px 40px rgba(10, 0, 26, .45), 0 0 26px rgba(111, 212, 255, .4); }
.node:active { transform: translateY(1px) scale(.995); }
.node:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.node-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}
.node-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, #fff, var(--tint, #ffd0d8) 56%, var(--tint-deep, #ff9aa6));
  box-shadow:
    inset -3px -3px 7px rgba(110, 50, 80, .2),
    inset 2px 2px 5px rgba(255, 255, 255, .85),
    0 3px 10px rgba(60, 0, 40, .2);
}
.node.brain .node-icon { --tint: #ffd0d8; --tint-deep: #ff9aa6; }
.node.ai .node-icon { --tint: #c9edff; --tint-deep: #6fc1ee; }
.node-who {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .05em;
  color: var(--rose-deep);
}
.node.ai .node-who { color: var(--cyan-deep); }
.node-title {
  position: relative;
  display: block;
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 900;
  line-height: 1.4;
  color: #2a1038;
}
.node-short {
  position: relative;
  display: block;
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #6a4460;
}
.node.ai .node-short { color: #3f5f78; }
.node-more {
  position: relative;
  display: block;
  margin-top: auto;
  padding-top: 10px;
  font-size: 11.5px;
  font-weight: 900;
  color: var(--rose-deep);
  opacity: .9;
}
.node.ai .node-more { color: var(--cyan-deep); }

/* 只看一边 */
body.view-brain .pair,
body.view-ai .pair { grid-template-columns: minmax(0, 1fr); max-width: 680px; }
body.view-brain .link-chip,
body.view-ai .link-chip { display: none; }
body.view-brain .node.ai,
body.view-brain .tie,
body.view-ai .node.brain,
body.view-ai .tie { display: none; }

/* 「电影里」只讲人脑总部：只看 AI 时整节收起 */
body.view-ai .movie { display: none; }
body.view-brain .ai-hq { display: none; }
body.view-brain #labContext,
body.view-brain #labCat,
body.view-brain #labGuess,
body.view-brain #labAttend { display: none; }
body.view-ai #labMemory,
body.view-ai #labFlash,
body.view-ai #labWire,
body.view-ai #labSimon,
body.view-ai #labEmotion { display: none; }

/* ---------- 电影里 ---------- */
.movie {
  max-width: 1040px;
  margin: 14px auto 0;
  padding: 24px 24px 20px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 122, 179, .2), transparent 46%),
    radial-gradient(circle at 92% 18%, rgba(111, 212, 255, .16), transparent 50%),
    linear-gradient(170deg, #33195a 0%, #241141 58%, #1b0c33 100%);
  border: 2px solid rgba(255, 255, 255, .24);
  box-shadow:
    0 8px 0 rgba(9, 3, 20, .45),
    0 24px 48px rgba(8, 0, 22, .45),
    inset 0 0 80px rgba(255, 122, 179, .08);
  color: var(--on-dark);
}
.movie-kicker {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  color: #ffe08a;
  background: rgba(255, 210, 77, .14);
  border: 1px solid rgba(255, 210, 77, .45);
}
.movie-head h2 {
  margin: 9px 0 6px;
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: .01em;
}
.movie-head p {
  margin: 0;
  max-width: 800px;
  font-size: 13px;
  line-height: 1.8;
  color: #cbb8ea;
}
.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.movie-card {
  position: relative;
  padding: 15px 15px 13px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
  overflow: hidden;
}
.movie-card::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -26px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--mc, #ffd45c), transparent 68%);
  opacity: .2;
}
.movie-orb {
  display: block;
  width: 36px;
  height: 36px;
  margin-bottom: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, #fff, var(--mc, #ffd45c) 56%, var(--md, #ef9a2c));
  box-shadow:
    inset -3px -4px 8px rgba(60, 20, 70, .35),
    inset 2px 2px 5px rgba(255, 255, 255, .8),
    0 0 20px var(--mg, rgba(255, 212, 92, .55));
}
.tone-joy { --mc: #ffd75e; --md: #f0a11f; --mg: rgba(255, 215, 94, .55); }
.tone-gold { --mc: #ffc76b; --md: #e08a1f; --mg: rgba(255, 199, 107, .55); }
.tone-sad { --mc: #7fc4ee; --md: #3f86bd; --mg: rgba(127, 196, 238, .55); }
.tone-violet { --mc: #b39af7; --md: #7a5bd0; --mg: rgba(179, 154, 247, .55); }
.movie-scene {
  margin: 0;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .12em;
  color: #ffd76b;
}
.movie-card h3 {
  margin: 4px 0 6px;
  font-size: 15.5px;
  font-weight: 900;
  line-height: 1.4;
  color: #ffffff;
}
.movie-story {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.75;
  color: #e2d5f6;
}
.movie-islands {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0 0;
}
.movie-islands span {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  color: #f6efff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  white-space: nowrap;
}
.movie-real {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, .22);
  font-size: 11.5px;
  line-height: 1.65;
  color: #b7a3d6;
}
.movie-real b { color: #ffd76b; }
.movie-note {
  margin: 14px 0 0;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.7;
  color: #a794c8;
}

/* ---------- 回头路 ---------- */
.loop {
  max-width: 1040px;
  margin: 34px auto 0;
  padding: 4px 20px 0;
}
.loop h2,
.lab > h2,
.diff > h2 {
  margin: 0 0 12px;
  font-size: clamp(19px, 2.2vw, 23px);
  font-weight: 900;
  color: #fff;
  letter-spacing: .01em;
  text-shadow: 0 2px 14px rgba(8, 0, 20, .55);
}
.loop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.loop-card {
  position: relative;
  border-radius: 20px;
  padding: 15px 17px 14px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink);
  border: 2px solid rgba(255, 255, 255, .85);
  box-shadow: 0 6px 0 rgba(9, 3, 20, .38), 0 14px 26px rgba(8, 0, 22, .35);
  overflow: hidden;
}
.loop-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: var(--bar);
}
.loop-card p { margin: 0; }
.loop-card .small { margin-top: 6px; font-size: 12.5px; opacity: .82; }
.loop-card.brain { --bar: linear-gradient(180deg, #ff8fb1, #ffc46b); background: linear-gradient(178deg, #fffcfa, #ffe9f3); }
.loop-card.ai { --bar: linear-gradient(180deg, #6fd4ff, #b7a4ff); background: linear-gradient(178deg, #fbfeff, #e5f4ff); }
.loop-note {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--on-dark-soft);
}

/* ---------- 小实验 ---------- */
.lab {
  max-width: 1040px;
  margin: 38px auto 0;
  padding: 0 20px;
}
.lab-lead {
  margin: 10px 0 16px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--on-dark-soft);
}
.lab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.lab-card {
  background: linear-gradient(178deg, #fffcf8 0%, #f4e9ff 100%);
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 24px;
  padding: 18px 18px 17px;
  color: var(--ink);
  box-shadow: 0 7px 0 rgba(9, 3, 20, .4), 0 18px 32px rgba(8, 0, 22, .38);
}
.lab-head { display: flex; flex-direction: column; gap: 4px; }
.lab-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  color: #8a2a52;
  background: #ffe1ec;
  border-radius: 999px;
  padding: 2px 9px;
}
#labGuess .lab-tag { color: #1d5f82; background: #ddf3ff; }
.lab-card h3 { margin: 0; font-size: clamp(18px, 2vw, 21px); font-weight: 900; color: #2a1038; }
.lab-desc { margin: 8px 0 13px; font-size: 13px; color: #6a4460; line-height: 1.7; }

.mem-show {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 11px;
}
.mem-show span {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  font-size: clamp(24px, 5vw, 38px);
  background: linear-gradient(180deg, #fffdf8, #f6ecff);
  border: 3px solid #fff;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(200, 170, 235, .5), 0 3px 0 rgba(90, 30, 120, .16);
}
.mem-bar {
  height: 8px;
  border-radius: 999px;
  background: #e7daf6;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(80, 30, 120, .2);
}
.mem-bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffe98f, #ffc53f 52%, #ff9d2e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
  animation: membar 4s linear forwards;
}
@keyframes membar { from { width: 100%; } to { width: 0; } }

.mem-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.mem-choice {
  aspect-ratio: 1 / 1;
  font-size: clamp(24px, 5vw, 34px);
  background: linear-gradient(180deg, #fffdf8, #f7f1ff);
  border: 3px solid #fff;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(200, 170, 235, .55), 0 3px 0 rgba(90, 30, 120, .18);
  transition: transform .12s, background .12s, border-color .12s, box-shadow .12s;
}
.mem-choice:hover { transform: translateY(-2px); border-color: #ffd7ea; }
.mem-choice.sel {
  background: linear-gradient(180deg, #fff9df, #ffeaa8);
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 197, 63, .5), 0 3px 0 #d98f1f;
  transform: scale(1.04);
}
.mem-choice.hit { background: linear-gradient(180deg, #effce9, #d7f4cc); border-color: #79c466; }
.mem-choice.miss { background: linear-gradient(180deg, #fffbe3, #ffefad); border-color: #e6bf3f; }
.mem-choice.wrong { background: linear-gradient(180deg, #fff0f0, #ffdada); border-color: #e08585; }
.mem-choice:disabled { cursor: default; opacity: 1; }

.mem-actions { margin-top: 13px; }

/* 糖果按钮 */
.mc-btn {
  border: 2px solid #ffb02e;
  border-radius: 999px;
  padding: 9px 22px 11px;
  font-size: 14px;
  font-weight: 900;
  color: #5a3310;
  background: linear-gradient(180deg, #ffe98f 0%, #ffc945 52%, #ffab33 100%);
  cursor: pointer;
  box-shadow: 0 4px 0 #d98f1f, inset 0 2px 0 rgba(255, 255, 255, .8);
  transition: transform .12s, box-shadow .12s, opacity .15s, filter .2s;
}
.mc-btn:hover { filter: brightness(1.05); }
.mc-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #d98f1f, inset 0 2px 0 rgba(255, 255, 255, .8);
}
.mc-btn:disabled {
  opacity: .5;
  cursor: default;
  filter: saturate(.7);
  transform: none;
  box-shadow: 0 3px 0 #dfae6f;
}

.lab-result {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #6a4460;
}
.lab-result.show {
  margin-top: 12px;
  background: #fff4e2;
  border: 2px dashed #ffd898;
  border-radius: 14px;
  padding: 10px 13px;
  animation: fadeUp .2s ease;
}

.guess-sentence {
  margin: 4px 0 14px;
  font-size: clamp(20px, 3.6vw, 25px);
  font-weight: 900;
  line-height: 1.7;
  color: #2a1038;
}
.guess-sentence .blank {
  display: inline-block;
  min-width: 2em;
  margin: 0 4px;
  text-align: center;
  color: var(--cyan-deep);
  border-bottom: 3px dashed var(--gold);
}
.guess-options { display: flex; flex-wrap: wrap; gap: 8px; }
.guess-opt {
  font-size: 16px;
  font-weight: 800;
  color: #2f5568;
  background: linear-gradient(180deg, #ffffff, #eef8ff);
  border: 2px solid #c3e7f7;
  border-radius: 14px;
  padding: 8px 18px;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(110, 170, 205, .35);
  transition: transform .12s, border-color .12s, background .12s, box-shadow .12s;
}
.guess-opt:hover { border-color: #8ccfe9; background: #f6fcff; transform: translateY(-1px); }
.guess-opt:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(110, 170, 205, .35); }
.guess-opt.correct {
  background: linear-gradient(180deg, #effce9, #d7f4cc);
  border-color: #79c466;
  color: #245c1a;
  box-shadow: 0 3px 0 #6cb455;
}
.guess-opt:disabled { cursor: default; opacity: .65; }
.guess-opt.correct:disabled { opacity: 1; }
.guess-foot { margin-top: 12px; }

.shake { animation: shake .35s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

/* ---------- AI 的总部 ---------- */
.ai-hq {
  max-width: 1040px;
  margin: 20px auto 0;
  padding: 24px 24px 20px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 0%, rgba(111, 212, 255, .2), transparent 48%),
    radial-gradient(circle at 6% 22%, rgba(183, 155, 232, .18), transparent 52%),
    linear-gradient(170deg, #142a4d 0%, #101f3d 58%, #0b1730 100%);
  border: 2px solid rgba(255, 255, 255, .24);
  box-shadow:
    0 8px 0 rgba(3, 8, 22, .5),
    0 24px 48px rgba(2, 8, 22, .45),
    inset 0 0 80px rgba(111, 212, 255, .08);
  color: var(--on-dark);
}
.ai-hq-head h2 {
  margin: 9px 0 6px;
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 900;
  color: #ffffff;
}
.ai-hq-head p {
  margin: 0;
  max-width: 820px;
  font-size: 13px;
  line-height: 1.8;
  color: #a8c6e6;
}
.ai-hq-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.ai-hq-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 15px 14px 13px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
  transition: transform .18s ease, border-color .18s ease;
}
.ai-hq-card:hover { transform: translateY(-3px); border-color: rgba(111, 212, 255, .5); }
.ai-hq-orb {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 9px;
  font-size: 19px;
  line-height: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, #fff, #8ed4f6 58%, #3f86bd);
  box-shadow: inset -3px -4px 8px rgba(10, 30, 60, .35), inset 2px 2px 5px rgba(255, 255, 255, .8), 0 0 20px rgba(111, 212, 255, .5);
}
.ai-hq-pair {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0 0 7px;
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.35;
  color: #dcefff;
}
.ai-hq-pair .row { display: flex; align-items: center; gap: 5px; }
.ai-hq-pair .row i { flex: none; font-style: normal; font-weight: 900; color: #ffd76b; }
.ai-hq-pair b {
  font-size: 9.5px;
  letter-spacing: .06em;
  color: #8fb7d8;
  background: rgba(255, 255, 255, .09);
  border-radius: 999px;
  padding: 1px 6px;
}
.ai-hq-pair i { font-style: normal; color: #ffd76b; font-weight: 900; }
.ai-hq-card h3 {
  margin: 0 0 6px;
  font-size: 14.5px;
  font-weight: 900;
  line-height: 1.45;
  color: #ffffff;
}
.ai-hq-card p {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.7;
  color: #c3d8ef;
}
.ai-hq-go {
  align-self: flex-start;
  margin-top: auto;
  padding: 5px 12px 6px;
  font-size: 11.5px;
  font-weight: 900;
  color: #0d2c46;
  background: linear-gradient(180deg, #d5f4ff, #8ed4f6);
  border: 1.5px solid #4aa6dd;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 3px 0 #3d8dbe, inset 0 2px 0 rgba(255, 255, 255, .85);
  transition: transform .12s, box-shadow .12s;
}
.ai-hq-go:active { transform: translateY(2px); box-shadow: 0 1px 0 #3d8dbe; }

/* ---------- 小游戏：控制台 / 认猫 / 打分 ---------- */
.lab-wide { grid-column: 1 / -1; }
.lab-card.flash { animation: labFlash 1.4s ease; }
@keyframes labFlash {
  0%, 100% { box-shadow: 0 7px 0 rgba(9, 3, 20, .4), 0 18px 32px rgba(8, 0, 22, .38); }
  25%, 60% { box-shadow: 0 7px 0 rgba(9, 3, 20, .4), 0 0 0 4px rgba(111, 212, 255, .75), 0 18px 32px rgba(8, 0, 22, .38); }
}

.ctx-stage { display: flex; flex-direction: column; gap: 10px; }
.ctx-slots { display: flex; flex-wrap: wrap; gap: 7px; }
.ctx-slot {
  flex: 1 1 0;
  min-width: 46px;
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 4px 6px;
  font-size: 13px;
  font-weight: 900;
  color: #b9a9d2;
  background: repeating-linear-gradient(135deg, #efe6fb 0 6px, #e7dbf7 6px 12px);
  border: 2px dashed #cdb9e8;
  border-radius: 13px;
  transition: background .2s, border-color .2s, transform .2s;
}
.ctx-slot.filled {
  color: #2a1038;
  background: linear-gradient(180deg, #ffffff, #e8f6ff);
  border: 2px solid #8ed4f6;
  box-shadow: 0 3px 0 rgba(80, 150, 190, .3);
  animation: popIn .22s ease;
}
.ctx-dump {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 13px;
  background: linear-gradient(180deg, #2a1444, #1a0c2e);
  border: 1px solid rgba(255, 255, 255, .14);
}
.ctx-dump > span {
  flex: none;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .05em;
  color: #b09ad0;
}
.ctx-dump-items { display: flex; flex-wrap: wrap; gap: 5px; min-height: 20px; }
.ctx-dump-items span {
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 800;
  color: #e2d5f6;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  animation: popIn .22s ease;
}
.ctx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.ctx-count { font-size: 12px; color: #7a5c9e; }
.ctx-question { margin: 0 0 8px; font-size: 15px; font-weight: 900; color: #2a1038; }
.ctx-options { display: flex; flex-wrap: wrap; gap: 8px; }

.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 6px 7px;
  background: linear-gradient(180deg, #fffdf8, #f6ecff);
  border: 2px solid #e2d3f5;
  border-radius: 15px;
  cursor: pointer;
  transition: transform .14s, border-color .14s, box-shadow .14s;
}
.cat-card svg { width: 100%; max-width: 64px; height: auto; display: block; }
.cat-card span { font-size: 11.5px; font-weight: 900; color: #6a4460; }
.cat-card:hover { transform: translateY(-2px); border-color: #c9aee8; }
.cat-card.sel {
  border-color: var(--gold);
  background: linear-gradient(180deg, #fffbe6, #fff0bd);
  box-shadow: 0 0 0 2px rgba(255, 197, 63, .45), 0 3px 0 #d98f1f;
}
.cat-test[hidden] { display: none; }
.cat-test {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 15px;
  background: linear-gradient(180deg, #f4faff, #e4f4ff);
  border: 2px solid #c3e7f7;
}
.cat-test-card {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 64px;
}
.cat-test-card svg { width: 54px; height: 54px; display: block; }
.cat-test-card b { font-size: 11px; color: #2f5568; }
.cat-bubble {
  position: relative;
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 900;
  color: #10374f;
  background: #ffffff;
  border: 2px solid #8ed4f6;
  border-radius: 14px;
  box-shadow: 0 3px 0 rgba(80, 150, 190, .25);
}
.cat-actions { margin-top: 12px; }

.guess-opt {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  min-width: 96px;
  padding: 8px 12px 9px;
}
.guess-word { font-size: 16px; font-weight: 900; line-height: 1.3; text-align: center; }
.guess-meter {
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transition: opacity .3s ease;
}
.guess-opt.scored .guess-meter { opacity: 1; }
.guess-meter i {
  display: block;
  flex: 1;
  height: 6px;
  min-width: 30px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8ed4f6, #4aa6dd);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
}
.guess-meter b {
  font-size: 10.5px;
  font-weight: 900;
  color: #2f5568;
  font-variant-numeric: tabular-nums;
}
.guess-opt.top { border-color: #4aa6dd; box-shadow: 0 0 0 2px rgba(111, 212, 255, .55), 0 3px 0 rgba(110, 170, 205, .35); }
.guess-opt.top .guess-meter i { background: linear-gradient(90deg, #ffd75e, #f0a11f); }
.guess-opt.top .guess-meter b { color: #a2670f; }

/* ---------- 小游戏：记忆球排队 ---------- */
.simon-stage { display: flex; flex-direction: column; gap: 10px; }
.simon-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 200px));
  justify-content: center;
  gap: 10px;
}
.simon-orb {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 3px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  background: radial-gradient(circle at 32% 24%, #fff 0 5%, var(--c1) 36%, var(--c2) 100%);
  box-shadow:
    inset -6px -9px 16px rgba(50, 10, 70, .3),
    inset 4px 5px 10px rgba(255, 255, 255, .72),
    0 5px 0 rgba(70, 25, 100, .28);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.simon-orb::after {
  content: '';
  position: absolute;
  left: 18%;
  top: 12%;
  width: 26%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .95), transparent 70%);
  transform: rotate(-25deg);
  pointer-events: none;
}
.simon-orb .simon-face {
  position: absolute;
  inset: 7% 7% 18%;
  display: grid;
  place-items: center;
}
.simon-orb svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 3px rgba(40, 10, 60, .25)); }
.simon-orb .simon-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7%;
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 2px rgba(40, 10, 60, .65);
}
.simon-orb:hover { transform: translateY(-2px); }
.simon-orb:active { transform: translateY(1px) scale(.98); }
.simon-orb.lit {
  transform: translateY(-3px) scale(1.06);
  filter: brightness(1.16) saturate(1.15);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, .55),
    0 0 30px 10px var(--c1),
    inset -6px -9px 16px rgba(50, 10, 70, .2),
    inset 4px 5px 10px rgba(255, 255, 255, .8),
    0 5px 0 rgba(70, 25, 100, .28);
}
.simon-orb:disabled { cursor: default; }
.simon-orb.dim { filter: grayscale(.35) brightness(.9); }
.simon-orb.dim.lit { filter: brightness(1.18) saturate(1.18); }
.simon-status {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
  color: #7a5c9e;
}
.simon-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- 小游戏：记住洞口，打地鼠 ---------- */
.flash-stage {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin-top: 4px;
}
.flash-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 24px;
  background: linear-gradient(180deg, #dff6c8, #b7e296 62%, #9ed37c);
  border: 3px solid rgba(255, 255, 255, .85);
  box-shadow:
    inset 0 7px 0 rgba(255, 255, 255, .5),
    inset 0 -9px 18px rgba(46, 84, 24, .25),
    0 8px 0 rgba(74, 48, 120, .2);
}
.flash-hole {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: radial-gradient(circle at 50% 74%, #150c1f 0 30%, #2b1a3a 31% 39%, #6b4226 40% 53%, #4f8f3a 54% 100%);
  box-shadow: inset 0 -6px 12px rgba(24, 52, 12, .35), inset 0 8px 12px rgba(10, 4, 18, .28);
}
.flash-hole:disabled { cursor: default; }
.flash-hole:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.flash-hole.show {
  background: radial-gradient(circle at 50% 72%, #4a2f66 0 27%, #6b4a86 28% 36%, #8a5a34 37% 52%, #67bb4c 53% 100%);
}
.flash-orb {
  position: absolute;
  left: 50%;
  top: 66%;
  width: 34%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(.35);
  opacity: 0;
  z-index: 1;
  background: radial-gradient(circle at 34% 28%, #fff 0 7%, #ffe9a8 36%, #ffb03a 100%);
  box-shadow: 0 0 16px 5px rgba(255, 198, 88, .8);
  transition: opacity .12s, transform .16s ease-out;
}
.flash-hole.show .flash-orb { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.flash-mole {
  position: absolute;
  left: 8%;
  bottom: 6%;
  width: 84%;
  z-index: 2;
  transform: translateY(112%);
  transition: transform .13s cubic-bezier(.2, 1.4, .5, 1);
  pointer-events: none;
}
.flash-hole.up .flash-mole { transform: translateY(0); }
.flash-mole svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 3px 2px rgba(20, 10, 0, .3)); }
.flash-hole.good::after,
.flash-hole.bad::after,
.flash-hole.missed::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  z-index: 3;
  pointer-events: none;
  animation: flashRing .42s ease-out;
}
.flash-hole.good::after { box-shadow: inset 0 0 0 4px #7cf29a, 0 0 22px 6px rgba(120, 240, 150, .55); }
.flash-hole.bad::after { box-shadow: inset 0 0 0 4px #ff7b7b, 0 0 22px 6px rgba(255, 90, 90, .5); }
.flash-hole.missed::after { box-shadow: inset 0 0 0 4px #ffd166, 0 0 18px 5px rgba(255, 200, 80, .45); }
@keyframes flashRing {
  0% { opacity: 0; transform: scale(.86); }
  40% { opacity: 1; }
  100% { opacity: .9; transform: scale(1); }
}
.flash-side { display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.flash-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  color: #7a5c9e;
}
#flashLevel { font-size: 13px; color: #5b3d78; }
#flashBest {
  padding: 3px 10px;
  border-radius: 999px;
  background: #f1e6ff;
  color: #7a5c9e;
  font-size: 11.5px;
}
.flash-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #5b3d78;
}
.flash-steps li { display: flex; align-items: flex-start; gap: 9px; }
.flash-steps b {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffe6a8;
  color: #8a5a00;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 -2px 0 rgba(180, 120, 0, .18);
}
.flash-tip { margin: 0; font-size: 12.5px; line-height: 1.7; color: #7a5c9e; }
.flash-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- 小游戏：越练越粗 · 闪电回忆 ---------- */
.wire-stage {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-top: 4px;
}
.wire-net {
  padding: 10px;
  border-radius: 26px;
  border: 3px solid rgba(255, 255, 255, .85);
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 214, 120, .16), transparent 62%),
    radial-gradient(circle at 50% 50%, #6b4a9e, #4a2f70 68%, #37215a 100%);
  box-shadow:
    inset 0 6px 0 rgba(255, 255, 255, .14),
    inset 0 -10px 22px rgba(20, 8, 40, .45),
    0 8px 0 rgba(74, 48, 120, .22);
}
.wire-svg { display: block; width: 100%; height: auto; overflow: visible; }
.wire-svg.no-anim .wire-edge { transition: none !important; }
.wire-edges { transition: opacity .35s; }
.wire-svg.quiz .wire-edges { opacity: .1; }
.wire-edge {
  stroke-linecap: round;
  transition: stroke-width .55s ease, opacity .55s ease, stroke .45s ease;
}
.wire-edge.max { filter: drop-shadow(0 0 6px rgba(255, 214, 90, .95)); }
.wire-node .wire-dot { stroke: #fff; stroke-width: 3; }
.wire-node .wire-halo {
  fill: none;
  stroke: #ffd94d;
  stroke-width: 3;
  opacity: 0;
  transition: opacity .2s;
}
.wire-node .wire-label {
  font-size: 12.5px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  user-select: none;
}
.wire-node.ask .wire-halo {
  opacity: 1;
  animation: wireHalo 1.15s ease-in-out infinite;
}
@keyframes wireHalo {
  0%, 100% { opacity: .45; stroke-width: 3; }
  50% { opacity: 1; stroke-width: 4; }
}
.wire-side { display: flex; flex-direction: column; gap: 12px; max-width: 540px; }
.wire-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  color: #7a5c9e;
}
#wireRound { font-size: 13px; color: #5b3d78; }
#wireMeter {
  padding: 3px 10px;
  border-radius: 999px;
  background: #f1e6ff;
  color: #7a5c9e;
  font-size: 11.5px;
}
.wire-learn { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }
.wire-pair {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 900;
  box-shadow: inset 0 -2px 0 rgba(90, 50, 20, .12);
  animation: wirePairIn .35s ease-out;
}
.wire-pair b { font-weight: 900; opacity: .55; }
@keyframes wirePairIn {
  from { opacity: 0; transform: translateY(5px) scale(.94); }
  to { opacity: 1; transform: none; }
}
.wire-q {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 92px;
}
.wire-q:empty { min-height: 0; }
.wire-question { margin: 0; font-size: 15.5px; font-weight: 900; color: #4a2f66; line-height: 1.5; }
.wire-q.shake { animation: wireShake .32s; }
@keyframes wireShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-3px); }
}
.wire-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.wire-opt {
  padding: 10px 16px;
  border: 2px solid #fff;
  border-radius: 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  color: var(--ink);
  background: var(--bg);
  cursor: pointer;
  box-shadow:
    0 3px 0 rgba(80, 40, 120, .24),
    inset 0 2px 0 rgba(255, 255, 255, .7);
  transition: transform .12s, box-shadow .12s;
}
.wire-opt:hover { transform: translateY(-2px); }
.wire-opt:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(80, 40, 120, .24), inset 0 2px 0 rgba(255, 255, 255, .7);
}
.wire-opt:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.wire-opt.ok {
  outline: 3px solid #59c46a;
  box-shadow: 0 3px 0 rgba(40, 120, 50, .3), 0 0 18px rgba(100, 220, 120, .55);
}
.wire-opt.hint { outline: 3px dashed #e8a01f; outline-offset: 2px; }
.wire-opt:disabled { cursor: default; transform: none; }
.wire-pause {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: #6b4a86;
  font-size: 13px;
  font-weight: 800;
}
.wire-pause span { font-size: 30px; font-weight: 900; color: #8a5ab8; line-height: 1; }
.wire-tip { margin: 0; font-size: 12.5px; line-height: 1.7; color: #7a5c9e; }
.wire-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.mc-btn.ghost {
  background: linear-gradient(180deg, #fff, #f0e6ff);
  border-color: #c9aee8;
  color: #5a3d7a;
  box-shadow: 0 3px 0 rgba(120, 80, 160, .28), inset 0 2px 0 #fff;
}
.mc-btn.ghost:active { box-shadow: 0 1px 0 rgba(120, 80, 160, .28), inset 0 2px 0 #fff; }

/* ---------- 小游戏：记忆球的颜色 ---------- */
.emo-progress { display: flex; gap: 6px; margin: 0 0 10px; min-height: 10px; }
.emo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e2d3f5;
  box-shadow: inset 0 1px 2px rgba(80, 30, 120, .2);
  transition: background .2s, box-shadow .2s;
}
.emo-dot.now { background: var(--gold); box-shadow: 0 0 0 3px rgba(255, 210, 77, .35); }
.emo-dot.hit { background: #79c466; }
.emo-dot.miss { background: #e08585; }
.emo-scene {
  margin: 0 0 13px;
  min-height: 2.7em;
  font-size: clamp(16px, 2.4vw, 19px);
  font-weight: 900;
  line-height: 1.7;
  color: #2a1038;
}
.emo-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.emo-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 4px 9px;
  background: linear-gradient(180deg, #fffdf8, #f6ecff);
  border: 2px solid #e2d3f5;
  border-radius: 18px;
  cursor: pointer;
  transition: transform .14s, border-color .14s, box-shadow .14s, background .14s;
}
.emo-choice:hover { transform: translateY(-2px); border-color: #c9aee8; }
.emo-choice .emo-orb {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 32% 24%, #fff 0 6%, var(--c1) 38%, var(--c2) 100%);
  box-shadow:
    inset -5px -7px 12px rgba(50, 10, 70, .28),
    inset 3px 4px 8px rgba(255, 255, 255, .7),
    0 3px 0 rgba(70, 25, 100, .24);
}
.emo-choice .emo-orb::after {
  content: '';
  position: absolute;
  left: 20%;
  top: 13%;
  width: 26%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .95), transparent 70%);
  pointer-events: none;
}
.emo-choice .emo-orb svg { position: relative; width: 82%; height: 82%; display: block; }
.emo-choice .emo-name { font-size: 12px; font-weight: 900; color: #5a3d7a; line-height: 1.2; }
.emo-choice .emo-feel { font-size: 10.5px; font-weight: 800; color: #8a6aa8; line-height: 1.2; }
.emo-choice.correct {
  border-color: #79c466;
  background: linear-gradient(180deg, #f4fff0, #dcf6d2);
  box-shadow: 0 0 0 2px rgba(121, 196, 102, .4), 0 3px 0 rgba(90, 150, 70, .3);
}
.emo-choice.wrong {
  border-color: #e08585;
  background: linear-gradient(180deg, #fff4f4, #ffe0e0);
  animation: shake .35s ease;
}
.emo-choice:disabled { cursor: default; opacity: 1; }
.emo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- 小游戏：AI 回头看哪个词 ---------- */
.attend-sentence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 4px 0 13px;
  min-height: 2.6em;
  line-height: 1.5;
}
.attend-token {
  position: relative;
  padding: 6px 11px 7px;
  font-size: 16px;
  font-weight: 900;
  color: #2f5568;
  background: linear-gradient(180deg, #fff, #eef8ff);
  border: 2px solid #c3e7f7;
  border-radius: 12px;
  box-shadow: 0 3px 0 rgba(110, 170, 205, .28);
  cursor: pointer;
  transition: transform .12s, border-color .12s, background .12s, box-shadow .12s;
}
button.attend-token:hover { transform: translateY(-1px); border-color: #8ccfe9; background: #f6fcff; }
button.attend-token:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(110, 170, 205, .28); }
.attend-punc { font-size: 16px; font-weight: 900; color: #6a4460; }
.attend-target {
  color: #5a3310;
  background: linear-gradient(180deg, #fff7d6, #ffe28a);
  border-color: #ffb02e;
  box-shadow: 0 3px 0 #d98f1f, 0 0 0 3px rgba(255, 210, 77, .28);
}
.attend-target.linked { box-shadow: 0 3px 0 #d98f1f, 0 0 0 4px rgba(255, 210, 77, .5); }
.attend-target .attend-q {
  position: absolute;
  right: -7px;
  top: -8px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #fff;
  background: #e0752c;
  border: 2px solid #fff;
  border-radius: 50%;
}
.attend-token.correct {
  color: #245c1a;
  background: linear-gradient(180deg, #effce9, #d7f4cc);
  border-color: #79c466;
  box-shadow: 0 3px 0 #6cb455, 0 0 0 3px rgba(121, 196, 102, .3);
}
.attend-token.wrong {
  color: #8a2a2a;
  background: linear-gradient(180deg, #fff0f0, #ffdada);
  border-color: #e08585;
}
.attend-token:disabled { cursor: default; opacity: 1; }
.attend-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.simon-orb:focus-visible,
.emo-choice:focus-visible,
.attend-token:focus-visible,
.mc-btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- 不一样 + 情绪小队 ---------- */
.diff {
  max-width: 1040px;
  margin: 40px auto 0;
  padding: 0 20px;
}
.cast {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 14px 18px;
  margin: 0 0 12px;
  padding: 20px 18px 16px;
  border-radius: 24px;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(255, 122, 179, .18), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 8px 30px rgba(8, 0, 22, .3);
}
.cast-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 62px;
}
.cast-member .face {
  width: 58px;
  height: 58px;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(4, 0, 16, .55));
  transition: transform .2s ease;
}
.cast-member:hover .face { transform: translateY(-4px) scale(1.05); }
.cast-member b {
  font-size: 12px;
  font-weight: 900;
  color: #fff;
}
.cast-member em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(244, 236, 255, .6);
}
.cast-note {
  margin: 0 0 18px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--on-dark-soft);
}

.diff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.diff-card {
  background: linear-gradient(178deg, #fffcf8, #f4e9ff);
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 22px;
  padding: 16px 18px 15px;
  color: var(--ink);
  box-shadow: 0 6px 0 rgba(9, 3, 20, .4), 0 16px 30px rgba(8, 0, 22, .34);
}
.diff-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, #fff, var(--ic, #ffe0a0) 58%, var(--icd, #f7b64a));
  box-shadow:
    inset -2px -3px 6px rgba(120, 60, 130, .2),
    inset 2px 2px 5px rgba(255, 255, 255, .85),
    0 3px 10px rgba(60, 0, 70, .2);
}
.diff-card:nth-child(1) .diff-icon { --ic: #ffc2b4; --icd: #e8735a; }
.diff-card:nth-child(2) .diff-icon { --ic: #b4eccb; --icd: #4da864; }
.diff-card:nth-child(3) .diff-icon { --ic: #d9cbff; --icd: #8d6cf0; }
.diff-card h3 { margin: 10px 0 5px; font-size: 16px; font-weight: 900; color: #2a1038; }
.diff-card p { margin: 0; font-size: 13.5px; line-height: 1.8; color: #6a4460; }

/* ---------- 结尾 ---------- */
.end {
  max-width: 780px;
  margin: 44px auto 6px;
  padding: 0 20px;
}
.end-big {
  margin: 0;
  padding: 24px 26px;
  text-align: center;
  font-size: clamp(17px, 3vw, 23px);
  font-weight: 900;
  line-height: 1.8;
  color: #2a1038;
  background: linear-gradient(178deg, #fffcf8, #f3e7ff);
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 28px;
  box-shadow: 0 8px 0 rgba(9, 3, 20, .42), 0 20px 40px rgba(8, 0, 22, .4);
}
.end-big b {
  background: linear-gradient(transparent 62%, #ffdc8a 62%);
  padding: 0 2px;
  border-radius: 3px;
}
.end-small { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--on-dark-soft); }

.foot {
  text-align: center;
  padding: 20px 20px 44px;
  font-size: 12px;
  color: rgba(244, 236, 255, .6);
}
.foot p { margin: 0; }
.foot .foot-3d { margin-top: 8px; }
.foot-3d a {
  display: inline-block;
  padding: 5px 13px 6px;
  font-weight: 900;
  color: #ffd9ec;
  text-decoration: none;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  box-shadow: 0 3px 0 rgba(9, 3, 20, .35);
}
.foot-3d a:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(9, 3, 20, .35); }

/* ---------- 弹层 ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}
.sheet[hidden] { display: none; }
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 4, 26, .72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fadeIn .18s ease;
}
.sheet-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: 86dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #fffaf5 0%, #f5eaff 100%);
  border: 3px solid rgba(255, 255, 255, .95);
  border-top: 8px solid var(--rose);
  border-radius: 28px;
  padding: 22px 22px 20px;
  color: var(--ink);
  box-shadow: 0 10px 0 rgba(9, 3, 20, .45), 0 30px 70px rgba(6, 0, 18, .6);
  animation: popIn .22s cubic-bezier(.34, 1.4, .64, 1);
}
.sheet-panel.side-ai { border-top-color: var(--cyan); }
.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #f0dcff;
  background: #fff8f2;
  color: #8a5a9e;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}
.sheet-close:hover { background: #f7e9ff; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding-right: 38px; }
.sheet-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 25px;
  line-height: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, #fff, #ffd0d8 56%, #ff9aa6);
  box-shadow:
    inset -2px -3px 6px rgba(120, 50, 80, .2),
    inset 2px 2px 5px rgba(255, 255, 255, .85),
    0 3px 10px rgba(60, 0, 40, .2);
}
.side-ai .sheet-icon { background: radial-gradient(circle at 34% 26%, #fff, #c9edff 56%, #6fc1ee); }
.sheet-who {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  color: #8a2a52;
  background: #ffe1ec;
  border-radius: 999px;
  padding: 2px 8px;
}
.side-ai .sheet-who { color: #1d5f82; background: #ddf3ff; }
.sheet-head h2 { margin: 4px 0 0; font-size: 20px; font-weight: 900; line-height: 1.4; color: #2a1038; }
.sheet-one {
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.85;
  color: #52365f;
}
.sheet-block h3 {
  margin: 17px 0 5px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  color: #8a5aa8;
}
.sheet-block p { margin: 0; font-size: 13.5px; line-height: 1.8; color: #5f4468; }
.sheet-movie {
  margin-top: 16px;
  padding: 12px 14px 11px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 122, 179, .24), transparent 46%),
    linear-gradient(180deg, #33195a, #22103d);
  border: 2px solid rgba(255, 255, 255, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}
.sheet-movie[hidden] { display: none; }
.sheet-movie h3 { margin: 0 0 5px; color: #ffd76b; }
.sheet-movie p { color: #e2d5f6; }
.sheet-link {
  width: 100%;
  margin-top: 20px;
  padding: 10px 10px 12px;
  border: 2px solid #ffb02e;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe98f, #ffc945);
  color: #5a3310;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 #d98f1f, inset 0 2px 0 rgba(255, 255, 255, .8);
}
.sheet-link:active { transform: translateY(3px); box-shadow: 0 1px 0 #d98f1f, inset 0 2px 0 rgba(255, 255, 255, .8); }
.side-ai .sheet-link {
  border-color: #4aa6dd;
  color: #10374f;
  background: linear-gradient(180deg, #d5f4ff, #8ed4f6);
  box-shadow: 0 4px 0 #3d8dbe, inset 0 2px 0 rgba(255, 255, 255, .85);
}
body.sheet-open { overflow: hidden; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes upIn { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .lab-grid { grid-template-columns: 1fr; }
  .lab-wide { grid-column: auto; }
  .diff-grid { grid-template-columns: 1fr; }
  .movie-grid { grid-template-columns: 1fr 1fr; }
  .ai-hq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .simon-board { grid-template-columns: repeat(2, minmax(0, 200px)); }
  .flash-stage { grid-template-columns: 1fr; }
  .flash-board { width: 100%; max-width: 360px; margin: 0 auto; }
  .wire-stage { grid-template-columns: 1fr; }
  .wire-net { width: 100%; max-width: 320px; margin: 0 auto; }
}

@media (max-width: 760px) {
  .top { top: 8px; width: calc(100% - 18px); margin-top: 9px; padding: 7px 8px; border-radius: 21px; }
  .brand-badge { width: 40px; height: 40px; font-size: 20px; }
  .brand-text h1 { font-size: 20px; }
  .brand-text p { font-size: 11.5px; }

  .intro { padding: 14px 14px 22px; }
  .notice { grid-template-columns: 1fr; gap: 6px; padding: 22px 19px 16px; border-radius: 26px; }
  .notice-title { font-size: 36px; }
  .hq-cast { width: 100%; max-width: 340px; height: 168px; justify-self: center; margin: 4px auto -16px; }
  .hc-mid { width: 168px; left: 50%; margin-left: -84px; top: 0; }
  .hc-l { width: 106px; left: 4px; top: 62px; }
  .hc-r { width: 108px; right: 2px; top: 60px; }

  .map { --side: 14px; --rail: 50px; --dot: 34px; }
  .map::before { top: 34px; width: 6px; left: calc(var(--side) + var(--dot) / 2 - 3px); }
  .num { font-size: 14px; }
  .stop { margin-bottom: 26px; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .tie { height: 30px; }
  .tie::before {
    left: 50%;
    right: auto;
    top: 2px;
    bottom: 2px;
    border-top: 0;
    border-left: 2px dashed rgba(255, 255, 255, .32);
    transform: translateX(-1px);
  }
  .tie span { width: 26px; height: 26px; font-size: 13px; }
  body.view-brain .tie,
  body.view-ai .tie { display: none; }

  .loop-grid { grid-template-columns: 1fr; }
  .loop, .lab, .diff { padding-left: 14px; padding-right: 14px; }
  .view-switch { display: flex; width: 100%; }
  .view-switch button { flex: 1; padding: 8px 6px; font-size: 13px; }
  .legend-row { padding: 8px 11px; }
  .cast { gap: 12px 14px; padding: 16px 12px 13px; }
  .cast-member { min-width: 54px; }
  .cast-member .face { width: 50px; height: 50px; }
}

@media (max-width: 560px) {
  .movie { margin-top: 26px; padding: 20px 16px 16px; border-radius: 24px; }
  .movie-grid { grid-template-columns: 1fr; gap: 10px; }
  .movie-head h2 { font-size: 20px; }
  .movie-head p { font-size: 12.5px; }
  .movie-card { padding: 13px 14px 12px; }
  .movie-orb { width: 32px; height: 32px; margin-bottom: 7px; }

  .ai-hq { margin-top: 24px; padding: 20px 16px 16px; border-radius: 24px; }
  .ai-hq-head h2 { font-size: 20px; }
  .ai-hq-grid { grid-template-columns: 1fr; gap: 10px; }
  .ai-hq-card { padding: 13px 14px 12px; }
  .ctx-slot { min-width: 38px; min-height: 40px; font-size: 12px; }
  .simon-board { gap: 8px; }
  .simon-orb .simon-name { font-size: 10px; }
  .emo-choice { padding: 7px 3px 8px; border-radius: 15px; }
  .emo-choice .emo-orb { width: 52px; height: 52px; }
  .emo-choice .emo-name { font-size: 11px; }
  .emo-choice .emo-feel { font-size: 9.5px; }
  .attend-token { font-size: 15px; padding: 5px 9px 6px; }
  .cat-grid { gap: 7px; }
  .cat-card { padding: 6px 4px; }
  .cat-card svg { max-width: 54px; }
  .cat-card span { font-size: 10.5px; }
  .cat-test { gap: 9px; padding: 9px 10px; }
  .cat-bubble { font-size: 13px; padding: 7px 10px; }
}

@media (max-width: 480px) {
  .top { padding: 6px 7px; }
  .brand { gap: 8px; }
  .brand-badge { width: 36px; height: 36px; font-size: 18px; }
  .brand-text h1 { font-size: 18px; gap: 5px; }
  .brand-text p { font-size: 10.5px; }
  .badge-hq { font-size: .46em; padding: 1px 5px 2px; }
  .icon-btn { width: 38px; height: 38px; border-radius: 12px; }

  .intro { padding: 12px 11px 20px; }
  .notice { padding: 18px 15px 14px; }
  .notice-title { font-size: 31px; }
  .notice-sub { font-size: 13px; }
  .lead { font-size: 14px; line-height: 1.85; }
  .hq-cast { height: 150px; margin-bottom: -14px; }
  .hc-mid { width: 150px; margin-left: -75px; }
  .hc-l { width: 96px; left: 0; top: 54px; }
  .hc-r { width: 98px; right: 0; top: 52px; }
  .hc-glow { width: 230px; height: 230px; }

  .node { padding: 14px 14px 12px; border-radius: 20px; }
  .node-icon { width: 38px; height: 38px; font-size: 18px; }
  .node-short { font-size: 13px; }
  .stop-title h2 { font-size: 16.5px; }
  .link-chip { font-size: 10.5px; }
  .loop h2, .lab > h2, .diff > h2 { font-size: 18px; }

  .lab-card { padding: 16px 14px 15px; border-radius: 21px; }
  .emo-choice .emo-orb { width: 46px; height: 46px; }
  .emo-choice .emo-name { font-size: 10.5px; }
  .attend-token { font-size: 14px; padding: 5px 8px 6px; }
  .diff-card { padding: 14px 15px; }
  .end-big { padding: 20px 18px; }

  .cast { gap: 10px 8px; padding: 14px 8px 11px; }
  .cast-member { min-width: 46px; }
  .cast-member .face { width: 44px; height: 44px; }
  .cast-member b { font-size: 11px; }
  .cast-member em { font-size: 9.5px; }

  .sheet { padding: 0; align-items: end; }
  .sheet-panel {
    width: 100%;
    max-height: 88dvh;
    border-radius: 26px 26px 0 0;
    border-top-width: 8px;
    padding: 20px 18px calc(18px + env(safe-area-inset-bottom));
    animation: upIn .24s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .orb, .hc-orb { animation: none; }
}

/* 横屏手机：把顶栏压扁，给内容多留一点高度 */
@media (max-height: 520px) {
  .top { padding-top: 4px; padding-bottom: 4px; top: 5px; margin-top: 6px; }
  .brand-badge { width: 34px; height: 34px; font-size: 17px; }
  .brand-text h1 { font-size: 18px; }
  .brand-text p { display: none; }
  .icon-btn { width: 36px; height: 36px; border-radius: 11px; }
  .intro { padding-top: 9px; }
  .notice { grid-template-columns: minmax(0, 1fr) 250px; padding: 16px 18px 14px; }
  .notice-title { font-size: 28px; margin-bottom: 4px; }
  .notice-sub { font-size: 12.5px; margin-bottom: 6px; }
  .hq-cast { width: 250px; height: 152px; margin: 0 0 -14px; }
  .hc-mid { width: 146px; left: 52px; margin-left: 0; top: 0; }
  .hc-l { width: 92px; left: 0; top: 60px; }
  .hc-r { width: 94px; right: 0; top: 58px; }
  .lead { margin-bottom: 2px; font-size: 14px; }
}

/* ---------- 声音按钮 / 朗读 ---------- */
.icon-btn .snd-off { display: none; }
.icon-btn.is-off .snd-on { display: none; }
.icon-btn.is-off .snd-off { display: block; }

.audio-hint {
  margin: 12px 0 0;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 12.5px;
  line-height: 1.7;
  font-weight: 600;
  color: rgba(246, 239, 255, .66);
}
.audio-hint span { flex: 0 0 auto; }

/* 正在读的卡片：加一圈金色光，知道现在读的是哪张 */
.node.reading {
  outline: 4px solid rgba(255, 214, 92, .9);
  outline-offset: 3px;
}
.movie-card.reading {
  border-color: rgba(255, 214, 92, .9);
  box-shadow: 0 0 0 3px rgba(255, 214, 92, .35), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.movie-read {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 13px;
  line-height: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(20, 8, 38, .42);
  color: #ffe08a;
  cursor: pointer;
  transition: background .15s, transform .12s;
}
.movie-read:hover { background: rgba(255, 255, 255, .22); }
.movie-read:active { transform: scale(.92); }
.movie-read:focus-visible { outline: 2px solid #ffd24d; outline-offset: 2px; }

/* 弹层「读一遍」 */
.sheet-read {
  width: 100%;
  margin-top: 18px;
  padding: 9px 10px 10px;
  border: 2px solid rgba(217, 144, 26, .7);
  border-radius: 999px;
  background: rgba(255, 210, 77, .18);
  color: #7a4a0a;
  font-size: 13.5px;
  font-weight: 900;
  cursor: pointer;
  transition: background .15s, transform .12s;
}
.sheet-read:hover { background: rgba(255, 210, 77, .3); }
.sheet-read:active { transform: translateY(2px); }
.sheet-read.is-reading { background: rgba(255, 210, 77, .42); }
.side-ai .sheet-read {
  border-color: rgba(74, 166, 221, .7);
  background: rgba(111, 212, 255, .16);
  color: #12516e;
}
.side-ai .sheet-read.is-reading { background: rgba(111, 212, 255, .34); }
.sheet-read + .sheet-link { margin-top: 10px; }
