/* ============================================================
   AI创客养成记 · 玩创工坊
   设计令牌与全局样式
   主色沿用课程 PPT：#4338EB 靛蓝 / 五阶段语义色 / 切角牌面
   ============================================================ */

:root {
  /* 底层 */
  --ink-900: #06081B;
  --ink-800: #0A0D24;
  --ink-750: #0E1230;
  --ink-700: #131838;
  --ink-650: #171D42;
  --ink-600: #1C234C;
  --ink-500: #252D5C;

  /* 线 */
  --line: rgba(150, 165, 255, 0.12);
  --line-2: rgba(150, 165, 255, 0.22);
  --line-3: rgba(160, 175, 255, 0.34);

  /* 文字 */
  --text: #EBEDFB;
  --text-2: #A6ADCE;
  --text-3: #737AA0;
  --text-4: #4E5578;

  /* 品牌 */
  --brand: #4338EB;
  --brand-2: #6C63FF;
  --brand-3: #A79FFF;
  --brand-soft: rgba(108, 99, 255, 0.14);
  --lime: #C9FF3D;
  --lime-soft: rgba(201, 255, 61, 0.14);

  /* 五属性 */
  --think: #4C8DFF;
  --create: #A06BFF;
  --practice: #2FD37F;
  --express: #FF6BAA;
  --collab: #FFB020;

  /* 纸面（角色立绘底色） */
  --paper: #F6F2E9;

  /* 形状 */
  --cut: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  --cut-sm: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  --cut-btn: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);

  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 6px;

  --shadow-1: 0 2px 8px rgba(0, 0, 0, 0.18);
  --shadow-2: 0 10px 30px rgba(0, 0, 0, 0.34);
  --shadow-brand: 0 10px 28px rgba(67, 56, 235, 0.34);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--ink-900);
  color: var(--text);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC",
    "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 全局点阵底纹 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(140, 155, 255, 0.11) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  top: -260px;
  left: 50%;
  width: 1200px;
  height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(67, 56, 235, 0.30), transparent 66%);
  pointer-events: none;
  z-index: 0;
  filter: blur(20px);
}

h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }

/* ============================================================
   通用组件
   ============================================================ */

.panel {
  background: linear-gradient(168deg, var(--ink-700) 0%, var(--ink-750) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  position: relative;
}

.panel-pad { padding: 18px 20px; }

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

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.panel-title .dot {
  width: 6px;
  height: 6px;
  background: var(--brand-2);
  transform: rotate(45deg);
  box-shadow: 0 0 10px var(--brand-2);
}

.panel-more {
  font-size: 12px;
  color: var(--text-3);
  transition: color 0.2s;
}
.panel-more:hover { color: var(--brand-3); }

/* 切角标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  clip-path: var(--cut-sm);
  background: var(--brand-soft);
  color: var(--brand-3);
  white-space: nowrap;
}
.tag.lime { background: var(--lime-soft); color: var(--lime); }
.tag.grey { background: rgba(255, 255, 255, 0.06); color: var(--text-2); }
.tag.warn { background: rgba(255, 176, 32, 0.16); color: var(--collab); }
.tag.done { background: rgba(47, 211, 127, 0.14); color: var(--practice); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  clip-path: var(--cut-btn);
  background: var(--ink-600);
  color: var(--text);
  transition: background 0.18s, transform 0.12s, color 0.18s;
  white-space: nowrap;
}
.btn:hover { background: var(--ink-500); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { background: linear-gradient(135deg, #4e43ff 0%, #7d75ff 100%); }

.btn-lime {
  background: var(--lime);
  color: #0C1A00;
}
.btn-lime:hover { background: #d8ff70; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  clip-path: none;
  border-radius: var(--r-sm);
}
.btn-ghost:hover { border-color: var(--line-3); color: var(--text); background: rgba(255,255,255,.03); }

.btn-sm { height: 30px; padding: 0 13px; font-size: 12px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:disabled:hover { background: var(--ink-600); }

/* 进度条 */
.bar {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-3));
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar.thin { height: 4px; }

/* 数字排版 */
.num {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* 头像圆框 */
.avatar {
  border-radius: 50%;
  overflow: hidden;
  background: var(--paper);
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* 纸面立绘卡：所有角色/精灵图都是浅底方图，统一放在米白卡片内 */
.paper-card {
  background: var(--paper);
  position: relative;
  overflow: hidden;
}
.paper-card img { width: 100%; height: 100%; object-fit: contain; }

/* ============================================================
   骨架：顶栏 + 侧栏 + 主区
   ============================================================ */

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  background: rgba(8, 11, 30, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
  height: 30px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  box-shadow: 0 0 18px rgba(108, 99, 255, 0.5);
}

.brand-text strong {
  display: block;
  font-size: 14px;
  letter-spacing: 0.06em;
  font-weight: 700;
  line-height: 1.2;
}
.brand-text span {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--text-3);
  text-transform: uppercase;
  line-height: 1.4;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.topnav button {
  height: 30px;
  padding: 0 12px;
  font-size: 12.5px;
  color: var(--text-2);
  border-radius: var(--r-sm);
  transition: background 0.18s, color 0.18s;
}
.topnav button:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.topnav button.on { background: var(--brand-soft); color: var(--brand-3); font-weight: 600; }

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.mini-xp {
  display: flex;
  align-items: center;
  gap: 9px;
}
.mini-xp .lbl {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-3);
  text-transform: uppercase;
}
.mini-xp .val {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-3);
}
.mini-xp .bar { width: 92px; }

.role-switch {
  display: flex;
  padding: 2px;
  background: var(--ink-700);
  border-radius: 20px;
  border: 1px solid var(--line);
}
.role-switch button {
  height: 24px;
  padding: 0 11px;
  font-size: 11.5px;
  color: var(--text-3);
  border-radius: 18px;
  transition: all 0.18s;
}
.role-switch button.on {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

.topbar-me {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
.topbar-me .avatar { width: 32px; height: 32px; border: 1.5px solid var(--line-2); }
.topbar-me .who { line-height: 1.25; }
.topbar-me .who b { display: block; font-size: 12.5px; font-weight: 600; }
.topbar-me .who span { display: block; font-size: 10.5px; color: var(--text-3); }

.shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: calc(100vh - 62px);
}

.sidebar {
  border-right: 1px solid var(--line);
  padding: 18px 12px 24px;
  position: sticky;
  top: 62px;
  height: calc(100vh - 62px);
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 0; }

.side-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--text-4);
  text-transform: uppercase;
  padding: 12px 12px 8px;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 13px;
  width: 100%;
  text-align: left;
  position: relative;
  transition: background 0.18s, color 0.18s;
  margin-bottom: 2px;
}
.side-item:hover { background: rgba(255, 255, 255, 0.045); color: var(--text); }
.side-item.on {
  background: linear-gradient(90deg, rgba(108, 99, 255, 0.20), rgba(108, 99, 255, 0.04));
  color: #fff;
  font-weight: 600;
}
.side-item.on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  background: var(--brand-2);
  box-shadow: 0 0 12px var(--brand-2);
  border-radius: 2px;
}
.side-item .ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}
.side-item .badge-count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9px;
  background: var(--express);
  color: #fff;
}

.side-team {
  margin-top: 20px;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(67, 56, 235, 0.18), rgba(67, 56, 235, 0.04));
  border: 1px solid rgba(108, 99, 255, 0.24);
}
.side-team .t-name {
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.side-team .t-sub {
  font-size: 10.5px;
  color: var(--text-3);
  margin-top: 2px;
}
.side-team .t-avatars {
  display: flex;
  margin-top: 10px;
}
.side-team .t-avatars .avatar {
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--ink-750);
  margin-left: -6px;
}
.side-team .t-avatars .avatar:first-child { margin-left: 0; }

.stage {
  padding: 22px 26px 40px;
  min-width: 0;
}

.view { display: none; animation: fadeUp 0.34s ease both; }
.view.on { display: block; }

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

/* 页头 */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.page-head h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 11px;
}
.page-head h1 .kick {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--brand-3);
  font-weight: 700;
  padding: 3px 8px;
  background: var(--brand-soft);
  clip-path: var(--cut-sm);
  transform: translateY(-1px);
}
.page-head p {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 5px;
}

/* ============================================================
   角色选择 · 开场
   ============================================================ */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 30%, rgba(30, 26, 96, 0.96), rgba(4, 6, 18, 0.99));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.overlay.on { display: flex; }

.gate {
  width: min(1020px, calc(100vw - 64px));
  animation: fadeUp 0.4s ease both;
}

/* ---------- 登录页 ---------- */
.login-card {
  width: min(430px, calc(100vw - 48px));
  animation: fadeUp 0.4s ease both;
  text-align: center;
}
.login-panel {
  padding: 24px 26px 20px;
  border-radius: var(--r-lg);
  background: rgba(20, 25, 56, 0.8);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}
.login-panel .btn { width: 100%; letter-spacing: 0.3em; text-indent: 0.3em; }
.login-hint {
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-4);
  text-align: center;
}
.login-hint b { color: var(--brand-3); }

.gate-brand {
  text-align: center;
  margin-bottom: 26px;
}
.gate-brand .mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 800;
  box-shadow: 0 0 34px rgba(108, 99, 255, 0.6);
}
.gate-brand h1 {
  font-size: 30px;
  letter-spacing: 0.16em;
  font-weight: 700;
  text-indent: 0.16em;
}
.gate-brand p {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-3);
  letter-spacing: 0.14em;
}

.gate-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.gate-card {
  position: relative;
  border-radius: var(--r-lg);
  border: 1.5px solid var(--line-2);
  background: linear-gradient(168deg, rgba(28, 35, 76, 0.9), rgba(12, 16, 42, 0.9));
  padding: 16px;
  transition: all 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  text-align: left;
  overflow: hidden;
}
.gate-card:hover {
  border-color: var(--brand-2);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(67, 56, 235, 0.28);
}
.gate-card.picked {
  border-color: var(--brand-3);
  box-shadow: 0 0 0 1px var(--brand-2), 0 18px 44px rgba(67, 56, 235, 0.4);
}
.gate-card.picked::after {
  content: "已选择";
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  background: var(--lime);
  color: #0C1A00;
  clip-path: var(--cut-sm);
}

.gate-card .portrait {
  height: 340px;
  border-radius: 10px;
  overflow: hidden;
  background: #EFE8DB;
  position: relative;
}
.gate-card .portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.gate-card:hover .portrait img { transform: scale(1.04); }

.gate-card .meta {
  padding: 14px 4px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.gate-card .meta b { font-size: 16px; font-weight: 700; letter-spacing: 0.04em; }
.gate-card .meta span { font-size: 11.5px; color: var(--text-3); }
.gate-card .trait {
  display: flex;
  gap: 6px;
  padding: 0 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.gate-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: rgba(20, 25, 56, 0.8);
  border: 1px solid var(--line);
}
.field label {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: var(--ink-800);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s;
}
.field input:focus { border-color: var(--brand-2); }
.field input::placeholder { color: var(--text-4); }

.gate-foot {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 11.5px;
  color: var(--text-4);
}

/* ============================================================
   导师对话
   ============================================================ */

.dialog-layer {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(to bottom, rgba(4, 6, 18, 0.15) 0%, rgba(4, 6, 18, 0.75) 62%, rgba(4, 6, 18, 0.95) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.dialog-layer.on { display: flex; }

.dialog-wrap {
  width: min(880px, calc(100vw - 48px));
  margin-bottom: 42px;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  animation: fadeUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mentor-slot {
  position: relative;
  flex-shrink: 0;
  width: 168px;
  height: 168px;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 0 6px rgba(108, 99, 255, 0.18);
}
.mentor-slot video,
.mentor-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mentor-slot .name-tag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 8px 5px;
  background: linear-gradient(to top, rgba(10, 13, 36, 0.95), transparent);
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
}

.bubble {
  flex: 1;
  min-width: 0;
  background: linear-gradient(168deg, #1B2150, #121736);
  border: 1px solid rgba(140, 155, 255, 0.26);
  border-radius: 16px 16px 16px 4px;
  padding: 20px 24px 18px;
  box-shadow: var(--shadow-2);
  position: relative;
}
.bubble .who {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.bubble .who b {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-3);
  letter-spacing: 0.04em;
}
.bubble .who span {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-4);
  text-transform: uppercase;
}
.bubble .say {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text);
  min-height: 54px;
}
.bubble .say em {
  font-style: normal;
  color: var(--lime);
  font-weight: 600;
}
.bubble .bubble-foot {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.steps-dots {
  display: flex;
  gap: 5px;
}
.steps-dots i {
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.3s;
}
.steps-dots i.on { background: var(--brand-2); box-shadow: 0 0 8px var(--brand-2); }

.skip-link {
  position: absolute;
  top: -34px;
  right: 4px;
  font-size: 11.5px;
  color: var(--text-3);
  transition: color 0.18s;
}
.skip-link:hover { color: var(--text); }

/* ============================================================
   地图页
   ============================================================ */

.map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.78fr);
  gap: 18px;
  align-items: start;
}

/* 角色展示台 */
.showcase {
  position: relative;
  padding: 20px 22px 22px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(ellipse 70% 60% at 50% 18%, rgba(108, 99, 255, 0.20), transparent 70%),
    linear-gradient(168deg, var(--ink-700) 0%, var(--ink-800) 100%);
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(140, 155, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 155, 255, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, #000 30%, transparent 80%);
  pointer-events: none;
}

/* 展示台：角色在左，五属性右侧竖排 */
.showcase-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  min-height: 560px;
}

.hero-side { display: flex; align-items: stretch; }
.hero-side .hero-slot { flex: 1; }

.attr-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

/* 属性挂件 */
.attr-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(10, 13, 36, 0.6);
  border: 1px solid var(--line);
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.attr-chip:hover {
  border-color: var(--ac, var(--brand-2));
  transform: translateY(-2px);
}
.attr-chip .sp {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--paper);
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  padding: 4px;
}
.attr-chip .sp img { width: 100%; height: 100%; object-fit: contain; }
.attr-chip .info { min-width: 0; flex: 1; }
.attr-chip .info .row1 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.attr-chip .info .nm { font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.attr-chip .info .vv {
  font-size: 13px;
  font-weight: 700;
  color: var(--ac, var(--brand-3));
}
.attr-chip .bar { margin-top: 5px; height: 4px; display: block; }
.attr-chip .bar > i { background: var(--ac, var(--brand-2)); }

/* 中央角色（展示台左列） */
.hero-slot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 6px 0 10px;
}
.hero-glow {
  position: absolute;
  bottom: 40px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.4), transparent 68%);
  filter: blur(16px);
  z-index: 0;
}
.hero-img {
  position: relative;
  z-index: 1;
  height: 350px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}
.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: heroFloat 5s ease-in-out infinite;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hero-plate {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 8px;
  clip-path: var(--cut-sm);
  background: linear-gradient(135deg, rgba(26, 32, 74, 0.96), rgba(12, 16, 42, 0.96));
  border: 1px solid var(--line-2);
}
.lv-badge {
  display: grid;
  place-items: center;
  padding: 3px 9px;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  background: linear-gradient(135deg, var(--lime), #9FE000);
  color: #0C1A00;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.hero-plate .title { font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; }
.hero-plate .sep { width: 1px; height: 12px; background: var(--line-2); }
.hero-plate .xp { font-size: 11px; color: var(--text-3); }
.hero-plate .xp b { color: var(--brand-3); font-size: 12px; }

/* 底部协作位置（旧版布局遗留，已废弃） */

/* 路线：S0–S4 */
.rail {
  margin-top: 18px;
  padding: 18px 20px 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(168deg, var(--ink-700), var(--ink-800));
}
.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.rail-head .rt { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.rail-head .rs { font-size: 11.5px; color: var(--text-3); }

.rail-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.rail-line::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: rgba(255, 255, 255, 0.09);
}
.rail-line .progress-line {
  position: absolute;
  top: 21px;
  left: 8%;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-2), var(--lime));
  box-shadow: 0 0 12px rgba(108, 99, 255, 0.7);
  z-index: 1;
}

.stop {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 0 4px;
  background: none;
  cursor: pointer;
}
.stop .node {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--ink-600);
  border: none;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-3);
  transition: all 0.24s;
}
.stop.done .node {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
}
.stop.now .node {
  background: linear-gradient(135deg, var(--lime), #9FE000);
  color: #0C1A00;
  animation: pulseNode 2.2s ease-in-out infinite;
}
@keyframes pulseNode {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 255, 61, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(201, 255, 61, 0); }
}
.stop:hover .node { transform: scale(1.06); }
.stop .sn { font-size: 12px; font-weight: 600; }
.stop .sd { font-size: 10.5px; color: var(--text-4); }
.stop.now .sn { color: var(--lime); }

/* 右侧栏 */
.side-col { display: flex; flex-direction: column; gap: 16px; }

.quest-mini {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.quest-mini:hover { border-color: var(--line-3); background: rgba(255, 255, 255, 0.055); }
.quest-mini .ico {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  clip-path: var(--cut-sm);
  background: var(--brand-soft);
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-3);
}
.quest-mini .txt { min-width: 0; flex: 1; }
.quest-mini .txt b { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.quest-mini .txt span { font-size: 11px; color: var(--text-3); }
.quest-mini .xp {
  font-size: 11px;
  font-weight: 700;
  color: var(--lime);
  white-space: nowrap;
  align-self: center;
}

.feed-item {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
}
.feed-item:last-child { border-bottom: none; }
.feed-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  background: var(--brand-2);
}
.feed-item .ft { color: var(--text-2); line-height: 1.6; }
.feed-item .ft b { color: var(--text); font-weight: 600; }
.feed-item .tm { margin-left: auto; color: var(--text-4); font-size: 10.5px; white-space: nowrap; }

/* ============================================================
   档案页
   ============================================================ */

.profile-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.id-card {
  padding: 20px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(108, 99, 255, 0.24), transparent 70%),
    linear-gradient(168deg, var(--ink-700), var(--ink-800));
  border: 1px solid var(--line-2);
  position: relative;
  overflow: hidden;
}
.id-card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--text-4);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.id-portrait {
  height: 260px;
  border-radius: 10px;
  background: #EFE8DB;
  overflow: hidden;
  position: relative;
}
.id-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.id-portrait .corner {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  background: rgba(10, 13, 36, 0.82);
  color: var(--lime);
  clip-path: var(--cut-sm);
}

.id-name {
  margin-top: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.id-name b { font-size: 20px; font-weight: 700; letter-spacing: 0.04em; }
.id-name span { font-size: 11px; color: var(--text-3); }

.id-level {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 9px;
  background: rgba(10, 13, 36, 0.55);
  border: 1px solid var(--line);
}
.id-level .r1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.id-level .r1 .lv {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--lime);
}
.id-level .r1 .ttl { font-size: 12.5px; font-weight: 600; }
.id-level .r1 .nx { font-size: 11px; color: var(--text-3); }
.id-level .bar { height: 7px; }

.id-stats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.id-stats > div {
  background: var(--ink-750);
  padding: 10px 8px;
  text-align: center;
}
.id-stats b { display: block; font-size: 17px; font-weight: 700; color: var(--brand-3); }
.id-stats span { font-size: 10px; color: var(--text-3); }

/* 右列 */
.profile-main { display: flex; flex-direction: column; gap: 16px; }

.spirit-board {
  padding: 18px 20px 20px;
}
.spirit-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.spirit-cell {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--line);
  overflow: hidden;
  text-align: left;
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
}
.spirit-cell:hover { border-color: var(--ac); transform: translateY(-3px); }
.spirit-cell .art {
  height: 148px;
  background: var(--paper);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: 14px;
}
.spirit-cell .art img { width: 100%; height: 100%; object-fit: contain; }
.spirit-cell .art .stage-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 9px;
  font-weight: 700;
  padding: 1.5px 6px;
  color: #0C1A00;
  background: var(--ac);
  clip-path: var(--cut-sm);
}
.spirit-cell .body { padding: 9px 10px 11px; }
.spirit-cell .body .r1 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2px;
}
.spirit-cell .body .nm { font-size: 12.5px; font-weight: 700; }
.spirit-cell .body .vl { font-size: 12px; font-weight: 700; color: var(--ac); }
.spirit-cell .body .attr-name { font-size: 10.5px; color: var(--text-3); margin-bottom: 7px; }
.spirit-cell .bar { height: 4px; }
.spirit-cell .bar > i { background: var(--ac); }
.spirit-cell .forms {
  display: flex;
  gap: 3px;
  margin-top: 8px;
}
.spirit-cell .forms i {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
}
.spirit-cell .forms i.on { background: var(--ac); box-shadow: 0 0 6px var(--ac); }

.board-note {
  margin-top: 12px;
  font-size: 10.5px;
  color: var(--text-4);
  display: flex;
  align-items: center;
  gap: 6px;
}
.board-note::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--text-4);
  border-radius: 50%;
}

/* 徽章墙 */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
}
.badge-cell {
  aspect-ratio: 1;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
}
.badge-cell:hover { border-color: var(--line-3); transform: translateY(-2px); }
.badge-cell .badge-img {
  width: 74%;
  height: 74%;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}
.badge-cell:not(.got) .badge-img { filter: grayscale(0.92); opacity: 0.35; }
.badge-cell .bg-ico {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--ink-600);
  font-size: 11px;
  color: var(--text-4);
}
.badge-cell.got { border-color: rgba(201, 255, 61, 0.4); background: rgba(201, 255, 61, 0.07); }
.badge-cell.got .bg-ico {
  background: linear-gradient(135deg, var(--lime), #8FCB00);
  color: #0C1A00;
  font-weight: 800;
  box-shadow: 0 0 14px rgba(201, 255, 61, 0.35);
}
.badge-cell .tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 5px 9px;
  background: var(--ink-500);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  font-size: 10.5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.18s;
  z-index: 10;
}
.badge-cell:hover .tip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 技能树 */
.skill-rows { display: flex; flex-direction: column; gap: 10px; }
.skill-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.skill-row .sr-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--text-2);
}
.skill-row .sr-label i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--ac);
  flex-shrink: 0;
}
.skill-track {
  display: flex;
  align-items: center;
  gap: 0;
}
.skill-node {
  flex: 1;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--text-4);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  margin-left: -1px;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}
.skill-node:first-child { margin-left: 0; border-radius: 6px 0 0 6px; }
.skill-node:last-child { border-radius: 0 6px 6px 0; }
.skill-node.on {
  background: color-mix(in srgb, var(--ac) 22%, transparent);
  border-color: color-mix(in srgb, var(--ac) 45%, transparent);
  color: #fff;
  font-weight: 600;
}
.skill-node.now {
  background: var(--ac);
  border-color: var(--ac);
  color: #08101F;
  font-weight: 700;
  box-shadow: 0 0 14px color-mix(in srgb, var(--ac) 50%, transparent);
}

/* ============================================================
   小队与公约
   ============================================================ */

.team-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.team-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 0 16px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 14px;
}
.team-emblem {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 0 24px rgba(108, 99, 255, 0.42);
}
.team-hero .th-info { flex: 1; min-width: 0; }
.team-hero .th-info b { font-size: 18px; font-weight: 700; letter-spacing: 0.04em; }
.team-hero .th-info .sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.team-hero .th-info .sub em {
  font-style: normal;
  color: var(--lime);
  font-weight: 600;
}

.member-list { display: flex; flex-direction: column; gap: 8px; }
.member {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--line);
  transition: border-color 0.2s;
}
.member:hover { border-color: var(--line-2); }
.member .avatar { width: 38px; height: 38px; border: 1.5px solid var(--line-2); }
.member .avatar img { object-position: 50% 18%; }
.member .m-info { flex: 1; min-width: 0; }
.member .m-info .r1 {
  display: flex;
  align-items: center;
  gap: 7px;
}
.member .m-info .r1 b { font-size: 12.5px; font-weight: 600; }
.member .m-info .r1 .cap {
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--brand-soft);
  color: var(--brand-3);
  font-weight: 600;
}
.member .m-info .r1 .cap.leader { background: var(--lime-soft); color: var(--lime); }
.member .m-info .r2 { font-size: 10.5px; color: var(--text-3); margin-top: 1px; }
.member .m-xp {
  text-align: right;
  flex-shrink: 0;
}
.member .m-xp b { font-size: 13px; font-weight: 700; color: var(--brand-3); }
.member .m-xp span { display: block; font-size: 9.5px; color: var(--text-4); }

.member.me { border-color: rgba(108, 99, 255, 0.4); background: rgba(108, 99, 255, 0.07); }

/* 公约 */
.pact-list { display: flex; flex-direction: column; gap: 7px; }
.pact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.6;
}
.pact-item .no {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 700;
  background: var(--brand-soft);
  color: var(--brand-3);
  border-radius: 4px;
  margin-top: 1px;
}
.pact-item .pt { flex: 1; color: var(--text-2); }
.pact-item .sig {
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
  margin-top: 2px;
}
.pact-item .sig.ok { background: rgba(47, 211, 127, 0.14); color: var(--practice); }
.pact-item .sig.wait { background: rgba(255, 176, 32, 0.14); color: var(--collab); }

.pact-foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pact-foot .sign-count { font-size: 11.5px; color: var(--text-3); }
.pact-foot .sign-count b { color: var(--lime); font-size: 13px; }

.notice-box {
  padding: 11px 13px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(201, 255, 61, 0.09), rgba(201, 255, 61, 0.02));
  border: 1px solid rgba(201, 255, 61, 0.24);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-2);
}
.notice-box .nb-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--lime);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ============================================================
   任务大厅
   ============================================================ */

.quest-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  background: var(--ink-750);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: fit-content;
}
.quest-tabs button {
  height: 30px;
  padding: 0 15px;
  font-size: 12px;
  color: var(--text-3);
  border-radius: 7px;
  transition: all 0.18s;
}
.quest-tabs button.on { background: var(--brand); color: #fff; font-weight: 600; }
.quest-tabs button .c {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  opacity: 0.75;
}

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

.quest-card {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(168deg, var(--ink-700), var(--ink-750));
  overflow: hidden;
  transition: border-color 0.22s, transform 0.22s;
  display: flex;
  flex-direction: column;
}
.quest-card:hover { border-color: var(--line-3); transform: translateY(-3px); }
.quest-card.now {
  border-color: rgba(201, 255, 61, 0.42);
  box-shadow: 0 0 0 1px rgba(201, 255, 61, 0.18), 0 14px 34px rgba(0, 0, 0, 0.3);
}
.quest-card.now::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--lime), transparent 70%);
}

.qc-top {
  padding: 16px 18px 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.qc-badge {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--brand-soft);
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-3);
}
.quest-card.now .qc-badge { background: var(--lime); color: #0C1A00; }
.qc-head { flex: 1; min-width: 0; }
.qc-head .qno { font-size: 10px; letter-spacing: 0.14em; color: var(--text-4); text-transform: uppercase; }
.qc-head h3 { font-size: 15px; font-weight: 700; margin-top: 2px; letter-spacing: 0.02em; }
.qc-head .qsub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

.qc-body { padding: 0 18px 14px; flex: 1; }
.qc-desc {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--text-2);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.025);
  border-left: 2px solid var(--line-2);
  border-radius: 0 6px 6px 0;
}

.qc-rewards {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.reward {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}
.reward.xp { color: var(--lime); border-color: rgba(201, 255, 61, 0.26); }
.reward.attr { color: var(--ac, var(--brand-3)); border-color: color-mix(in srgb, var(--ac) 26%, transparent); }

.qc-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(0, 0, 0, 0.14);
}
.qc-foot .status-txt { font-size: 11px; color: var(--text-3); }
.qc-foot .status-txt b { color: var(--text-2); }

/* 任务大厅 · 阶段总进度 */
.qr-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 10px;
}
.qr-txt b { display: block; font-size: 13.5px; font-weight: 700; }
.qr-txt span { font-size: 11px; color: var(--text-3); }
.qr-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--lime);
  letter-spacing: 0.02em;
}
.qr-stops {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.qr-stop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 4px 9px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.qr-stop:hover { border-color: var(--line-3); background: rgba(255, 255, 255, 0.045); }
.qr-stop .node {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--ink-600);
  font-size: 12px;
  font-weight: 800;
  color: var(--text-3);
}
.qr-stop.done .node { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.qr-stop.now .node { background: linear-gradient(135deg, var(--lime), #9FE000); color: #0C1A00; }
.qr-stop.lock { opacity: 0.55; }
.qr-stop .sn { font-size: 11.5px; font-weight: 600; }
.qr-stop.now .sn { color: var(--lime); }
.qr-stop .sd { font-size: 9.5px; color: var(--text-4); }

/* 阶段分组 */
.quest-stage { margin-bottom: 20px; }
.quest-stage:last-child { margin-bottom: 0; }
.qs-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(108, 99, 255, 0.10), transparent 72%);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.quest-stage.lock .qs-head { opacity: 0.62; background: rgba(255, 255, 255, 0.02); }
.qs-node {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--brand-soft);
  color: var(--brand-3);
  font-size: 11.5px;
  font-weight: 800;
}
.quest-stage.done .qs-node { background: rgba(47, 211, 127, 0.16); color: var(--practice); }
.quest-stage.now .qs-node { background: var(--lime); color: #0C1A00; }
.quest-stage.lock .qs-node { background: rgba(255, 255, 255, 0.06); color: var(--text-3); }
.qs-info { flex: 1; min-width: 0; }
.qs-info b { font-size: 13.5px; font-weight: 700; }
.qs-info b small { font-size: 10.5px; color: var(--text-4); font-weight: 500; margin-left: 6px; }
.qs-info span { display: block; font-size: 11px; color: var(--text-3); margin-top: 1px; }
.qs-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1100px) { .qs-cards { grid-template-columns: 1fr; } }

/* 锁定任务卡：明确的锁态，不可点击 */
.quest-card.locked {
  opacity: 0.55;
  filter: grayscale(0.35);
  cursor: not-allowed;
  position: relative;
}
.quest-card.locked:hover { border-color: var(--line); transform: none; }
.quest-card.locked .qc-desc { border-left-color: rgba(255, 176, 32, 0.4); }
.quest-card.locked .qc-badge { background: rgba(255, 255, 255, 0.06); color: var(--text-3); }
.lock-veil {
  position: absolute;
  top: 12px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--collab);
  background: rgba(255, 176, 32, 0.12);
  border: 1px solid rgba(255, 176, 32, 0.3);
  clip-path: var(--cut-sm);
  z-index: 2;
}
.lock-desc { color: var(--text-3); }

/* ---------- 建队 ---------- */
.build-hero {
  padding: 44px 30px 40px;
  text-align: center;
  border: 1px dashed var(--line-2);
  background: radial-gradient(ellipse 60% 70% at 50% 0%, rgba(67, 56, 235, 0.16), transparent 70%), linear-gradient(168deg, var(--ink-700), var(--ink-800));
}
.build-hero .bh-emo { font-size: 40px; margin-bottom: 12px; }
.build-hero h2 { font-size: 20px; font-weight: 700; letter-spacing: 0.04em; }
.build-hero p { font-size: 12.5px; color: var(--text-3); margin-top: 8px; }
.bh-steps {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 22px 0 20px;
}
.bh-step {
  min-width: 168px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  text-align: left;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 3px 10px;
  align-items: center;
}
.bh-step .n {
  grid-row: span 2;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--brand-soft);
  color: var(--brand-3);
  font-size: 12px;
  font-weight: 800;
}
.bh-step b { font-size: 13px; font-weight: 700; }
.bh-step span:last-child { grid-column: 2; font-size: 10.5px; color: var(--text-4); }

/* 向导内部 */
.emblem-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.emblem-pick .em {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--ink-600);
  color: var(--text-3);
  font-size: 16px;
  font-weight: 800;
  transition: all 0.18s;
}
.emblem-pick .em:hover { color: var(--text); }
.emblem-pick .em.on {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
  box-shadow: 0 0 16px rgba(108, 99, 255, 0.5);
}

.mate-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}
.mate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 6px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.18s;
}
.mate:hover { border-color: var(--line-3); }
.mate .avatar { width: 40px; height: 40px; border: 1.5px solid var(--line-2); }
.mate b { font-size: 12px; font-weight: 600; }
.mate .mk { font-size: 9.5px; color: var(--text-4); }
.mate.on {
  border-color: rgba(201, 255, 61, 0.5);
  background: rgba(201, 255, 61, 0.06);
}
.mate.on .mk { color: var(--lime); font-weight: 700; }

.preset-list { display: flex; flex-direction: column; gap: 7px; max-height: 250px; overflow-y: auto; padding-right: 4px; }
.preset {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-2);
  transition: border-color 0.18s;
}
.preset:hover { border-color: var(--line-3); }
.preset input { display: none; }
.preset .box {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  border-radius: 4px;
  border: 1.5px solid var(--line-3);
  display: grid;
  place-items: center;
  font-size: 10px;
  color: transparent;
  transition: all 0.15s;
}
.preset.on { border-color: rgba(201, 255, 61, 0.4); }
.preset.on .box { background: var(--lime); border-color: var(--lime); color: #0C1A00; }
.preset.on .box::after { content: "✓"; font-weight: 800; }

/* ============================================================
   收获日志
   ============================================================ */

.journal-grid {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.journal-form textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px;
  background: var(--ink-800);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  transition: border-color 0.18s;
}
.journal-form textarea:focus { border-color: var(--brand-2); }
.journal-form textarea::placeholder { color: var(--text-4); }

.optional-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-4);
  margin-bottom: 10px;
}
.optional-hint .pill {
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-3);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.star-pick { display: flex; gap: 5px; align-items: center; }
.star-pick button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: var(--text-4);
  transition: transform 0.15s, color 0.15s;
}
.star-pick button.on { color: var(--collab); }
.star-pick button:hover { transform: scale(1.18); }

.journal-list { display: flex; flex-direction: column; gap: 0; }
.j-item {
  position: relative;
  padding: 0 0 18px 22px;
  border-left: 1px solid var(--line);
}
.j-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.j-item::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-650);
  border: 1.5px solid var(--line-3);
}
.j-item.today::before { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 10px rgba(201, 255, 61, 0.6); }
.j-item .j-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.j-item .j-head .jd { font-size: 10.5px; color: var(--text-4); letter-spacing: 0.04em; }
.j-item .j-head .jt { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.j-item .j-text {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--text-2);
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.028);
  border-radius: 7px;
}
.j-item .j-reply {
  margin-top: 7px;
  padding: 8px 11px;
  border-radius: 7px;
  background: rgba(108, 99, 255, 0.1);
  border-left: 2px solid var(--brand-2);
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--text-2);
}
.j-item .j-reply b { color: var(--brand-3); font-weight: 600; }

/* ============================================================
   老师端
   ============================================================ */

.teach-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.stat-card {
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: linear-gradient(168deg, var(--ink-700), var(--ink-750));
}
.stat-card .sl { font-size: 10.5px; letter-spacing: 0.1em; color: var(--text-4); text-transform: uppercase; }
.stat-card .sv { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: 0.01em; }
.stat-card .sv small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.stat-card .sd { font-size: 11px; color: var(--text-3); margin-top: 4px; }

.teach-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.review-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px dashed var(--line);
}
.review-row:last-child { border-bottom: none; }
.review-row .avatar { width: 34px; height: 34px; }
.review-row .rv-info { flex: 1; min-width: 0; }
.review-row .rv-info b { font-size: 12.5px; font-weight: 600; }
.review-row .rv-info .sub { font-size: 10.5px; color: var(--text-3); margin-top: 1px; }
.review-row .rv-actions { display: flex; gap: 6px; }

.attr-dist { display: flex; flex-direction: column; gap: 11px; }
.attr-dist .ad-row {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
}
.attr-dist .ad-row .lb { color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.attr-dist .ad-row .lb i { width: 6px; height: 6px; border-radius: 2px; background: var(--ac); }
.attr-dist .ad-row .vl { text-align: right; font-weight: 700; color: var(--ac); }

.screen-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  width: 100%;
  text-align: left;
  transition: all 0.2s;
}
.screen-btn:hover { border-color: var(--brand-2); background: rgba(108, 99, 255, 0.08); }
.screen-btn .si {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  clip-path: var(--cut-sm);
  background: var(--brand-soft);
  color: var(--brand-3);
  font-size: 14px;
}
.screen-btn .st { flex: 1; }
.screen-btn .st b { display: block; font-size: 12.5px; font-weight: 600; }
.screen-btn .st span { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 1px; }

/* ============================================================
   弹窗 / 提示
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 18, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 24px;
}
.modal.on { display: flex; }

.modal-box {
  width: min(560px, 100%);
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background: linear-gradient(168deg, #171D42, #0D1130);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  animation: fadeUp 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.modal-head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h3 { font-size: 16px; font-weight: 700; }
.modal-head .close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--text-3);
  font-size: 16px;
}
.modal-head .close:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.modal-body { padding: 20px 22px; }
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(0, 0, 0, 0.14);
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 200;
  padding: 11px 20px;
  border-radius: 8px;
  background: rgba(20, 26, 60, 0.97);
  border: 1px solid var(--line-3);
  box-shadow: var(--shadow-2);
  font-size: 12.5px;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .tk {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--lime);
  color: #0C1A00;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}

/* 觉醒仪式全屏 */
.levelup {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 50%, rgba(67, 56, 235, 0.5), rgba(4, 6, 18, 0.97) 62%);
  overflow: hidden;
}
.levelup.on { display: flex; }
.levelup .burst {
  position: absolute;
  width: 900px;
  height: 900px;
  background: repeating-conic-gradient(from 0deg, rgba(201, 255, 61, 0.16) 0deg 6deg, transparent 6deg 18deg);
  animation: spin 24s linear infinite;
  mask-image: radial-gradient(circle, #000 12%, transparent 62%);
  -webkit-mask-image: radial-gradient(circle, #000 12%, transparent 62%);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 精灵 CSS idle 动效（AI 视频伪影阶段的回退方案） ---------- */
.spirit-idle { will-change: transform, filter; }
.anim-bob  { animation: spBob 3.2s ease-in-out infinite; }
.anim-bob.slow { animation-duration: 4.6s; }
.anim-sway { animation: spSway 3.6s ease-in-out infinite; transform-origin: 50% 88%; }
.anim-bobglow { animation: spBob 3.2s ease-in-out infinite, spGlow 2.6s ease-in-out infinite; }
@keyframes spBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2.4%); }
}
@keyframes spSway {
  0%, 100% { transform: rotate(-2.2deg); }
  50%      { transform: rotate(2.2deg); }
}
@keyframes spGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(255, 238, 150, 0.22)); }
  50%      { filter: drop-shadow(0 0 18px rgba(255, 238, 150, 0.6)); }
}
@media (prefers-reduced-motion: reduce) {
  .anim-bob, .anim-sway, .anim-bobglow { animation: none; }
}

.levelup .lu-inner {
  position: relative;
  text-align: center;
  z-index: 2;
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.levelup .lu-kicker {
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--lime);
  font-weight: 700;
  margin-bottom: 12px;
  text-indent: 0.4em;
}
.levelup .lu-lv {
  font-size: 92px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff, var(--lime));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 34px rgba(201, 255, 61, 0.5));
}
.levelup .lu-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.18em;
  margin-top: 8px;
  text-indent: 0.18em;
}
.levelup .lu-sub {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 14px;
  letter-spacing: 0.06em;
}
.levelup .lu-hero {
  height: 240px;
  margin-top: 6px;
  display: grid;
  place-items: end center;
}
.levelup .lu-hero img { height: 100%; width: auto; object-fit: contain; filter: drop-shadow(0 20px 40px rgba(0,0,0,.5)); }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(140, 155, 255, 0.16); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(140, 155, 255, 0.3); }

/* 小屏兜底 */
@media (max-width: 1280px) {
  .shell { grid-template-columns: 200px minmax(0, 1fr); }
  .map-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-grid { grid-template-columns: 280px minmax(0, 1fr); }
  .quest-list { grid-template-columns: minmax(0, 1fr); }
  .teach-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   知识游戏殿堂
   ============================================================ */

.hall-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

/* 殿堂之最 · 横幅大卡 */
.hall-hero {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(168deg, var(--ink-700), var(--ink-750));
  margin-bottom: 18px;
}
.hall-hero .hh-cover {
  width: 200px;
  min-height: 168px;
  flex-shrink: 0;
}
.hh-cover {
  position: relative;
  background: linear-gradient(150deg, var(--hue), var(--hue2));
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hh-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.16), transparent 55%);
}
.hh-glyph {
  font-size: 52px;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.4));
}
/* 游戏卡封面（与殿堂之最大卡共用 --hue 渐变） */
.hc-cover {
  position: relative;
  height: 96px;
  background: linear-gradient(150deg, var(--hue), var(--hue2));
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hc-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.16), transparent 55%);
}
.hh-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #0C1A00;
  background: var(--lime);
  padding: 3px 8px;
  clip-path: var(--cut-sm);
}
.hall-hero .hh-body {
  flex: 1;
  min-width: 0;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
}
.hall-hero .hh-meta { font-size: 11px; color: var(--text-3); letter-spacing: 0.06em; }
.hall-hero .hh-body h2 { margin: 4px 0 6px; font-size: 20px; letter-spacing: 0.04em; }
.hall-hero .hh-body p {
  margin: 0;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 640px;
}
.hall-hero .hh-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hall-hero .hh-foot {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hall-hero .hh-score { font-size: 12px; color: var(--text-3); }
.hall-hero .hh-score b { color: var(--collab); font-size: 16px; margin: 0 2px; }

/* 届别筛选按钮的计数字样 */
#hallTabs button .c { font-size: 10px; color: var(--text-4); font-weight: 500; margin-left: 4px; }
#hallTabs button.on .c { color: rgba(12, 26, 0, 0.72); }

/* 游戏卡片网格 */
.hall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 14px;
}
.hall-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(168deg, var(--ink-700), var(--ink-750));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.22s, transform 0.22s;
}
.hall-card:hover { border-color: var(--line-3); transform: translateY(-3px); }
.hall-card .hc-cover { height: 96px; }
.hall-card .hc-glyph { font-size: 40px; }.hc-cohort {
  position: absolute;
  bottom: 8px;
  left: 10px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.32);
  padding: 2px 7px;
  border-radius: 4px;
}
.hc-score {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 11px;
  font-weight: 800;
  color: #0C1A00;
  background: var(--lime);
  padding: 2px 7px;
  clip-path: var(--cut-sm);
}
.hc-forge {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 8px;
  border-radius: 4px;
}
.hall-card .hc-body {
  padding: 13px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.hall-card .hc-body h3 { margin: 0; font-size: 15px; letter-spacing: 0.03em; }
.hall-card .hc-team { font-size: 10.5px; color: var(--text-3); margin-top: 3px; }
.hall-card .hc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.hall-card .hc-foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hall-card .hc-plays { font-size: 10.5px; color: var(--text-3); }

/* 铸造中 · 降透明度 + 虚线边 */
.hall-card.forging { opacity: 0.66; border-style: dashed; }
.hall-card.forging:hover { transform: none; border-color: var(--line-2); }

@media (max-width: 1280px) {
  .hall-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hall-hero { flex-direction: column; }
  .hall-hero .hh-cover { width: 100%; min-height: 120px; }
}

/* ============================================================
   日间主题（body.light）
   ============================================================ */

body.light {
  --ink-900: #EDF0F9;
  --ink-800: #FFFFFF;
  --ink-750: #F8F9FE;
  --ink-700: #FFFFFF;
  --ink-650: #F1F3FB;
  --ink-600: #E4E8F5;
  --ink-500: #D5DAEE;

  --line: rgba(36, 46, 100, 0.13);
  --line-2: rgba(36, 46, 100, 0.22);
  --line-3: rgba(36, 46, 100, 0.34);

  --text: #1B2145;
  --text-2: #4C5478;
  --text-3: #7B82A6;
  --text-4: #A9AFC9;

  --brand: #4338EB;
  --brand-2: #5A50F0;
  --brand-3: #6259D8;
  --brand-soft: rgba(67, 56, 235, 0.09);
  --lime-soft: rgba(150, 196, 0, 0.16);

  --paper: #FFF9EC;
  --shadow-1: 0 2px 8px rgba(35, 45, 100, 0.08);
  --shadow-2: 0 10px 30px rgba(35, 45, 100, 0.14);
  --shadow-brand: 0 10px 28px rgba(67, 56, 235, 0.22);
}

/* 点阵底纹改浅 */
body.light::before {
  background-image: radial-gradient(circle, rgba(67, 56, 235, 0.12) 1px, transparent 1px);
}

/* 顶栏 */
body.light .topbar { background: rgba(255, 255, 255, 0.88); box-shadow: 0 1px 0 var(--line); }

/* 白色叠加层 → 淡靛叠加 */
body.light .tag.grey { background: rgba(36, 46, 100, 0.06); }
body.light .btn-ghost:hover { background: rgba(36, 46, 100, 0.04); }
body.light .side-item:hover { background: rgba(36, 46, 100, 0.05); }
body.light .topnav button:hover { background: rgba(36, 46, 100, 0.05); }
body.light .modal-head .close:hover { background: rgba(36, 46, 100, 0.06); }
body.light .modal-foot { background: rgba(36, 46, 100, 0.035); }
body.light .badge-cell { background: rgba(36, 46, 100, 0.03); }
body.light .quest-mini { background: rgba(36, 46, 100, 0.03); }
body.light .badge-cell.got { background: rgba(150, 196, 0, 0.1); }

/* 荧光绿文字 → 深橄榄绿，保对比度 */
body.light .tag.lime { color: #5C7A00; }
body.light .stop.now .sn,
body.light .qr-stop.now .sn,
body.light .reward.xp,
body.light .pact-foot .sign-count b,
body.light .member .m-info .r1 .cap.leader,
body.light .mate.on .mk { color: #628200; }

/* 开场遮罩 / 导师对话 */
body.light .overlay { background: radial-gradient(ellipse at 50% 30%, rgba(246, 248, 254, 0.97), rgba(255, 255, 255, 0.99)); }
body.light .dialog-layer { background: linear-gradient(to bottom, rgba(240, 243, 250, 0.2) 0%, rgba(226, 231, 245, 0.82) 62%, rgba(216, 222, 240, 0.96) 100%); }
body.light .bubble { background: #FFFFFF; border-color: var(--line-2); }
body.light .mentor-slot { border-color: #fff; box-shadow: 0 18px 44px rgba(35, 45, 100, 0.22), 0 0 0 6px rgba(108, 99, 255, 0.14); }

/* 弹窗 / 提示 / 觉醒 */
body.light .modal { background: rgba(28, 34, 72, 0.38); }
body.light .modal-box { background: linear-gradient(168deg, #FFFFFF, #F7F8FE); }
body.light .toast { background: rgba(255, 255, 255, 0.98); }
body.light .levelup { background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.97), rgba(228, 232, 248, 0.99)); }
body.light .levelup .burst { opacity: 0.5; }

/* 展示台属性条：深色底 → 白卡 */
body.light .attr-chip {
  background: #FFFFFF;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-1);
}
body.light .attr-chip .info .nm { color: var(--text-2); }
body.light .hero-plate {
  background: #FFFFFF;
  border: 1px solid var(--line-2);
}
body.light .hero-plate .title,
body.light .hero-plate .xp { color: var(--text-2); }

/* 主题切换按钮 */.theme-toggle {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--line-3); color: var(--text); background: rgba(255, 255, 255, 0.05); }
body.light .theme-toggle:hover { background: rgba(36, 46, 100, 0.05); }

/* ============================================================
   老师端 · 闯关任务发布台
   ============================================================ */
.tq-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
}
.tq-row .tq-info { flex: 1; min-width: 0; }
.tq-row .tq-info b { display: block; font-size: 12.5px; font-weight: 700; }
.tq-row .tq-info span { font-size: 11px; color: var(--text-3); }
.tq-row .qc-badge { flex-shrink: 0; }
body.light .tq-row { background: rgba(36, 46, 100, 0.03); }

/* 表单下拉框（与输入框同款） */
.field select {
  width: 100%;
  padding: 10px 11px;
  background: var(--ink-800);
  border: 1px solid var(--line-2);
  border-radius: 7px;
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.field select:focus { border-color: var(--brand-2); }
.field select option { background: var(--ink-800); color: var(--text); }
body.light .field select { background-color: #fff; }
body.light .field select option { background: #fff; color: var(--text); }
