/* ================================================================
   星都异闻录 · 神秘学协会 —— 暖色档案室风格
   与主线《代号：双子》的冷色科幻形成对比
   ================================================================ */
:root {
  --paper:       #f4ead8;
  --paper-2:     #ebe0c9;
  --wood:        #2a1f14;
  --wood-2:      #1c1410;
  --ink:         #2e2418;
  --ink-2:       #5a4a35;
  --ink-dim:     #8a7a60;
  --line:        #c9b898;
  --line-2:      #a89670;
  --lamp:        #e8b96a;
  --lamp-glow:   rgba(232, 185, 106, 0.28);
  --red:         #8a3a2a;
  --red-2:       #a84a35;
  --danger:      #c0392b;
  --green:       #4a6b3a;
  --blue:        #3a5a7a;
  --font-serif:  "SimHei", "黑体", "Microsoft YaHei", sans-serif;
  --font-sans:   "SimHei", "黑体", "Microsoft YaHei", sans-serif;
  --font-mono:   "SimHei", "黑体", "Microsoft YaHei", sans-serif;
  --shadow-sm:   0 2px 6px rgba(30, 20, 10, 0.18);
  --shadow-md:   0 6px 20px rgba(30, 20, 10, 0.28);
  --shadow-lg:   0 18px 50px rgba(20, 12, 6, 0.45);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font-sans);
  background: radial-gradient(ellipse at 30% 20%, #3a2a1a, #150e08 70%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
/* 全站不使用加粗字重（含 <b>/<strong>），强调仅靠颜色区分 */
b, strong { color: var(--red); font-weight: 400; }
button { font-family: var(--font-sans); cursor: pointer; }
input { font-family: var(--font-sans); }

/* ---------------- 通用按钮 ---------------- */
.btn {
  border: 1px solid var(--line-2);
  background: var(--paper-2);
  color: var(--ink-2);
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13.5px;
  transition: all .15s;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn:hover { border-color: var(--red); color: var(--red); background: #fff5e8; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--red-2), var(--red));
  border-color: var(--red);
  color: #fdf6e8;
  font-weight: 400;
}
.btn-primary:hover { background: linear-gradient(180deg, var(--red), #6e2a1e); color: #fff; }
.btn-lg { padding: 12px 30px; font-size: 15px; border-radius: 8px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------------- 全屏层 ---------------- */
.fullscreen-layer {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(40,28,16,.9), rgba(10,7,4,.97));
  backdrop-filter: blur(6px);
}

/* ---------------- 入职画面 ---------------- */
.intro-card {
  max-width: 660px; width: 92%;
  background: var(--paper);
  background-image:
    linear-gradient(rgba(180,160,120,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,160,120,.06) 1px, transparent 1px);
  background-size: 22px 22px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 44px 48px;
  text-align: center;
  box-shadow: var(--shadow-lg), inset 0 0 60px rgba(180,140,80,.15);
  position: relative;
}
.intro-card::before {
  content: ""; position: absolute; inset: 8px;
  border: 1px dashed rgba(138, 58, 42, .25); border-radius: 6px;
  pointer-events: none;
}
.intro-tag {
  display: inline-block; font-size: 12px; letter-spacing: 3px;
  color: var(--red); border: 1px solid var(--red);
  border-radius: 20px; padding: 4px 16px; margin-bottom: 18px;
  font-weight: 400; background: rgba(138,58,42,.06);
}
.intro-card h2 {
  font-family: var(--font-serif);
  font-size: 40px; font-weight: 400; letter-spacing: 10px;
  color: var(--ink); margin-bottom: 10px;
  text-shadow: 0 2px 0 rgba(255,255,255,.4);
}
.intro-meta { color: var(--ink-dim); font-size: 12px; margin-bottom: 24px; letter-spacing: 1px; }
.intro-body {
  text-align: left; font-size: 14.5px; line-height: 2;
  color: var(--ink-2); margin-bottom: 26px;
}
.intro-body p { margin-bottom: 10px; }
.intro-quote {
  font-family: var(--font-serif);
  border-left: 3px solid var(--red);
  background: rgba(138,58,42,.05);
  padding: 12px 16px; margin: 14px 0;
  font-size: 14px; line-height: 1.9; color: var(--ink);
  border-radius: 0 6px 6px 0;
  white-space: pre-line;
}
.intro-hint {
  color: var(--ink-dim); font-size: 12px;
  border-top: 1px dashed var(--line); padding-top: 16px;
  margin-bottom: 14px;
}
.intro-device {
  font-size: 12px; color: #8a6a2a;
  border: 1px dashed rgba(180,140,60,.5); border-radius: 8px;
  padding: 9px 14px; background: rgba(232,185,106,.12);
  margin-bottom: 20px; line-height: 1.9;
}
.diff-row { display: flex; gap: 14px; justify-content: center; margin-bottom: 12px; }
.diff-btn {
  flex: 1; max-width: 220px;
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 18px; border-radius: 10px;
  border: 2px solid var(--line); background: #fdf8ec;
}
.diff-btn .diff-t { font-size: 15px; font-weight: 400; color: var(--ink); }
.diff-btn .diff-d { font-size: 11.5px; color: var(--ink-dim); }
.diff-btn:hover { border-color: var(--red); background: #fff5e8; }
.diff-note { font-size: 11.5px; color: var(--ink-dim); }

/* ---------------- 工作台 ---------------- */
#desk-screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(232,185,106,.10), transparent 60%),
    linear-gradient(180deg, #2a1f14, #150e08);
}

/* —— 顶栏 —— */
#top-bar {
  height: 54px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  background: linear-gradient(180deg, #3a2a1a, #2a1e12);
  border-bottom: 2px solid #0f0a06;
  box-shadow: 0 3px 12px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,220,150,.08);
}
.tb-brand { display: flex; align-items: center; gap: 12px; }
.tb-logo {
  font-size: 20px; color: var(--lamp);
  text-shadow: 0 0 12px var(--lamp-glow);
  animation: tbPulse 3s ease-in-out infinite;
}
@keyframes tbPulse { 0%,100%{opacity:.7} 50%{opacity:1} }
.tb-name {
  font-family: var(--font-serif); font-size: 15px;
  letter-spacing: 2px; color: #e8d5a8; font-weight: 400;
}
.tb-stats { display: flex; gap: 22px; font-size: 12.5px; color: #a89878; }
.tb-stats b { color: var(--lamp); font-family: var(--font-mono); }

/* —— 工作台三栏 —— */
#workbench {
  flex: 1; display: flex; gap: 0;
  overflow: hidden;
}

/* 左侧：委托列表 */
#case-list {
  width: 260px; flex-shrink: 0;
  background: linear-gradient(180deg, #241a11, #1a1209);
  border-right: 2px solid #0f0a06;
  display: flex; flex-direction: column;
  box-shadow: inset -4px 0 14px rgba(0,0,0,.4);
}
.cl-head {
  padding: 14px 18px; font-size: 13px; letter-spacing: 2px;
  color: var(--lamp); border-bottom: 1px solid #3a2a1a;
  background: rgba(0,0,0,.2);
  font-family: var(--font-serif);
}
#case-items {
  flex: 1; overflow-y: auto; padding: 8px; min-height: 0;
}
.case-item {
  padding: 10px 13px; margin-bottom: 5px;
  border: 1px solid #3a2a1a; border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,220,150,.02), rgba(0,0,0,.1));
  cursor: pointer; transition: all .15s;
  position: relative;
}
.case-item:hover { border-color: var(--lamp); background: rgba(232,185,106,.08); }
.case-item.active {
  border-color: var(--lamp); background: rgba(232,185,106,.14);
  box-shadow: 0 0 0 1px var(--lamp-glow), inset 0 0 20px rgba(232,185,106,.06);
}
.case-item.done { opacity: .5; }
.case-item.done::after {
  content: "✓"; position: absolute; right: 12px; top: 12px;
  color: var(--green); font-weight: 400; font-size: 14px;
}
.case-item.locked { opacity: .35; cursor: not-allowed; }
.case-item.locked::after {
  content: "🔒"; position: absolute; right: 10px; top: 10px; font-size: 12px;
}
/* 隐藏委托：无编号委托，视觉上与其他委托区分 */
.case-item.hidden-case {
  border-style: dashed;
  border-color: var(--red);
  background: linear-gradient(180deg, rgba(138,58,42,.14), rgba(0,0,0,.12));
}
.case-item.hidden-case .ci-num { color: var(--red-2); letter-spacing: 2px; }
.case-item.hidden-case .ci-title { font-style: italic; }

/* 现象判定卡 */
#judge-cards .jc-title {
  font-family: var(--font-serif); font-size: 13.5px; letter-spacing: 2px;
  color: var(--lamp); font-weight: 400; margin-bottom: 8px;
}
.jc-list { display: flex; flex-direction: column; gap: 5px; }
.jc-item {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 6px 9px; border-radius: 5px;
  background: rgba(255,220,150,.05); border: 1px solid #3a2a1a;
  font-size: 11.5px; line-height: 1.45;
}
.jc-q { color: #a89a80; flex: 1; min-width: 0; }
.jc-a {
  color: var(--lamp); font-weight: 400; font-family: var(--font-serif);
  flex-shrink: 0; letter-spacing: 1px;
}
.ci-num {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--lamp); letter-spacing: 1px; margin-bottom: 3px;
}
.ci-title {
  font-size: 13px; color: #e8d5a8; font-weight: 400; line-height: 1.4;
  margin-bottom: 4px;
}
.ci-meta {
  font-size: 10.5px; color: #8a7a60; display: flex; gap: 10px;
}
.cl-footer {
  padding: 10px 18px; border-top: 1px solid #3a2a1a;
  font-size: 11px; color: #8a7a60; line-height: 1.6;
  display: flex; flex-direction: column; gap: 2px;
  background: rgba(0,0,0,.2);
  flex-shrink: 0;
}
.cl-footer b { color: #b8a880; }

/* 中间：工作区 */
#work-area {
  flex: 1; overflow-y: auto;
  background: var(--paper);
  background-image:
    linear-gradient(rgba(180,160,120,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,160,120,.05) 1px, transparent 1px);
  background-size: 26px 26px;
  box-shadow: inset 0 0 80px rgba(180,140,80,.12);
  position: relative;
}
#work-area::-webkit-scrollbar { width: 10px; }
#work-area::-webkit-scrollbar-track { background: #e8dcc4; }
#work-area::-webkit-scrollbar-thumb {
  background: #b8a880; border-radius: 5px; border: 2px solid #e8dcc4;
}
/* 委托列表 / 协会通讯：沉浸式滚动条（平时隐形，悬停浮现） */
#case-items, #chat-log { scrollbar-width: thin; scrollbar-color: transparent transparent; }
#case-items:hover, #chat-log:hover { scrollbar-color: rgba(138,58,42,.35) transparent; }
#case-items::-webkit-scrollbar, #chat-log::-webkit-scrollbar { width: 5px; }
#case-items::-webkit-scrollbar-track, #chat-log::-webkit-scrollbar-track { background: transparent; }
#case-items::-webkit-scrollbar-thumb, #chat-log::-webkit-scrollbar-thumb {
  background: transparent; border-radius: 3px; transition: background .2s;
}
#case-items:hover::-webkit-scrollbar-thumb, #chat-log:hover::-webkit-scrollbar-thumb {
  background: rgba(138,58,42,.3);
}
.work-empty {
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #a89878; gap: 10px;
}
.we-icon { font-size: 54px; opacity: .5; }
.we-title { font-size: 17px; font-family: var(--font-serif); letter-spacing: 2px; }
.we-sub { font-size: 12px; opacity: .7; }

/* 委托详情 */
.case-detail { padding: 30px 38px 40px; max-width: 720px; }
.cd-header {
  border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 22px;
  position: relative;
}
.cd-header::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 60px; height: 3px; background: var(--red);
}
.cd-num {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--red); letter-spacing: 2px; margin-bottom: 6px;
}
.cd-title {
  font-family: var(--font-serif); font-size: 26px; letter-spacing: 3px;
  color: var(--ink); font-weight: 400; margin-bottom: 10px;
}
.cd-meta {
  display: flex; flex-wrap: wrap; gap: 16px;
  font-size: 12px; color: var(--ink-2);
}
.cd-meta span { display: flex; align-items: center; gap: 5px; }
.cd-meta b { color: var(--red); }

.cd-section { margin-bottom: 24px; }
.cd-sec-title {
  font-family: var(--font-serif); font-size: 15px; letter-spacing: 2px;
  color: var(--ink); font-weight: 400;
  padding-left: 10px; border-left: 3px solid var(--red);
  margin-bottom: 12px;
}
.cd-text {
  font-size: 14px; line-height: 2; color: var(--ink-2);
  text-align: justify;
  background: rgba(255,250,235,.6); padding: 14px 18px;
  border-radius: 6px; border: 1px solid var(--line);
}
.cd-text p { margin-bottom: 10px; }
.cd-text p:last-child { margin-bottom: 0; }
.cd-hint {
  font-size: 12px; color: var(--ink-dim); font-family: var(--font-mono);
  background: rgba(232,185,106,.12); border: 1px dashed var(--line-2);
  border-radius: 5px; padding: 8px 12px; margin-bottom: 12px; line-height: 1.7;
}
.cd-archived {
  color: var(--green) !important; font-weight: 400;
  border: 1px solid var(--green); border-radius: 4px; padding: 1px 8px; font-size: 11px;
}
.cd-quote {
  font-family: var(--font-serif);
  border-left: 3px solid var(--ink-dim);
  padding: 8px 14px; margin: 10px 0;
  color: var(--ink); font-style: italic;
  background: rgba(180,160,120,.08);
  border-radius: 0 6px 6px 0;
}

/* 线索 */
.clue-list { display: flex; flex-direction: column; gap: 8px; }
.clue {
  padding: 12px 16px; border-radius: 6px;
  background: rgba(255,250,235,.7);
  border-left: 3px solid var(--line-2);
  font-size: 13.5px; line-height: 1.8; color: var(--ink-2);
  animation: clueIn .35s ease-out;
}
.clue.found { border-left-color: var(--green); }
.clue.found::before { content: "✓ "; color: var(--green); font-weight: 400; }
.clue.missing { border-left-color: var(--line); opacity: .55; }
.clue.missing::before { content: "◌ "; color: var(--ink-dim); }
@keyframes clueIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.clue-source {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ink-dim); margin-top: 4px; letter-spacing: .5px;
}

/* 分类器 */
.classifier {
  margin-top: 26px; padding: 22px 24px;
  border: 2px dashed var(--line-2); border-radius: 10px;
  background: rgba(232,185,106,.06);
}
.cl-title {
  font-family: var(--font-serif); font-size: 15px; letter-spacing: 2px;
  color: var(--ink); font-weight: 400; margin-bottom: 6px;
}
.cl-sub { font-size: 12px; color: var(--ink-dim); margin-bottom: 16px; }
.class-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.class-opt {
  padding: 12px 8px; border: 2px solid var(--line); border-radius: 8px;
  background: #fdf8ec; cursor: pointer; text-align: center;
  transition: all .15s;
}
.class-opt:hover { border-color: var(--red); background: #fff5e8; }
.class-opt.selected { border-color: var(--red); background: var(--red); color: #fdf6e8; }
.class-opt.selected .co-desc { color: rgba(255,255,255,.85); }
.class-opt.readonly { cursor: default; opacity: .75; }
.class-opt.readonly:hover { border-color: var(--line); }
.co-name { font-size: 14px; font-weight: 400; margin-bottom: 4px; }
.co-desc { font-size: 11px; color: var(--ink-dim); line-height: 1.5; }

/* 右侧：工具箱 */
#tool-box {
  width: 300px; flex-shrink: 0;
  background: linear-gradient(180deg, #241a11, #1a1209);
  border-left: 2px solid #0f0a06;
  display: flex; flex-direction: column;
  box-shadow: inset 4px 0 14px rgba(0,0,0,.4);
  overflow-y: auto;
}
.tx-block {
  padding: 16px 18px; border-bottom: 1px solid #3a2a1a;
}
.tx-title {
  font-size: 12.5px; color: var(--lamp); letter-spacing: 1.5px;
  font-family: var(--font-serif); margin-bottom: 10px; font-weight: 400;
}
.tx-search { display: flex; gap: 6px; }
.tx-search input {
  flex: 1; background: #0f0a06; border: 1px solid #3a2a1a;
  color: #e8d5a8; padding: 8px 10px; border-radius: 6px;
  font-size: 12.5px; outline: none; min-width: 0;
  font-family: var(--font-mono);
}
.tx-search input:focus { border-color: var(--lamp); box-shadow: 0 0 0 3px var(--lamp-glow); }
.tx-search .btn { padding: 8px 14px; font-size: 12.5px; flex-shrink: 0; }
.tx-hint { font-size: 10.5px; color: #6a5a40; margin-top: 8px; letter-spacing: .5px; }

/* 通讯 */
.chat-log {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 260px; overflow-y: auto;
}
.chat-msg {
  padding: 8px 12px; border-radius: 6px; font-size: 12.5px; line-height: 1.7;
  animation: clueIn .3s ease-out;
}
.chat-msg.sys { color: #8a7a60; font-family: var(--font-mono); font-size: 11px; }
.chat-msg.from-people {
  background: rgba(58,90,122,.25); border-left: 3px solid #5a7a9a;
  color: #d8e8f5;
}
.chat-msg.from-me {
  background: rgba(232,185,106,.12); border-left: 3px solid var(--lamp);
  color: #e8d5a8; align-self: flex-end;
}
.chat-msg .cm-sender {
  font-size: 10.5px; color: var(--lamp); font-weight: 400;
  margin-bottom: 3px; letter-spacing: 1px;
}
.chat-msg.from-people .cm-sender { color: #7fa8c8; }

/* —— 底栏 —— */
#bottom-bar {
  height: 30px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  background: #150e08; border-top: 2px solid #0f0a06;
  font-family: var(--font-mono); font-size: 11px; color: #6a5a40;
}
#bb-clock { color: var(--lamp); }

/* ---------------- 结局 ---------------- */
.ending-inner, .afterword-inner {
  max-width: 640px; width: 92%;
  background: var(--paper);
  background-image:
    linear-gradient(rgba(180,160,120,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,160,120,.06) 1px, transparent 1px);
  background-size: 22px 22px;
  border: 1px solid var(--line-2); border-radius: 10px;
  padding: 44px 48px; text-align: center;
  box-shadow: var(--shadow-lg), inset 0 0 60px rgba(180,140,80,.15);
  max-height: 88vh; overflow-y: auto;
}
.ending-tag, .aw-tag {
  display: inline-block; font-size: 12px; letter-spacing: 3px;
  color: var(--red); border: 1px solid var(--red);
  border-radius: 20px; padding: 4px 16px; margin-bottom: 18px; font-weight: 400;
}
.ending-inner h2 {
  font-family: var(--font-serif); font-size: 32px; letter-spacing: 8px;
  color: var(--ink); margin-bottom: 16px; font-weight: 400;
}
.ending-body {
  text-align: left; font-size: 14.5px; line-height: 2.1;
  color: var(--ink-2); margin: 20px 0;
}
.ending-body p { margin-bottom: 12px; }
.ending-quote {
  font-family: var(--font-serif); font-size: 14px; font-style: italic;
  color: var(--red); border-left: 3px solid var(--red);
  padding-left: 14px; margin: 24px 0; text-align: left; line-height: 2;
}
.aw-body {
  text-align: left; font-size: 13.5px; line-height: 2;
  color: var(--ink-2); margin: 16px 0 24px;
}
.aw-body p { margin-bottom: 12px; }
.aw-body .aw-mono {
  font-family: var(--font-mono); font-size: 12px;
  background: rgba(138,58,42,.06); padding: 10px 14px;
  border-left: 3px solid var(--red); border-radius: 0 6px 6px 0;
  color: var(--ink);
}

/* ---------------- Toast ---------------- */
#toast-area {
  position: fixed; right: 24px; bottom: 48px; z-index: 99999;
  display: flex; flex-direction: column; gap: 10px;
  width: 340px; max-width: calc(100vw - 48px); pointer-events: none;
}
.toast {
  pointer-events: auto; cursor: pointer;
  background: rgba(42, 31, 20, .95);
  border: 1px solid #5a4a35; border-left: 4px solid var(--lamp);
  border-radius: 8px; padding: 12px 16px;
  color: #e8d5a8; font-size: 13px; line-height: 1.6;
  box-shadow: 0 8px 28px rgba(0,0,0,.6);
  transform: translateX(20px); opacity: 0;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .28s;
  position: relative;
}
.toast.show, .toast:not(.out) { transform: translateX(0); opacity: 1; }
.toast.out { transform: translateX(20px); opacity: 0; }
.toast .t-title {
  font-weight: 400; font-size: 13.5px; margin-bottom: 4px; color: var(--lamp);
  padding-right: 22px;
}
.toast .t-body { font-size: 12.5px; color: #c8b898; }
.toast.warn { border-left-color: #d8a657; }
.toast.warn .t-title { color: #d8a657; }
.toast.danger { border-left-color: var(--red-2); }
.toast.danger .t-title { color: #d88a7a; }
.toast .t-close {
  position: absolute; top: 8px; right: 8px;
  width: 20px; height: 20px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.08); color: #8a7a60;
  font-size: 11px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.toast .t-close:hover { background: rgba(255,255,255,.18); color: #fff; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  #case-list { width: 200px; }
  #tool-box { width: 240px; }
  .class-opts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  #workbench { flex-direction: column; }
  #case-list, #tool-box { width: 100%; max-height: 200px; }
}
/* ---------------- 入职问卷 ---------------- */
.q-container { text-align: left; margin: 20px 0; }
.q-item {
  padding: 12px 16px; margin-bottom: 8px;
  background: rgba(255,250,235,.6);
  border: 1px solid var(--line); border-radius: 6px;
  display: flex; align-items: center; gap: 12px;
}
.q-label { flex: 0 0 auto; font-size: 14px; color: var(--ink); font-weight: 400; }
.q-answer { font-size: 14px; color: var(--ink-2); }
.q-weird { border-left: 3px solid var(--red); }
.q-input {
  flex: 1; background: #fff; border: 1px solid var(--line-2);
  padding: 6px 10px; border-radius: 4px; font-size: 14px;
  color: var(--ink); outline: none; font-family: var(--font-mono);
}
.q-input:focus { border-color: var(--red); }
.q-error {
  color: var(--red); font-size: 13px; margin-top: 10px;
  text-align: center;
}

/* ---------------- 白色房间 ---------------- */
#whiteroom-screen {
  background: #fff;
  align-items: center; justify-content: center;
}
.wr-terminal {
  position: relative;
  max-width: 680px; width: 92%;
  font-family: var(--font-mono);
  color: #1a1a1a;
  font-size: 14px; line-height: 2;
  min-height: 60vh;
  max-height: 90vh;
  overflow-y: auto;
  padding-bottom: 40px;
}
.wr-skip {
  position: absolute; right: 0; top: -6px;
  font-family: var(--font-sans); font-size: 11.5px;
  color: #999; cursor: pointer; user-select: none;
  padding: 4px 10px; border: 1px solid #ddd; border-radius: 20px;
  background: #fff; transition: all .15s;
}
.wr-skip:hover { color: #333; border-color: #999; }
.wr-lines { white-space: pre-line; }
.wr-lines .wr-line { margin-bottom: 4px; }
.wr-lines .wr-pause { margin: 16px 0; }
.wr-choices {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-top: 30px;
}
.wr-choice {
  padding: 18px 16px; border: 2px solid #ccc; border-radius: 8px;
  cursor: pointer; text-align: center; transition: all .2s;
  background: #fff;
}
.wr-choice:hover { border-color: #333; background: #f5f5f5; }
.wr-choice-hidden { opacity: .25; border-style: dashed; }
.wr-choice-hidden:hover { opacity: .5; }
.wc-name { font-family: var(--font-serif); font-size: 16px; font-weight: 400; margin-bottom: 6px; }
.wc-desc { font-size: 12px; color: #888; }

/* ===== 辰天集团版 · 页面优化补丁 ===== */

/* 服务器终端 */
.server-terminal {
  padding: 24px;
  font-family: var(--font-mono, "Courier New", monospace);
}
.server-line {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-2, #333);
}
.server-line.mono { font-family: var(--font-mono, monospace); }
.server-line.ok { color: #2a7a2a; }
.server-line.warn { color: #b8860b; }
.server-line.dim { color: var(--ink-dim, #999); }
.server-cipher {
  margin: 20px 0;
  padding: 20px;
  background: rgba(0,0,0,.04);
  border-radius: 8px;
  text-align: center;
}
.cipher-label {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink, #222);
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.cipher-hint {
  font-size: 12px;
  color: var(--ink-dim, #999);
  margin-bottom: 12px;
  font-family: var(--font-mono, monospace);
}
.cipher-text {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 4px;
  color: var(--ink, #222);
  margin-bottom: 16px;
  font-family: var(--font-mono, monospace);
}
.cipher-input {
  display: block;
  width: 280px;
  margin: 0 auto 12px;
  padding: 10px 16px;
  font-size: 16px;
  font-family: var(--font-mono, monospace);
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
}
.cipher-input:focus { border-color: #6a5a40; }

/* 归档条 */
.archive-banner {
  margin: 0 0 24px;
  padding: 16px 22px;
  background: linear-gradient(90deg, rgba(74,107,58,.12), rgba(74,107,58,.04));
  border-left: 4px solid var(--green, #4a6b3a);
  border-radius: 0 8px 8px 0;
  animation: archiveIn .6s ease-out;
}
@keyframes archiveIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.archive-banner .ab-title {
  font-size: 17px; font-weight: 400;
  color: var(--green, #4a6b3a); letter-spacing: 2px;
  margin-bottom: 4px;
}
.archive-banner .ab-sub {
  font-size: 12.5px; color: var(--ink-dim, #999);
  margin-bottom: 8px;
}
.archive-banner .ab-note {
  font-size: 13px; color: var(--ink-2, #555);
  line-height: 1.8;
  padding-top: 8px;
  border-top: 1px dashed rgba(74,107,58,.3);
}

/* 白房间渐入 */
#whiteroom-screen {
  animation: wrFadeIn 1.2s ease-out;
}
@keyframes wrFadeIn {
  from { opacity: 0; background: #000; }
  to { opacity: 1; background: #fff; }
}
.wr-pause { height: 24px; }
.wr-line {
  opacity: 0;
  animation: wrLineIn .5s ease-out forwards;
}
@keyframes wrLineIn {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: none; }
}

/* 结局段落逐段出现 */
.ending-body p {
  opacity: 0;
  animation: endingP .8s ease-out forwards;
}
@keyframes endingP {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* 委托完成打勾动画 */
.case-item.done::after {
  content: "\2713";
  position: absolute; right: 12px; top: 12px;
  color: var(--green, #4a6b3a); font-weight: 400; font-size: 14px;
  animation: doneCheck .5s ease-out;
}
@keyframes doneCheck {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}


/* ===== 辰天集团服务器 · 深色科幻终端 ===== */
.hack-interface {
  background: #0a0e1a;
  color: #4af0c0;
  font-family: "SimHei", "黑体", sans-serif;
  padding: 0;
  min-height: 600px;
  display: flex;
  flex-direction: column;
}
.hack-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(74,240,192,.2);
}
.hack-status-badge {
  background: rgba(74,240,192,.15);
  border: 1px solid #4af0c0;
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 13px;
  color: #4af0c0;
  letter-spacing: 1px;
}
.hack-shield { margin-right: 4px; }
.hack-logo {
  font-size: 16px;
  font-weight: 400;
  color: #4af0c0;
  letter-spacing: 4px;
}
.hack-logo-dim { color: rgba(74,240,192,.4); font-weight: 400; font-size: 11px; }

.hack-main {
  display: grid;
  grid-template-columns: 200px 1fr 180px;
  gap: 16px;
  padding: 20px 24px;
  flex: 1;
}
.hack-left {
  border-right: 1px solid rgba(74,240,192,.15);
  padding-right: 16px;
}
.hack-section-label {
  font-size: 10px;
  color: rgba(74,240,192,.5);
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.hack-id {
  font-size: 13px;
  color: #e8c547;
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.boot-line {
  margin-bottom: 10px;
  font-size: 11px;
}
.boot-label {
  display: block;
  color: rgba(74,240,192,.7);
  margin-bottom: 3px;
}
.boot-bar {
  height: 4px;
  background: rgba(74,240,192,.1);
  border-radius: 2px;
  overflow: hidden;
}
.boot-bar-fill {
  height: 100%;
  background: #4af0c0;
  transition: width .4s ease;
}
.boot-line.active .boot-bar-fill {
  background: #e8c547;
  animation: bootPulse 1s ease infinite;
}
@keyframes bootPulse {
  0%,100% { opacity: 1; }
  50% { opacity: .4; }
}

.hack-center { display: flex; flex-direction: column; }
.hack-monitor {
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(74,240,192,.3);
  border-radius: 4px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.mon-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(74,240,192,.2);
}
.mon-badge {
  font-size: 12px;
  color: #e8c547;
  letter-spacing: 2px;
}
.mon-badge.ok { color: #4af0c0; }
.mon-badge.warn { color: #ff6b6b; }
.mon-rec {
  font-size: 11px;
  color: #ff6b6b;
  animation: recBlink 1.5s ease infinite;
}
@keyframes recBlink {
  0%,100% { opacity: 1; }
  50% { opacity: .3; }
}
.mon-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.mon-log-line {
  font-size: 13px;
  color: rgba(74,240,192,.8);
  margin-bottom: 4px;
}
.mon-log-line.ok { color: #4af0c0; }
.mon-log-line.warn { color: #ff6b6b; }
.mon-log-line.dim { color: rgba(74,240,192,.4); }

.cipher-label {
  font-size: 16px;
  color: #e8c547;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.cipher-hint {
  font-size: 12px;
  color: rgba(74,240,192,.5);
  margin-bottom: 16px;
}
.cipher-text {
  font-size: 28px;
  font-weight: 400;
  color: #4af0c0;
  letter-spacing: 6px;
  margin-bottom: 20px;
}
.cipher-input {
  background: rgba(0,0,0,.6);
  border: 1px solid rgba(74,240,192,.4);
  border-radius: 4px;
  padding: 10px 16px;
  font-size: 16px;
  font-family: "SimHei", "黑体", sans-serif;
  color: #4af0c0;
  text-align: center;
  width: 260px;
  margin-bottom: 12px;
  outline: none;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.cipher-input:focus { border-color: #4af0c0; box-shadow: 0 0 10px rgba(74,240,192,.3); }
.cipher-input::placeholder { color: rgba(74,240,192,.3); text-transform: none; letter-spacing: 0; }
.btn-hacker {
  background: transparent;
  border: 1px solid #4af0c0;
  color: #4af0c0;
  padding: 8px 24px;
  font-family: "SimHei", "黑体", sans-serif;
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 2px;
  border-radius: 4px;
  transition: all .2s;
}
.btn-hacker:hover {
  background: rgba(74,240,192,.15);
  box-shadow: 0 0 12px rgba(74,240,192,.3);
}

.hack-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-left: 1px solid rgba(74,240,192,.15);
  padding-left: 16px;
}
.hack-brain {
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
  position: relative;
}
.brain-visual {
  width: 100%;
  height: 100%;
  position: relative;
}
.brain-circle {
  position: absolute;
  border: 1px solid rgba(74,240,192,.3);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.brain-circle:nth-child(1) { width: 100px; height: 100px; }
.brain-circle:nth-child(2) { width: 60px; height: 60px; animation: brainSpin 4s linear infinite; border-style: dashed; }
.brain-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #4af0c0;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px #4af0c0;
}
@keyframes brainSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
.hack-progress { width: 100%; }
.hp-label {
  font-size: 11px;
  color: rgba(74,240,192,.7);
  margin-bottom: 4px;
}
.hp-bar {
  height: 6px;
  background: rgba(74,240,192,.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}
.hp-fill {
  height: 100%;
  background: #e8c547;
  transition: width .6s ease;
}
.hp-fill.green { background: #4af0c0; }

.hack-bottom {
  padding: 12px 24px;
  border-top: 1px solid rgba(74,240,192,.2);
  text-align: center;
}
.hack-status-line {
  font-size: 12px;
  color: rgba(74,240,192,.6);
  letter-spacing: 1px;
}

/* 覆盖原来的浅色server样式 */
.server-terminal { background: transparent; padding: 0; }


/* 调整黑客UI适配中心列宽度 */
.hack-main {
  grid-template-columns: 130px 1fr 120px;
  gap: 10px;
  padding: 14px 12px;
}
.hack-left { padding-right: 10px; }
.hack-right { padding-left: 10px; }
.hack-top { padding: 8px 14px; }
.hack-bottom { padding: 8px 14px; }
.mon-body { padding: 16px; }
.cipher-text { font-size: 22px; margin-bottom: 14px; }
.cipher-input { width: 200px; font-size: 14px; padding: 8px 12px; }
.hack-brain { width: 80px; height: 80px; margin-bottom: 12px; }
.brain-circle:nth-child(1) { width: 70px; height: 70px; }
.brain-circle:nth-child(2) { width: 42px; height: 42px; }
.boot-line { font-size: 10px; margin-bottom: 8px; }


/* === Q5 选择题按钮 === */
.q-choices { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.q-choice-btn {
  padding: 10px 18px; border: 1.5px solid var(--line); border-radius: 6px;
  background: var(--paper); color: var(--ink); font-family: var(--font-serif);
  font-size: 15px; cursor: pointer; transition: all .2s;
}
.q-choice-btn:hover { border-color: var(--gold); background: var(--gold-soft); }
.q-choice-btn.selected { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); font-weight: 400; }

/* === 简介页氛围 === */
.intro-screen-dark {
  background:
    linear-gradient(rgba(8, 10, 18, .35), rgba(5, 6, 12, .6)),
    url("assets/bg-intro.jpg") center / cover no-repeat,
    radial-gradient(ellipse at 50% 30%, #1a1a2e 0%, #0d0d1a 60%, #050508 100%);
}
/* === 正传推荐链接 === */
.intro-rec {
  display: block; margin-bottom: 20px;
  font-size: 13.5px; line-height: 1.6;
  color: var(--red); text-decoration: none;
  border: 1px solid rgba(138,58,42,.35); border-radius: 8px;
  padding: 10px 14px; background: rgba(138,58,42,.06);
  transition: all .15s;
}
.intro-rec b { color: var(--red); }
.intro-rec:hover {
  background: rgba(138,58,42,.14); border-color: var(--red);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(138,58,42,.18);
}
.intro-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,.7) 100%);
}
.intro-screen-dark .intro-card {
  position: relative; z-index: 1;
  background: rgba(255, 250, 240, 0.97);
  box-shadow: 0 0 60px rgba(212, 175, 55, .15), 0 20px 60px rgba(0,0,0,.5);
}

/* === 新人教程 === */
.tu-card { max-width: 640px; width: min(92vw, 640px); }
.tu-body {
  min-height: 240px; margin-top: 14px;
  font-size: 15px; line-height: 1.9; color: var(--ink);
  animation: tu-fade .35s ease;
}
.tu-body p { margin: 0 0 10px; }
.tu-body b { color: var(--red); }
.tu-body .tu-tip {
  margin-top: 14px; padding: 10px 14px;
  font-size: 13px; color: #6b5a34;
  border-left: 3px solid var(--gold); background: var(--gold-soft);
  border-radius: 0 6px 6px 0;
}
.tu-list { margin: 0 0 10px; padding-left: 22px; }
.tu-list li { margin-bottom: 4px; }
@keyframes tu-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tu-dots { display: flex; gap: 8px; justify-content: center; margin: 18px 0 14px; }
.tu-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line); transition: all .25s;
}
.tu-dot.past { background: #b08c2a; opacity: .85; }
.tu-dot.on { background: var(--red); transform: scale(1.25); }
.tu-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tu-skip {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--ink-dim); padding: 8px 4px;
  transition: color .15s;
}
.tu-skip:hover { color: var(--red); }

/* === 结局页问卷入口 === */
.ending-survey {
  display: block; text-decoration: none;
  max-width: 460px; margin: 22px auto 18px;
  padding: 14px 20px; text-align: center;
  border: 1.5px solid rgba(212,175,55,.55); border-radius: 10px;
  background: rgba(212,175,55,.10);
  transition: all .2s;
}
.ending-survey .es-t {
  display: block; font-family: var(--font-serif);
  font-size: 17px; font-weight: 400; color: var(--ink); letter-spacing: 1px;
}
.ending-survey .es-d {
  display: block; margin-top: 4px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-dim);
}
.ending-survey:hover {
  border-color: var(--gold); background: rgba(212,175,55,.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212,175,55,.25);
}
.ending-survey:hover .es-d { color: var(--red); }


.glitch-text {
  animation: glitch 0.3s infinite;
  display: inline-block;
}
@keyframes glitch {
  0% { transform: translate(0); opacity: 1; }
  25% { transform: translate(-1px, 1px); opacity: 0.7; }
  50% { transform: translate(1px, -1px); opacity: 0.5; }
  75% { transform: translate(-1px, -1px); opacity: 0.8; }
  100% { transform: translate(0); opacity: 1; }
}

#chat-log .sys { font-family: var(--font-serif) !important; font-style: italic; opacity: 0.9; letter-spacing: 0.5px; }
.mon-glitch-text {
  font-size: 22px; color: var(--danger); letter-spacing: 2px;
  animation: glitch-shake 0.4s infinite;
}
@keyframes glitch-shake {
  0% { transform: translate(0); opacity: 1; }
  25% { transform: translate(-1px, 1px); opacity: 0.7; }
  50% { transform: translate(1px, -1px); opacity: 0.5; }
  75% { transform: translate(-1px, -1px); opacity: 0.8; }
  100% { transform: translate(0); opacity: 1; }
}
