:root { color-scheme: dark; font-family: system-ui,"PingFang SC","Microsoft YaHei",sans-serif; background:#0b0e13; color:#e4e9f1; --line:#28313e; --muted:#a6b0c1; --teal:#7de0ce; --gold:#efbe86; --lav:#a9a0ff; }
* { box-sizing:border-box; } body { margin:0; min-height:100vh; display:flex; flex-direction:column; } button,select,input { font:inherit; } button,a,input,select { -webkit-tap-highlight-color:transparent; } button,select,a { touch-action:manipulation; } button { cursor:pointer; color:inherit; } a { color:var(--teal); } :focus-visible { outline:2px solid var(--teal); outline-offset:3px; } .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.top { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1rem clamp(.8rem,3vw,2.1rem); min-height:81px; border-bottom:1px solid var(--line); background:#10151d; }
.identity { display:flex; align-items:center; gap:.9rem; min-width:0; }.brand-mark { flex:none; width:42px; height:42px; border-radius:12px; color:var(--teal); background:#1b3338; border:1px solid #30555b; display:grid;place-items:center; font-size:19px; }.identity h1 { margin:0; font-size:clamp(1.15rem,2.4vw,1.55rem); letter-spacing:-.025em; }.identity p { margin:.22rem 0 0; color:var(--muted); font-size:.84rem; }.identity p span:not(:empty)::before { content:' · '; }.export { white-space:nowrap; padding:.62rem .85rem; text-decoration:none; border:1px solid #3c595b; border-radius:8px; background:#172a2d; font-size:.9rem; }
.workspace { display:grid; grid-template-columns:minmax(0,1fr) clamp(315px,30vw,420px); flex:1; min-height:0; height:calc(100dvh - 81px); }.board { min-width:0; min-height:0; display:flex; flex-direction:column; position:relative; border-right:1px solid var(--line); }.toolbar { display:flex; align-items:center; justify-content:space-between; gap:.7rem; flex-wrap:wrap; padding:.72rem 1rem; background:#131923; border-bottom:1px solid var(--line); position:relative; z-index:2; }.toolbar-main { display:flex; align-items:center; gap:.65rem; flex-wrap:wrap; }.select-wrap { position:relative; }.select-wrap::after { content:''; pointer-events:none; position:absolute; right:.7rem; top:41%; width:.38rem;height:.38rem;border:solid #a6b0c1;border-width:0 1px 1px 0;transform:rotate(45deg); } select,input,.segments { border:1px solid #364154; border-radius:8px; background:#171e29; color:#e4e9f1; height:38px; } select { appearance:none; padding:0 1.65rem 0 .65rem; min-width:88px; }.segments { display:flex; padding:2px; }.segments button,.tabs button { background:transparent; border:0; padding:0 .66rem; color:#aeb8ca; font-size:.86rem; border-radius:5px; }.segments button[aria-pressed=true] { color:#e8fdfa; background:#2a4750; }.graph-count { font-size:.82rem; color:var(--muted); white-space:nowrap; }.search-shell { position:relative; flex:1 0 155px; max-width:295px; } input { width:100%; min-width:0; padding:0 .7rem; font-size:.87rem; } .results { position:absolute; z-index:3; top:calc(100% + 6px); left:0; right:0; max-height:330px; overflow:auto; background:#171e29; border:1px solid #3b485b; border-radius:8px; box-shadow:0 18px 34px #05070ab5; padding:5px; }.results[hidden] { display:none; }.results button { display:block; width:100%; padding:.6rem; text-align:left; background:transparent; border:0; border-radius:5px; }.results button:hover,.results button:focus-visible { background:#273448; }.results small { display:block; color:var(--muted); margin-top:.16rem; }
.viewport { position:relative; flex:1; min-height:300px; overflow:hidden; background-color:#101620; background-image:radial-gradient(circle,#334055 1px,transparent 1.2px); background-size:23px 23px; cursor:grab; touch-action:none; }.viewport.dragging { cursor:grabbing; }.viewport canvas,.plane { position:absolute; inset:0; pointer-events:none; }.plane { width:1px;height:1px; transform-origin:0 0; }.node { position:absolute; display:grid; align-content:center; text-align:left; pointer-events:auto; background:#1c2633; color:#f0f3f8; border:1px solid #3b4a60; border-left:4px solid #70829b; border-radius:9px; width:186px; height:72px; padding:.48rem .68rem; box-shadow:0 5px 15px #080c1466; user-select:none; overflow:hidden; }.node.visual { border-left-color:var(--teal); }.node.menu,.node.screen,.node.option { border-left-color:var(--gold); }.node.terminal { border-left-color:var(--lav); }.node.review { border-left-color:#ed8e9b; }.node.ghost { opacity:.78; border-style:dashed; }.node.active { background:#223b44; border-color:var(--teal); box-shadow:0 0 0 2px #7de0ce4a,0 6px 24px #080c1477; }.node:hover { background:#29384b; }.node-code { display:block; color:#b9c9de; font-size:.71rem; white-space:nowrap; letter-spacing:.03em; overflow:hidden; text-overflow:ellipsis; }.node-name { display:block; margin-top:.25rem; font-weight:650; font-size:.92rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }.board-status { position:absolute; top:1rem; left:1rem; padding:.55rem .7rem; border-radius:7px; color:var(--muted); background:#131a23; pointer-events:none; }.board-status:empty { display:none; }.zoom-tools { display:flex; align-items:center; position:absolute; bottom:1rem; right:1rem; z-index:1; border:1px solid #3a485a; background:#19222e; border-radius:9px; overflow:hidden; box-shadow:0 10px 24px #05070a70; }.zoom-tools button { padding:.48rem .68rem; background:transparent; border:0; }.zoom-tools button:hover { background:#2c3d53; }.zoom-tools button:last-child { border-left:1px solid #3a485a; font-size:.82rem; }.zoom-tools output { min-width:44px; text-align:center; font-size:.82rem; color:#b9c9de; }.legend { padding:.68rem 1rem; display:flex; flex-wrap:wrap; gap:.5rem 1rem; border-top:1px solid var(--line); background:#131923; font-size:.8rem; color:#b0bbcc; }.legend span { display:inline-flex; gap:.36rem; align-items:center; }.swatch { display:inline-block; width:8px;height:8px;border-radius:2px; }.swatch.visual { background:var(--teal); }.swatch.choice { background:var(--gold); }.swatch.exit { background:var(--lav); }.stroke { width:16px; height:0; border-top:2px solid #8e9db5; }.stroke.dashed { border-top-style:dashed; }
.inspector { display:flex; flex-direction:column; min-height:0; min-width:0; background:#131923; }.inspector-head { min-height:112px; padding:1rem 1rem .7rem; }.eyebrow { color:var(--teal); font-size:.78rem; letter-spacing:.05em; }.inspector h2 { font-size:1.13rem; margin:.42rem 0 .2rem; overflow-wrap:anywhere; }.source-line { color:var(--muted); font-family:ui-monospace,monospace; font-size:.76rem; overflow-wrap:anywhere; line-height:1.55; }.chips { margin-top:.55rem; display:flex; gap:.35rem; flex-wrap:wrap; }.chip { font-size:.74rem; border:1px solid #394658; background:#1c2837; color:#beccdf; padding:.2rem .42rem; border-radius:5px; }.tabs { display:flex; overflow:auto; gap:.24rem; border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:.3rem .6rem; flex:none; }.tabs button { white-space:nowrap; padding:.45rem .48rem; }.tabs button[aria-selected=true] { background:#253949; color:#f4fffe; }.detail { flex:1; min-height:0; overflow:auto; padding:.78rem 1rem 1.4rem; overflow-wrap:anywhere; }.detail h3 { font-size:.95rem; margin:1.1rem 0 .5rem; }.detail h3:first-child { margin-top:.1rem; }.detail p { color:var(--muted); font-size:.84rem; line-height:1.55; }.entry { border:1px solid #2e3949; border-radius:8px; background:#171f2b; padding:.6rem .7rem; margin:.45rem 0; }.entry strong { display:block; font-size:.89rem; line-height:1.4; }.entry small { display:block; color:#aab8ca; margin:.28rem 0; line-height:1.45; }.entry a { font-size:.82rem; display:inline-block; margin:.3rem .6rem .15rem 0; }.link-button,.more { display:inline-block; text-align:left; background:#21333e; color:#b4f1e7; border:1px solid #3e5863; border-radius:6px; padding:.34rem .5rem; margin:.3rem .33rem .15rem 0; font-size:.81rem; max-width:100%; overflow-wrap:anywhere; }.link-button:hover,.more:hover { background:#2a4c55; }.empty { margin:.5rem 0; }.detail-selector { height:34px; margin:.25rem 0 .5rem; }
@media (max-width:1000px) { .graph-count { display:none; }.toolbar { padding:.55rem .65rem; }.search-shell { max-width:none; }.toolbar-main { gap:.4rem; } }
@media (max-width:730px) { .workspace { grid-template-columns:minmax(0,1fr); height:auto; }.board { height:63dvh; min-height:430px; border-right:0; }.inspector { min-height:350px; border-top:1px solid var(--line); }.detail { max-height:62dvh; }.top { min-height:70px; padding:.7rem; }.toolbar { gap:.45rem; }.legend { padding:.5rem .65rem; }.zoom-tools { right:.55rem;bottom:.55rem; }.toolbar-main { flex:0 1 auto; } }
@media (min-width:731px) { body { height:100dvh; overflow:hidden; } .top { flex:none; } .workspace { grid-template-rows:minmax(0,1fr); height:auto; } }
.node { cursor:grab; touch-action:none; }
.node.moving { z-index:2; cursor:grabbing; box-shadow:0 10px 24px #080c14a0,0 0 0 2px #7de0ce66; }
.entry p.dialogue-line { margin:.42rem 0; color:#f0f3f8; font-size:.93rem; line-height:1.55; white-space:pre-wrap; }
.dialogue-meta { color:var(--muted); font-size:.78rem; margin-top:.4rem; }
.dialogue-meta summary { cursor:pointer; }
.node-caption { display:flex; align-items:center; justify-content:space-between; gap:.3rem; min-width:0; }
.ending-badge { flex:none; display:inline-block; padding:.12rem .34rem; border-radius:4px; background:#633b8d; color:#fff1ff; font-size:.72rem; font-weight:700; line-height:1.28; }
.node.ending { color:#fff1ff; background:#392754; border-color:#926bc5; border-left-color:#e6b5ff; }
.node.ending .node-code { color:#e4cff9; }
.node.ending:hover { background:#4a316b; }
.node.ending.active { background:#493064; border-color:#e1adff; box-shadow:0 0 0 2px #d598ff62,0 6px 24px #080c1477; }
.swatch.exit { background:#d598ff; }
