/* legacy.css — 传承系统模拟器
   视觉沿用站点既有变量（styles.css 的 :root），保持与天赋页一致。 */

.lgc-intro { padding: 44px 0 26px; }
.lgc-intro h1 { margin: 0 0 12px; font: 500 clamp(1.75rem, 3.6vw, 2.5rem)/1.2 Cinzel, Georgia, serif; }
.lgc-intro h1 b { color: var(--gold); font-weight: 500; }
.lgc-intro p { max-width: 68ch; margin: 0; color: var(--muted); }
.lgc-intro .lgc-src { margin-top: 10px; font-size: .8125rem; }

/* ---- 工具条 ---- */
.lgc-bar {
  position: sticky; top: 0; z-index: 12;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 20px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 8px;
  background: rgba(16, 17, 17, .94); backdrop-filter: blur(6px);
}
.lgc-points { font: 600 1.0625rem/1.2 Cinzel, Georgia, serif; letter-spacing: .04em; }
.lgc-points b { color: var(--gold); font-size: 1.375rem; }
.lgc-points span { color: var(--muted); font-size: .875rem; font-family: "Segoe UI", sans-serif; }
.lgc-bar .lgc-spacer { flex: 1 1 auto; }
.lgc-btn {
  min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px;
  background: #1c1d1f; color: var(--text); font: inherit; font-size: .875rem; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.lgc-btn:hover, .lgc-btn:focus-visible { border-color: var(--gold); color: var(--gold); }
.lgc-hint { flex-basis: 100%; margin: 0; color: var(--muted); font-size: .8125rem; }
.lgc-hint kbd {
  padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px;
  background: #1c1d1f; color: var(--text); font: inherit; font-size: .75rem;
}

/* ---- 三系面板 ---- */
.lgc-trees { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding-bottom: 60px; }
@media (max-width: 1120px) { .lgc-trees { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 780px) { .lgc-trees { grid-template-columns: minmax(0, 1fr); } }

.lgc-tree { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; }
.lgc-tree-head { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.lgc-tree-head img { width: 46px; height: 46px; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.lgc-tree-head h2 { margin: 0; font: 500 1.0625rem/1.3 Cinzel, Georgia, serif; letter-spacing: .03em; }
.lgc-tree-head p { margin: 2px 0 0; color: var(--muted); font-size: .8125rem; }
.lgc-tree-spent { margin-left: auto; text-align: right; flex: none; }
.lgc-tree-spent b { display: block; color: var(--gold); font-size: 1.125rem; font-weight: 600; }
.lgc-tree-spent small { color: var(--muted); font-size: .6875rem; letter-spacing: .04em; }

.lgc-gridwrap { display: flex; justify-content: center; padding: 16px 8px 20px; }
.lgc-grid { position: relative; width: 368px; height: 368px; }
@media (max-width: 420px) {
  .lgc-gridwrap { padding: 12px 0 16px; }
  .lgc-grid { transform: scale(.82); transform-origin: top center; margin-bottom: -66px; }
}

.lgc-wires { position: absolute; inset: 0; width: 368px; height: 368px; pointer-events: none; }
.lgc-wires line { stroke: #3a3b38; stroke-width: 3; }
.lgc-wires line.on { stroke: var(--gold); }

/* ---- 节点 ---- */
.lgc-node {
  position: absolute; width: 64px; height: 64px; padding: 0; border-radius: 6px;
  border: 2px solid #3a3b38; background: #0c0d0d; cursor: pointer;
  background-size: cover; background-position: center;
  transition: border-color .13s, box-shadow .13s, filter .13s;
  -webkit-tap-highlight-color: transparent;
}
.lgc-node:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.lgc-node.is-locked { filter: grayscale(1) brightness(.55); cursor: not-allowed; border-style: dashed; }
.lgc-node.is-blocked { filter: grayscale(.85) brightness(.72); }
.lgc-node.is-open { border-color: #6b6a63; }
.lgc-node.is-open:hover { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.lgc-node.is-active { border-color: var(--gold); }
.lgc-node.is-maxed { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 14px rgba(213, 181, 118, .45); }

.lgc-pip {
  position: absolute; left: -2px; bottom: -2px; padding: 1px 5px;
  border: 1px solid var(--line); border-radius: 4px;
  background: rgba(0, 0, 0, .82); color: var(--muted);
  font: 600 .625rem/1.5 "Segoe UI", sans-serif; font-variant-numeric: tabular-nums;
}
.lgc-node.is-active .lgc-pip, .lgc-node.is-maxed .lgc-pip { color: var(--gold); border-color: #55492e; }
.lgc-lock {
  position: absolute; right: -6px; top: -8px; padding: 1px 5px; border-radius: 4px;
  background: #2a2118; border: 1px solid #55492e; color: var(--gold);
  font: 600 .5625rem/1.5 "Segoe UI", sans-serif; white-space: nowrap;
}

/* ---- 提示气泡 ---- */
.lgc-tip {
  position: fixed; z-index: 40; width: min(310px, calc(100vw - 24px));
  padding: 12px 14px; border: 1px solid var(--gold); border-radius: 8px;
  background: #141517; color: var(--text); box-shadow: 0 18px 48px rgba(0, 0, 0, .65);
  pointer-events: none; opacity: 0; transition: opacity .12s;
}
.lgc-tip.show { opacity: 1; }
.lgc-tip h3 { margin: 0 0 4px; color: #f1d7a0; font-size: .9375rem; }
.lgc-tip .lgc-tip-req { margin: 0 0 8px; color: var(--muted); font-size: .75rem; }
.lgc-tip .lgc-tip-req em { color: #e0a14a; font-style: normal; }
.lgc-tip .lgc-tip-cur { margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.lgc-tip .lgc-tip-next { margin: 0; color: var(--muted); }
.lgc-tip b { color: var(--gold); }
.lgc-tip .lgc-tip-foot { margin: 8px 0 0; color: var(--muted); font-size: .6875rem; letter-spacing: .04em; }

/* ---- 图例 ---- */
.lgc-legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 26px; padding: 0; list-style: none; color: var(--muted); font-size: .8125rem; }
.lgc-legend li { display: flex; align-items: center; gap: 7px; }
.lgc-legend i { width: 14px; height: 14px; border: 2px solid #3a3b38; border-radius: 3px; background: #0c0d0d; flex: none; }
.lgc-legend .k-open i { border-color: #6b6a63; }
.lgc-legend .k-active i { border-color: var(--gold); }
.lgc-legend .k-maxed i { border-color: var(--gold); box-shadow: 0 0 8px rgba(213, 181, 118, .5); }
.lgc-legend .k-locked i { filter: grayscale(1) brightness(.55); border-style: dashed; }

/* ---- 常见问题（同时用于 FAQPage 结构化数据，正文必须可见）---- */
.lgc-faq { max-width: 76ch; margin: 0 0 72px; padding-top: 34px; border-top: 1px solid var(--line); }
.lgc-faq h2 { margin: 0 0 18px; font: 500 1.375rem/1.3 Cinzel, Georgia, serif; color: var(--gold); }
.lgc-faq h3 { margin: 22px 0 6px; font-size: 1rem; color: var(--text); }
.lgc-faq h3::before { content: "Q "; color: var(--gold); font-weight: 700; }
.lgc-faq p { margin: 0; color: var(--muted); }
.lgc-faq b { color: var(--text); font-weight: 600; }

/* ---- 分享面板（与天赋模拟器一致）---- */
.lgc-share-btn::before { content: "🔗"; margin-right: 6px; }
.lgc-share-dialog {
  width: min(96vw, 1060px); max-height: 94vh; padding: 0;
  border: 1px solid var(--gold, #d6b779); border-radius: 6px;
  background: #191a1b; color: var(--text, #e7e2d8);
}
.lgc-share-dialog::backdrop { background: rgba(0, 0, 0, .78); }
.lgc-share-inner { display: flex; flex-direction: column; gap: 11px; padding: 16px; max-height: 94vh; overflow: auto; }
.lgc-share-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 0; }
.lgc-share-head h2 { margin: 0; font: 500 1.0625rem/1.3 Cinzel, Georgia, serif; color: var(--gold-light, #f1d7a0); }
.lgc-share-head button {
  padding: 6px 12px; border: 1px solid var(--line, #36312a); border-radius: 3px;
  background: #232322; color: var(--text, #e7e2d8); cursor: pointer; font: inherit; font-size: .75rem;
}
.lgc-share-image { width: 100%; height: auto; border-radius: 4px; background: #101113; display: block; }
.lgc-share-hint, .lgc-share-status { margin: 0; font-size: .75rem; color: var(--muted, #9d9c97); text-align: center; }
.lgc-share-status { color: var(--gold-light, #f1d7a0); min-height: 17px; }
.lgc-share-actions { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; }

.lgc-toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  padding: 10px 18px; border: 1px solid var(--gold); border-radius: 999px;
  background: #141517; color: #f1d7a0; font-size: .875rem; z-index: 50;
  opacity: 0; transition: opacity .18s;
}
.lgc-toast.show { opacity: 1; }
