/* ============================================================
   红绳证据板 board.html
   ============================================================ */

.board-shell {
  position: relative;
  border: 1px solid var(--fog-18);
  background: #0a0c10;
  overflow: auto;
  border-radius: 2px;
  box-shadow: inset 0 0 90px rgba(0,0,0,.8);
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.board-shell.panning { cursor: grabbing; }

/* 软木板 */
.board {
  position: relative;
  width: 1460px;
  height: 940px;
  background:
    radial-gradient(ellipse 60% 50% at 30% 25%, rgba(140,96,48,.16), transparent 60%),
    radial-gradient(ellipse 55% 45% at 75% 70%, rgba(120,80,40,.13), transparent 60%),
    linear-gradient(150deg, #3a2a1a 0%, #2d2013 45%, #241a10 100%);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
/* 软木颗粒 */
.board::before {
  content: '';
  position: absolute; inset: 0;
  opacity: .34;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='5'/%3E%3CfeColorMatrix type='saturate' values='0.2'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23c)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
}
/* 木框暗角 */
.board::after {
  content: '';
  position: absolute; inset: 0;
  box-shadow: inset 0 0 120px rgba(20,10,0,.85), inset 0 0 30px rgba(0,0,0,.6);
  pointer-events: none;
}

.board-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 2;
}
.board-svg .thread { pointer-events: stroke; cursor: pointer; }
.board-svg .thread:hover + .thread-hit,
.board-svg .thread-hit:hover { stroke-opacity: .25; }

/* ---------- 卡片 ---------- */
.ev-card {
  position: absolute;
  width: 178px;
  padding: 15px 15px 14px;
  background: linear-gradient(160deg, #f2e8ce, #ddcdaa);
  color: #241c10;
  border-radius: 1px;
  box-shadow: 0 12px 26px rgba(0,0,0,.55), 0 2px 4px rgba(0,0,0,.4);
  cursor: grab;
  z-index: 3;
  transition: box-shadow .3s, transform .18s var(--ease);
  font-family: var(--f-serif);
}
.ev-card:active { cursor: grabbing; }
.ev-card.dragging { z-index: 40; box-shadow: 0 30px 60px rgba(0,0,0,.7); transform: scale(1.035) rotate(0deg) !important; transition: none; }
.ev-card.linking { box-shadow: 0 0 0 2px var(--blood-glow), 0 16px 34px rgba(0,0,0,.6); }
.ev-card.hint { animation: cardHint 1.1s ease-in-out 3; }
@keyframes cardHint { 50% { box-shadow: 0 0 0 3px rgba(201,162,39,.85), 0 16px 34px rgba(0,0,0,.6); } }

/* 图钉 */
.ev-card .pin {
  position: absolute;
  top: -9px; left: 50%;
  transform: translateX(-50%);
  width: 18px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #ff6b5a, #a01f14 62%, #5e0f08);
  box-shadow: 0 3px 6px rgba(0,0,0,.6), inset 0 -1px 2px rgba(0,0,0,.4);
}
.ev-card[data-kind="conclusion"] .pin { background: radial-gradient(circle at 32% 30%, #ffd98a, #c9a227 62%, #6d5510); }
.ev-card[data-kind="killer"] .pin { background: radial-gradient(circle at 32% 30%, #a8e6e0, #2f7f7a 62%, #16443f); }

.ev-card .kind {
  font-family: var(--f-type);
  font-size: .54rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #8a1f1f;
  display: block;
  margin-bottom: 6px;
}
.ev-card[data-kind="conclusion"] .kind { color: #8a6a12; }
.ev-card[data-kind="killer"] .kind { color: #1f6b66; }
.ev-card h5 { font-size: 1.02rem; line-height: 1.45; font-weight: 600; color: #221a0e; }
.ev-card small { display: block; margin-top: 6px; font-size: .74rem; line-height: 1.5; color: rgba(36,28,16,.62); font-family: var(--f-sans); }

.ev-card[data-kind="killer"] {
  width: 200px;
  background: linear-gradient(160deg, #17232a, #0e181d);
  color: var(--paper-100);
  box-shadow: 0 0 0 1px rgba(74,143,139,.5), 0 16px 36px rgba(0,0,0,.65);
}
.ev-card[data-kind="killer"] h5 { color: var(--paper-100); font-size: 1.14rem; }
.ev-card[data-kind="killer"] small { color: rgba(232,220,192,.5); }

/* 便签纸微旋 */
.ev-card:nth-child(3n)   { transform: rotate(-1.4deg); }
.ev-card:nth-child(3n+1) { transform: rotate(1.1deg); }
.ev-card:nth-child(4n)   { transform: rotate(-0.6deg); }

/* ---------- 工具条 ---------- */
.board-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--fog-18);
  border-bottom: none;
  background: rgba(0,0,0,.5);
}
.board-bar .sep { flex: 1; }
.link-count {
  font-family: var(--f-type);
  font-size: .72rem; letter-spacing: .14em;
  color: var(--fog-38); text-transform: uppercase;
}
.link-count b { color: var(--brass); }

.mode-tip {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--f-type); font-size: .68rem;
  letter-spacing: .1em; color: var(--blood-glow);
}
.mode-tip i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blood-glow); display: block;
  animation: blink 1.1s infinite;
}

/* ---------- 验证结果 ---------- */
.verify-panel {
  border: 1px solid var(--fog-18);
  border-top: none;
  background: rgba(0,0,0,.42);
  padding: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height .6s var(--ease);
}
.verify-panel.open { max-height: 1400px; }
.verify-inner { padding: clamp(24px, 4vw, 40px); }

.chain-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--fog-08);
  font-size: .92rem;
}
.chain-row:last-child { border-bottom: none; }
.chain-row .ck {
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 50%; display: grid; place-items: center;
  font-size: .68rem; border: 1px solid;
}
.chain-row.ok .ck  { color: var(--teal); border-color: var(--teal); }
.chain-row.no .ck  { color: var(--blood-glow); border-color: var(--blood); }
.chain-row.ok span { color: var(--fog-100); }
.chain-row.no span { color: var(--fog-38); }
.chain-row .arrow { color: var(--brass); font-family: var(--f-type); opacity: .7; }

@media (max-width: 900px) {
  .board-shell { max-height: 66vh; }
}
