.wf-tc { background: #121722; border: 1px solid #263044; border-radius: 12px; padding: 16px; }
.wf-tc-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid #222b3d; }
.wf-tc-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wf-tc-select, .wf-tc-input { background: #0b0e14; color: #efe7d6; border: 1px solid #263044; border-radius: 8px; padding: 8px 12px; font-size: 13px; min-height: 38px; }
.wf-tc-btn { background: #181f2e; color: #efe7d6; border: 1px solid #2c3852; border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 38px; }
.wf-tc-btn:hover { border-color: #d4a853; color: #ecc472; }
.wf-tc-btn.active { background: #d4a853; color: #0b0e14; border-color: #d4a853; }
.wf-build-pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(6, 78, 59, 0.45); border: 1px solid rgba(52, 211, 153, 0.45); color: #6ee7b7; font-family: monospace; }
.wf-tc-classes { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.wf-cls-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; border-radius: 8px; border: 1px solid #263044; background: #0e131d; color: #cbd5e1; font-size: 12px; font-weight: 600; cursor: pointer; }
.wf-cls-btn.active { background: #1c2436; color: #efe7d6; }
.wf-dot { width: 9px; height: 9px; border-radius: 999px; flex-shrink: 0; }
.wf-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #0e131d; border: 1px solid #222b3d; }
.wf-preset-label { font-size: 12px; font-weight: 700; color: #9ca7bc; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 4px; }
.wf-preset-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid #2c3852; background: #141a27; color: #efe7d6; font-size: 12px; font-weight: 600; cursor: pointer; }
.wf-preset-btn:hover { border-color: #d4a853; color: #ecc472; }
.wf-preset-tag { font-size: 10px; padding: 2px 5px; border-radius: 4px; background: rgba(212, 168, 83, 0.16); color: #ecc472; font-family: monospace; }
.wf-tc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 12px; border-radius: 10px; background: #0e131d; border: 1px solid #222b3d; }
.wf-trees { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.wf-tree { background: #0e131d; border: 1px solid #263044; border-radius: 10px; padding: 12px; }
.wf-tree-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid #222b3d; margin-bottom: 10px; }
.wf-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 7px; position: relative; }
.wf-edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.wf-cell-empty { min-height: 74px; }
.wf-node { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 6px 4px; border-radius: 8px; border: 1px solid #253046; background: #141a27; color: #cbd5e1; cursor: pointer; user-select: none; min-height: 78px; position: relative; z-index: 2; transition: border-color 0.12s, transform 0.08s; }
.wf-node:hover { border-color: #d4a853; }
.wf-node.locked { opacity: 0.52; background: #0b0e14; border-color: #1c2434; }
.wf-node.locked .wf-icon-img { filter: grayscale(1) brightness(0.65); }
.wf-node.has-pts { border-color: #34d399; background: rgba(6, 78, 59, 0.28); color: #efe7d6; }
.wf-node.maxed { border-color: #d4a853; background: rgba(120, 86, 24, 0.24); color: #efe7d6; }
.wf-icon-wrap { position: relative; width: 40px; height: 40px; border-radius: 6px; border: 2px solid #394661; background: #0b0e14; overflow: hidden; flex-shrink: 0; }
.wf-node.has-pts .wf-icon-wrap { border-color: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, 0.35); }
.wf-node.maxed .wf-icon-wrap { border-color: #ecc472; box-shadow: 0 0 10px rgba(212, 168, 83, 0.45); }
.wf-icon-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wf-icon-fb { display: none; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: #ecc472; background: #182032; }
.wf-rank-badge { position: absolute; right: 1px; bottom: 1px; background: rgba(8, 11, 17, 0.88); color: #cbd5e1; font-family: monospace; font-size: 10px; font-weight: 700; line-height: 1; padding: 2px 3px; border-radius: 3px; border: 1px solid #2a3449; }
.wf-node.has-pts .wf-rank-badge { color: #6ee7b7; border-color: #34d399; }
.wf-node.maxed .wf-rank-badge { color: #ecc472; border-color: #d4a853; }
.wf-node-name { font-size: 10px; font-weight: 600; line-height: 1.15; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wf-prereq-pill { font-size: 9px; line-height: 1.1; padding: 1px 4px; border-radius: 4px; background: rgba(248, 113, 113, 0.16); color: #fca5a5; border: 1px solid rgba(248, 113, 113, 0.35); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-prereq-pill.met { background: rgba(52, 211, 153, 0.14); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.35); }
.wf-legacy-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid #2c3852; background: #141a27; color: #cbd5e1; cursor: pointer; user-select: none; margin-bottom: 8px; }
.wf-legacy-row.has-pts { border-color: #34d399; background: rgba(6, 78, 59, 0.35); color: #efe7d6; }
.wf-insp-head { display: flex; align-items: center; gap: 10px; }
.wf-insp-icon { width: 42px; height: 42px; border-radius: 6px; border: 2px solid #d4a853; background: #0b0e14; flex-shrink: 0; object-fit: cover; }
.wf-insp-next { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #263044; font-size: 12px; color: #9ca7bc; }
.wf-tc-footer { display: grid; grid-template-columns: 1.1fr 1.2fr; gap: 16px; margin-top: 16px; }
.wf-box { background: #0e131d; border: 1px solid #263044; border-radius: 10px; padding: 14px; font-size: 13px; }
.wf-toast { display: inline-block; padding: 4px 10px; border-radius: 6px; background: rgba(6, 78, 59, 0.65); border: 1px solid #34d399; color: #a7f3d0; font-size: 12px; }
.wf-order-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.wf-order-item { display: flex; justify-content: space-between; padding: 6px 8px; border-radius: 6px; background: #141a27; border: 1px solid #222b3d; font-size: 12px; }
.wf-saved-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wf-saved-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: #141a27; border: 1px solid #263044; font-size: 12px; }
.wf-saved-chip button { background: none; border: none; color: #efe7d6; cursor: pointer; font-size: 12px; padding: 0; }
@media (max-width: 960px) {
  .wf-tc-classes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wf-trees, .wf-tc-footer { grid-template-columns: 1fr; }
  .wf-order-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.wf-float-tip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 312px;
  max-width: calc(100vw - 24px);
  pointer-events: none;
  background: rgba(9, 13, 22, 0.97);
  border: 1px solid #d4a853;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(236, 196, 114, 0.16);
  color: #e2e8f0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.08s ease;
}
.wf-float-tip.show { opacity: 1; visibility: visible; }
.wf-ft-head { display: flex; align-items: center; gap: 10px; }
.wf-ft-icon { width: 32px; height: 32px; border-radius: 6px; border: 1px solid rgba(236, 196, 114, 0.6); flex-shrink: 0; object-fit: cover; }
.wf-ft-title { color: #ffd100; font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.wf-ft-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 2px; }
.wf-ft-rank-zero { color: #94a3b8; }
.wf-ft-rank-part { color: #ecc472; font-weight: 600; }
.wf-ft-rank-max { color: #4ade80; font-weight: 600; }
.wf-ft-tree { color: #94a3b8; }
.wf-ft-req { font-size: 12px; margin-top: 6px; line-height: 1.35; }
.wf-ft-req.fail { color: #f87171; }
.wf-ft-req.ok { color: #6ee7b7; }
.wf-ft-desc { margin: 8px 0 0; font-size: 13px; color: #e2e8f0; }
.wf-ft-next { margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(148, 163, 184, 0.2); font-size: 12.5px; color: #cbd5e1; }
.wf-ft-foot { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(148, 163, 184, 0.14); font-size: 11px; color: #94a3b8; display: flex; justify-content: space-between; }
@media (hover: none), (max-width: 720px) { .wf-float-tip { display: none !important; } }

.wf-node.spot-hi { border-color: #38bdf8 !important; box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45), 0 0 14px rgba(56, 189, 248, 0.25); }
.wf-node.spot-dim { opacity: 0.34; }
.wf-spot-tag { font-size: 9px; font-weight: 700; line-height: 1; padding: 2px 4px; border-radius: 4px; background: rgba(56, 189, 248, 0.18); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.45); letter-spacing: 0.03em; }
.wf-tc-q { width: 230px; max-width: 100%; }
.wf-tree-0 { background: radial-gradient(280px 180px at 50% 0%, rgba(212, 168, 83, 0.11), transparent 72%), #0c111b; }
.wf-tree-1 { background: radial-gradient(280px 180px at 50% 0%, rgba(239, 68, 68, 0.10), transparent 72%), #0c111b; }
.wf-tree-2 { background: radial-gradient(280px 180px at 50% 0%, rgba(56, 189, 248, 0.11), transparent 72%), #0c111b; }
.wf-node.search-hit { border-color: #facc15 !important; box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.45), 0 0 14px rgba(250, 204, 21, 0.3); }
.wf-node.search-dim { opacity: 0.24; }
@media (max-width: 520px) {
  .wf-tc { padding: 10px; }
  .wf-tc-q { width: 100%; }
  .wf-tc-btn, .wf-tc-select, .wf-tc-input { padding: 7px 10px; font-size: 12px; min-height: 36px; }
  .wf-tc-classes { gap: 6px; }
  .wf-cls-btn { padding: 7px 4px; font-size: 11.5px; }
  .wf-tree { padding: 10px 8px; }
  .wf-grid4 { gap: 10px 4px; }
  .wf-node { min-height: 70px; padding: 5px 2px; }
  .wf-icon-wrap { width: 34px; height: 34px; }
  .wf-node-name { font-size: 9.5px; }
  .wf-tc-bar { padding: 10px; gap: 8px; }
}