:root { color-scheme: dark; --bg:#0f1117; --panel:#171a22; --card:#20252e; --line:#2c323d; --text:#e8eaf0; --muted:#9aa3b2; --accent:#f0883e; --m:#4f8ef7; --f:#e86a9a; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 17px/1.4 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; }
header { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
header h1 { font-size: 20px; margin: 0; position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none; }
#fnav { font-size: 16px; color: #8b90a0; white-space: nowrap; }
#fnav a, #panel .full { color: #4f8ef7; text-decoration: none; }
#fnav a:hover, #panel .full:hover { text-decoration: underline; }
#panel .full { display: inline-block; margin: 4px 0 8px; }
header button { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 8px; font-size: 20px; width: 42px; height: 38px; cursor: pointer; }
#search { margin-left: auto; width: min(320px, 28vw); padding: 9px 12px; font-size: 17px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 8px; }
#wrap { display: flex; height: calc(100% - 59px); }
#stage { flex: 1; overflow: auto; position: relative; }
#canvas { position: relative; transform-origin: 0 0; margin: 24px auto; }
#lines { position: absolute; left: 0; top: 0; overflow: visible; }
#lines path { fill: none; stroke: #4a5260; stroke-width: 2; }
.card { position: absolute; width: 210px; min-height: 72px; padding: 8px 10px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--muted); border-radius: 8px; cursor: pointer; }
.card:hover { border-color: var(--accent); }
.card.M { border-left-color: var(--m); }
.card.F { border-left-color: var(--f); }
.card.focus { border: 2px solid var(--accent); border-left-width: 5px; box-shadow: 0 0 0 4px rgba(240,136,62,0.18); }
.card.empty { background: transparent; border-style: dashed; color: var(--muted); cursor: default; }
.card.private { color: var(--muted); cursor: default; }
.card .nm { font-weight: 700; font-size: 18px; line-height: 1.25; }
.card .yr { color: var(--muted); font-size: 15px; margin-top: 3px; }
.card .more { position: absolute; top: -9px; right: 8px; font-size: 12px; background: var(--accent); color: #fff; border-radius: 9px; padding: 0 6px; }
#panel { width: 320px; overflow-y: auto; padding: 18px; background: var(--panel); border-left: 1px solid var(--line); }
#panel h2 { font-size: 22px; margin: 0 0 4px; }
#panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 18px 0 6px; }
#panel dl { display: grid; grid-template-columns: 70px 1fr; gap: 4px 10px; margin: 10px 0; }
#panel dt { color: var(--muted); }
#panel dd { margin: 0; }
#panel ul { list-style: none; margin: 0; padding: 0; }
#panel li { padding: 3px 0; }
#panel a { color: var(--accent); text-decoration: none; cursor: pointer; }
#panel .yrs { color: var(--muted); font-size: 14px; margin-left: 6px; }
.label { position: absolute; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
@media (max-width: 800px) { #panel { display: none; } header h1 { display: none; } }
