.graph-workbench { border: 1px solid #3a4930; border-radius: 20px; background: #0d110d; overflow: hidden; margin-top: 32px; }
.graph-first-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 30px 0; }
.graph-first-steps > div { border-left: 2px solid #698159; padding-left: 20px; }
.graph-first-steps span { font: 12px var(--mono); color: var(--lime); }
.graph-first-steps h3 { font-size: 20px; margin: 12px 0; }
.graph-first-steps p { font-size: 13px; }
.graph-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 22px; border-bottom: 1px solid var(--line); background: #161d12; }
.graph-brand { font: 12px var(--mono); letter-spacing: .05em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.graph-brand .status-dot { margin: 0; }
.graph-query { display: flex; align-items: center; gap: 10px; }
.graph-query label { font-size: 12px; color: var(--muted); }
.graph-query input { width: 65px; border: 1px solid #4d5b42; border-radius: 8px; padding: 8px; background: #080c06; color: var(--text); font: 14px var(--mono); }
#graphError:not(:empty) { padding: 14px 22px; border-bottom: 1px solid #85574c; }
.graph-settings { display: flex; align-items: end; gap: 18px; flex-wrap: wrap; padding: 22px 22px 10px; }
.graph-settings label { display: flex; flex-direction: column; gap: 7px; font-size: 11px; color: var(--muted); }
.graph-settings .graph-check { flex-direction: row; align-items: center; padding-bottom: 9px; }
.graph-check input { accent-color: var(--lime); width: 16px; height: 16px; }
.graph-description { font: 11px/1.8 var(--mono); padding: 12px 22px 20px; min-height: 65px; }
.graph-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; border-top: 1px solid var(--line); }
.graph-canvas-panel { min-width: 0; position: relative; }
.graph-game-hud { padding: 18px; border-bottom: 1px solid #465e34; background: #1b2812; }
.graph-game-hud strong { display: block; color: var(--lime); font-size: 14px; }
.graph-game-hud p { margin-top: 10px; font-size: 13px; color: #d8e5d0; }
.graph-game-hud > div { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; font: 11px var(--mono); }
.graph-game-hud a { margin-left: auto; text-decoration: underline; color: var(--lime); }
.graph-view-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 12px; }
.graph-view-controls button { background: #192015; border: 1px solid #3d4a33; border-radius: 7px; min-width: 34px; min-height: 34px; padding: 5px 10px; font: 12px var(--mono); }
.graph-view-controls button:hover { background: #304123; }
#graphZoomLabel { font: 10px var(--mono); color: var(--muted); margin-left: auto; }
#graphCanvas { width: 100%; height: auto; display: block; background: radial-gradient(ellipse at center, #20341830, transparent 70%), #0a0e09; touch-action: none; cursor: grab; }
#graphCanvas.is-dragging { cursor: grabbing; }
.graph-edge { stroke: #506347; stroke-width: 1.3; opacity: .35; vector-effect: non-scaling-stroke; }
.graph-edge.is-connected { stroke: var(--cyan); opacity: .9; stroke-width: 2; }
.graph-edge.is-route { stroke: var(--purple); opacity: 1; stroke-width: 3; }
.graph-node { cursor: pointer; outline: none; }
.graph-node circle { fill: #1e2819; stroke: #698159; stroke-width: 1.5; }
.graph-node text { fill: #d6e0ce; font: 15px var(--mono); text-anchor: middle; pointer-events: none; }
.graph-node .node-type { font-size: 8px; fill: #a0ae96; }
.graph-node.is-prime circle { fill: #baff72; stroke: #d6ffb4; }
.graph-node.is-prime text { fill: #182c0b; }
.graph-node.is-unit circle { stroke: var(--purple); stroke-dasharray: 3 3; }
.graph-node.is-selected circle, .graph-node:focus circle { stroke: #fff; stroke-width: 4; }
.graph-node.is-goal circle { stroke: var(--purple); stroke-width: 4; }
.graph-node.is-collected circle { fill: #99e3e1; stroke: #e6ffff; }
.graph-node.is-collected text { fill: #102b28; }
.graph-node.is-dim { opacity: .25; }
.graph-canvas-footer { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; padding: 12px 18px; font: 9px/1.8 var(--mono); color: var(--muted); border-top: 1px solid var(--line); }
#graphHelp { padding: 0 18px 18px; }
.graph-inspector { border-left: 1px solid var(--line); padding: 24px 20px; min-width: 0; }
.graph-inspector h3 { color: var(--lime); margin-bottom: 18px; }
.graph-inspector h4 { margin-top: 28px; font-size: 13px; }
#graphNodeDetails { font-size: 12px; overflow-wrap: anywhere; }
#graphSelectionStatus { margin-top: 10px; }
.graph-connections { display: grid; gap: 7px; max-height: 255px; overflow-y: auto; margin: 16px 0 24px; }
.graph-connections button { background: #1b2517; border: 1px solid var(--line); color: var(--text); font: 11px/1.7 var(--mono); padding: 8px; border-radius: 7px; text-align: left; }
.graph-node-details { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.graph-node-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(45px, 1fr)); gap: 8px; }
.graph-node-list button { border: 1px solid #4a5b3b; border-radius: 8px; min-height: 44px; padding: 10px 5px; background: #1b2517; font: 12px var(--mono); }
.graph-node-list button[aria-pressed="true"] { border-color: white; color: var(--lime); }
.graph-arcade { margin-top: 24px; }
.graph-game-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin: 28px 0; }
.graph-game-cards > div { border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: #10160c; }
.graph-game-cards strong { color: var(--lime); font-size: 14px; }
.graph-game-cards p { margin-top: 12px; font-size: 12px; }
.graph-objective { color: var(--text); font-size: 16px; }
.graph-scoreboard { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.graph-scoreboard > span { padding: 12px 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 11px; }
.graph-scoreboard strong { display: block; font: 20px var(--mono); color: var(--lime); margin-top: 7px; }
#graphGameTrail { margin: 15px 0; max-height: 110px; overflow-y: auto; overflow-wrap: anywhere; }
.graph-arcade details { margin-top: 24px; }
@media (max-width: 1000px) { .graph-layout { grid-template-columns: 1fr; } .graph-inspector { border-left: 0; border-top: 1px solid var(--line); } .graph-connections { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
@media (max-width: 760px) { .graph-game-cards, .graph-first-steps { grid-template-columns: 1fr; } .graph-toolbar, .graph-settings { padding: 16px; } .graph-query { flex-wrap: wrap; } .graph-settings label { flex: 1 1 140px; } .graph-scoreboard > span { flex: 1 1 100px; } .graph-brand { font-size: 10px; } #graphCanvas { min-height: 300px; } }
@media (max-width: 760px) {
    .graph-node circle { r: 40px; }
    .graph-node text { font-size: 30px; }
    .graph-node .node-type { font-size: 14px; transform: translateY(6px); }
    #graphCanvas[data-dense="true"] .graph-node circle { r: 25px; }
    #graphCanvas[data-dense="true"] .graph-node text { font-size: 24px; }
    #graphCanvas[data-dense="true"] .graph-node .node-type { font-size: 11px; transform: translateY(3px); }
}
