/* SKYLINE — Maker (§15), UI themes, VN script node editor. */
/* ================================================================ Maker (§15) */
#maker { position: fixed; inset: 44px 0 0 0; z-index: 45; background: var(--bg); display: grid; grid-template-rows: auto auto 1fr; }
.mk-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--hdr); font-family: var(--head); }
.mk-head > b { color: var(--accent); letter-spacing: .2em; }
.mk-tools { margin-left: auto; display: flex; gap: 6px; } .mk-tools input { width: 240px; }
#mk-tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); }
#mk-tabs button { border: 0; border-radius: 0; background: transparent; padding: 8px 14px; font-family: var(--head); }
#mk-tabs button.on { box-shadow: inset 0 -2px var(--accent); color: var(--accent); }
.mk-main { display: grid; grid-template-columns: 1fr 360px; min-height: 0; }
#mk-body { overflow: auto; padding: 14px 18px 60px; }
#mk-report { overflow: auto; padding: 12px; border-left: 1px solid var(--line); background: var(--panel); }
#mk-report .err, .mk-card .err { white-space: pre-wrap; }
.mk-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .mk-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.mk-terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; }
.mk-rg { margin-bottom: 14px; } .mk-rule { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; color: var(--text); }
.mk-rule input, .mk-rule select { width: 90px; flex: 0 0 auto; }
.mk-t { border-collapse: collapse; width: 100%; } .mk-t th, .mk-t td { border-bottom: 1px solid var(--line); padding: 4px; text-align: left; font-size: 12px; }
.mk-t tr.bad td { background: rgba(255,90,90,.08); }
.mk-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 8px 0; background: var(--panel); }
.mk-card label { margin: 4px 0; }
@media (max-width: 900px) { .mk-main { grid-template-columns: 1fr; } #mk-report { border-left: 0; border-top: 1px solid var(--line); } .mk-tools input { width: 120px; } }

/* ================================================================ Maker UI themes (MKR-07): skins + layouts */
body[data-skin="solid"] #dialogue { background: var(--panel); border-radius: 2px; border-width: 2px; box-shadow: none; }
body[data-skin="classic"] #dialogue { left: 0; right: 0; bottom: 0; border-radius: 0; border-width: 2px 0 0; height: 27%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 80%, transparent), var(--panel)); }
body[data-skin="classic"] #dl-name { left: 24px; border-radius: 0 0 6px 6px; top: -2px; transform: translateY(-100%); border-radius: 6px 6px 0 0; }
body[data-skin="minimal"] #dialogue { background: linear-gradient(180deg, transparent, rgba(0,0,0,.55)); border: 0; box-shadow: none; color: #fff; }
body[data-skin="minimal"] #dl-text { text-shadow: 0 2px 6px #000; }
body[data-skin="minimal"] #dl-name { background: transparent; border: 0; color: #fff !important; text-shadow: 0 2px 6px #000; }
@media (min-width: 901px) {
  body[data-layout="wide"] main { grid-template-columns: 200px 1fr 320px; }
  body[data-layout="cinema"] main { grid-template-columns: 0 1fr 340px; }
  body[data-layout="cinema"] #status { display: none; }
}
#stage.combat #dialogue { left: 3%; right: 3%; }
.mk-colors { display: flex; flex-wrap: wrap; gap: 6px 14px; } .mk-colors label { display: flex; align-items: center; gap: 6px; margin: 2px 0; color: var(--text); }

/* ================================================================ VN script node editor (VND-14) */
.nd-bar, .nd-add { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.nd-add button { border-left-width: 4px; }
.nd-wrap { overflow: auto; height: calc(100vh - 230px); border: 1px solid var(--line); border-radius: 8px;
  background: radial-gradient(circle, var(--line) 1px, transparent 1px) 0 0 / 22px 22px; }
.nd-canvas { position: relative; width: 2600px; height: 1800px; }
.nd-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; color: var(--accent); }
.nd-wires path { fill: none; stroke: currentColor; stroke-width: 2; opacity: .8; }
.nd-node { position: absolute; width: 230px; background: var(--panel); border: 2px solid; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.35); font-size: 12px; }
.nd-node.start { box-shadow: 0 0 0 3px var(--accent), 0 6px 18px rgba(0,0,0,.35); }
.nd-h { display: flex; align-items: center; gap: 6px; padding: 3px 8px; color: #0b0f16; cursor: grab; position: relative; border-radius: 5px 5px 0 0; user-select: none; }
.nd-h small { opacity: .7; } .nd-tools { margin-left: auto; font-size: 11px; } .nd-tools a { cursor: pointer; margin-left: 6px; text-decoration: underline; }
.nd-b { padding: 6px 8px 8px; position: relative; } .nd-b label { margin: 3px 0; font-size: 11px; } .nd-b input, .nd-b select, .nd-b textarea { font-size: 12px; padding: 3px 6px; }
.nd-in { position: absolute; left: -8px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--muted); }
.nd-out { display: inline-block; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 2px solid var(--panel); cursor: crosshair; flex: 0 0 auto; }
.nd-next { position: absolute; right: -8px; bottom: 8px; }
.nd-opt { display: flex; align-items: center; gap: 6px; margin: 3px 0; justify-content: space-between; }
.nd-wiring .nd-node { cursor: copy; } .nd-wiring .nd-node:hover { outline: 2px dashed var(--accent); }
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }

/* NG: ComfyUI-style node graph (VN scripts, Skill nodes) */
.ng-root { position: relative; overflow: hidden; background-color: #16181d; outline: none; user-select: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.09) 1px, transparent 1.2px); background-size: 24px 24px; cursor: grab; }
.ng-root:active { cursor: grabbing; }
.ng-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.ng-wires, .ng-live { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.ng-wires path, .ng-live path { fill: none; stroke-width: 2.4; opacity: .85; pointer-events: stroke; cursor: pointer; }
.ng-wires path.hot { stroke-width: 3.6; opacity: 1; filter: drop-shadow(0 0 3px currentColor); }
.ng-live { width: 100%; height: 100%; } .ng-live path { stroke-dasharray: 6 4; }
.ng-node { position: absolute; background: #2b2d33; border: 1px solid #3c3f47; border-radius: 9px; box-shadow: 0 4px 14px rgba(0,0,0,.45);
  font-size: 12px; color: #dfe3ea; cursor: default; }
.ng-node.sel { border-color: #f5f7fa; box-shadow: 0 0 0 2px rgba(255,255,255,.35), 0 6px 20px rgba(0,0,0,.6); }
.ng-node.run { box-shadow: 0 0 0 3px #66bb6a, 0 0 18px #66bb6a; } .ng-node.err { box-shadow: 0 0 0 3px #ef5350, 0 0 18px #ef5350; }
.ng-title { padding: 6px 10px; border-radius: 8px 8px 0 0; background: linear-gradient(90deg, var(--nc), color-mix(in srgb, var(--nc) 45%, #2b2d33));
  color: #101318; font-weight: 700; cursor: move; display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.ng-node.col .ng-title { border-radius: 8px; }
.ng-title small { font-weight: 500; opacity: .75; overflow: hidden; text-overflow: ellipsis; }
.ng-fold { font-style: normal; cursor: pointer; width: 12px; }
.ng-badge { margin-left: auto; background: rgba(0,0,0,.55); color: #b9f6ca; border-radius: 8px; padding: 0 6px; font-weight: 600; font-size: 11px; }
.ng-body { padding: 6px 0 8px; display: flex; flex-direction: column; gap: 4px; }
.ng-row { display: flex; justify-content: space-between; min-height: 18px; align-items: center; }
.ng-in, .ng-out { display: flex; align-items: center; gap: 6px; color: #aab1bd; font-size: 11px; }
.ng-in { margin-left: -6px; } .ng-out { margin-right: -6px; }
.ng-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--c); border: 2px solid #1b1d22; cursor: crosshair; flex: none; box-shadow: 0 0 0 1px var(--c); }
.ng-dot:hover { transform: scale(1.35); }
.ng-w { display: flex; flex-direction: column; gap: 2px; margin: 0 10px; }
.ng-w input, .ng-w select, .ng-w textarea, .ng-custom input, .ng-custom select { background: #1d1f24; border: 1px solid #40444d; color: #e8ecf2; border-radius: 6px; padding: 3px 6px; font-size: 12px; width: 100%; min-width: 0; }
.ng-w.num input { width: 100%; } .ng-w.tog { flex-direction: row; align-items: center; gap: 6px; }
.ng-wl { color: #8f97a3; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.ng-custom { margin: 0 10px; display: flex; flex-direction: column; gap: 3px; } .ng-custom .row { display: flex; gap: 4px; }
.ng-prev { margin: 4px 10px 0; padding: 6px; background: #1d1f24; border-radius: 6px; color: #b9f6ca; font-size: 11px; white-space: pre-wrap; }
.ng-group { position: absolute; border: 1px solid var(--gc); background: color-mix(in srgb, var(--gc) 12%, transparent); border-radius: 8px; }
.ng-gt { background: color-mix(in srgb, var(--gc) 55%, #222); color: #fff; padding: 4px 10px; font-weight: 700; border-radius: 7px 7px 0 0; cursor: move; }
.ng-gr { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, var(--gc) 50%); }
.ng-box { position: absolute; border: 1px dashed #fff; background: rgba(255,255,255,.06); pointer-events: none; }
.ng-hud { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 4px; align-items: center; z-index: 3; }
.ng-hud button { background: #2b2d33; border: 1px solid #40444d; color: #dfe3ea; padding: 2px 8px; font-size: 12px; }
.ng-hud span { font-size: 11px; color: #8f97a3; } .ng-tip { margin-left: 8px; }
.ng-menu { position: fixed; z-index: 400; background: #24262c; border: 1px solid #40444d; border-radius: 8px; padding: 4px 0; min-width: 170px; box-shadow: 0 8px 30px rgba(0,0,0,.6); font-size: 13px; color: #dfe3ea; }
.ng-menu hr { border: 0; border-top: 1px solid #3a3d45; margin: 4px 0; }
.ng-mi { padding: 5px 14px; cursor: pointer; position: relative; white-space: nowrap; } .ng-mi:hover { background: #3a5a9e; }
.ng-mi.sub::after { content: "▸"; position: absolute; right: 8px; }
.ng-subm { display: none; position: absolute; left: 100%; top: -4px; } .ng-mi.sub:hover > .ng-subm { display: block; }
.ng-search { position: fixed; z-index: 400; width: 290px; background: #24262c; border: 1px solid #5c7cfa; border-radius: 10px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.ng-search input { width: 100%; background: #1a1c21; border: 1px solid #40444d; color: #fff; padding: 6px 8px; border-radius: 6px; }
.ng-res { max-height: 300px; overflow: auto; margin-top: 4px; }
.ng-ri { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; cursor: pointer; color: #dfe3ea; font-size: 13px; }
.ng-ri.on, .ng-ri:hover { background: #3a5a9e; } .ng-ri i { width: 8px; height: 8px; border-radius: 50%; } .ng-ri small { margin-left: auto; color: #8f97a3; }
/* VN script editor + preview */
.vs-wrap { display: grid; grid-template-columns: 1fr 380px; gap: 10px; height: calc(100vh - 210px); min-height: 460px; }
.vs-graph { border: 1px solid var(--line); border-radius: 10px; height: 100%; }
.vs-prev { display: flex; flex-direction: column; gap: 6px; } .vs-head { display: flex; gap: 6px; align-items: center; } .vs-head b { margin-right: auto; letter-spacing: .1em; }
.vp-stage { position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background-size: cover !important; border: 1px solid var(--line); }
.vp-tint { position: absolute; inset: 0; pointer-events: none; }
.vp-loc { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 2px 8px; border-left: 2px solid var(--accent); }
.vp-spr { position: absolute; bottom: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; cursor: ew-resize; opacity: .8; }
.vp-spr.act { opacity: 1; filter: drop-shadow(0 0 6px rgba(255,255,255,.5)); }
.vp-spr img { height: 150px; max-width: 120px; object-fit: contain; object-position: bottom; pointer-events: none; }
.vp-spr small { position: absolute; bottom: 2px; background: rgba(0,0,0,.6); padding: 0 4px; font-size: 10px; color: #fff; }
.vp-sil { display: block; width: 46px; height: 120px; border-radius: 23px 23px 4px 4px; opacity: .85; }
.vp-box { position: absolute; left: 6%; right: 6%; bottom: 6px; background: rgba(8,12,20,.82); border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: 4px 8px; font-size: 12px; color: #fff; }
.vp-box b { color: var(--accent); font-size: 11px; } .vp-box p { margin: 2px 0 0; }
.vp-choice { position: absolute; inset: 20% 15% auto; display: flex; flex-direction: column; gap: 4px; background: rgba(8,12,20,.85); padding: 8px; border-radius: 6px; font-size: 12px; }
.vp-warn { position: absolute; top: 6px; right: 6px; background: #b71c1c; color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 4px; }
.ngc-ex { display: flex; flex-wrap: wrap; gap: 3px; } .ngc-ex button { width: 46px; padding: 1px; display: flex; flex-direction: column; align-items: center; background: #1d1f24; border: 1px solid #40444d; }
.ngc-ex button.on { border-color: #4fc3f7; } .ngc-ex img { width: 40px; height: 40px; object-fit: cover; object-position: top; } .ngc-ex small { font-size: 9px; overflow: hidden; max-width: 42px; }
.ngc-bg { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; } .ngc-bg button { height: 22px; border: 1px solid #40444d; padding: 0; } .ngc-bg button.on { outline: 2px solid #81c784; }
.ngc-bgp { height: 54px; border-radius: 4px; background-size: cover !important; }
.ngc-pos { position: relative; height: 70px; border-radius: 6px; background-size: cover !important; cursor: ew-resize; overflow: hidden; border: 1px solid #40444d; }
.ngc-pos .me { position: absolute; bottom: 0; transform: translateX(-50%); color: #f06292; font-size: 22px; pointer-events: none; }
.ngc-pos .me img { height: 64px; } .ngc-pos .ghost { position: absolute; bottom: 4px; transform: translateX(-50%); font-size: 9px; color: #fff; opacity: .5; background: rgba(0,0,0,.5); padding: 0 3px; }
.ngc-pos .mark { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.12); }
.ngc-snap { display: flex; gap: 3px; } .ngc-snap button { flex: 1; padding: 0; font-size: 10px; }
@media (max-width: 1100px) { .vs-wrap { grid-template-columns: 1fr; height: auto; } .vs-graph { height: 70vh; } }

/* NOD: full-screen node editor for skills / items / careers / statuses */
#ged{position:fixed;inset:0;z-index:900;background:#0b0d10;display:flex;flex-direction:column}
#ged .ged-top{display:flex;gap:14px;align-items:center;padding:8px 14px;border-bottom:1px solid #222a33;background:#10141a}
#ged .ged-top b{font-size:15px;letter-spacing:.04em}
#ged .ged-top button{margin-left:auto}
#ged .ged-main{flex:1;display:flex;min-height:0}
#ged .ged-graph{flex:1;position:relative;min-width:0}
#ged .ged-side{width:330px;border-left:1px solid #222a33;padding:12px;overflow:auto;background:#0f1317}
#ged .ged-side .label{margin-top:12px}
#ged table.mini{width:100%;border-collapse:collapse;margin-top:6px}
#ged table.mini td{padding:3px 4px;border-bottom:1px solid #1c232b}
#ged table.mini td:last-child{text-align:right}
#ged .ged-log{font-family:ui-monospace,monospace;font-size:11px;line-height:1.5;color:#b9c4cf;max-height:260px;overflow:auto;background:#0a0d10;padding:6px;border-radius:4px}
#ged .ok{color:#6fd18a}#ged .bad{color:#ff7a7a;margin:6px 0}
.bk-graph{border:1px dashed #4d6a8a;padding:8px;border-radius:6px}

/* MOB-02 Maker › UI theme › Mobile */
.mk-mob-grid { display: grid; grid-template-columns: 1fr 200px; gap: 14px; align-items: start; }
.mk-phone { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mp-screen { width: 160px; height: 346px; border: 3px solid #445; border-radius: 18px; padding: 6px 4px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; background: #0b0f15; }
.mp-box { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 9px; color: #cde; border-radius: 3px; min-height: 12px; }
.mp-box.col { opacity: .55; font-size: 8px; }
.mp-stage { background: #23415e; } .mp-ic { background: #2c3a28; } .mp-tabs { background: #3b2a46; } .mp-status { background: #463a22; } .mp-scenes { background: #2a3a3e; }
@media (max-width: 900px) { .mk-mob-grid { grid-template-columns: 1fr; } }
.mk-view { width: 100%; border-collapse: collapse; font-size: 13px; } .mk-view th { text-align: left; color: var(--muted); width: 120px; vertical-align: top; padding: 4px 8px 4px 0; font-weight: 600; } .mk-view td { padding: 4px 0; }
/* SFX-01 Sounds tab */
.mk-snd { display: flex; align-items: center; gap: 6px; padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.mk-snd .mk-snd-l { flex: 1; font-size: 13px; } .mk-snd .mk-snd-l code { font-size: 10px; color: #78909c; }
.mk-snd.set .mk-snd-l { color: #a5d6a7; } .mk-snd input[type=range] { width: 90px; }
/* CRD-01 Cards tab */
.mk-cardprev { padding: 14px 10px 6px; background: rgba(0,0,0,.35); border-radius: 6px; }
.mk-cardprev #mk-abcards { display: flex; gap: 10px; overflow: visible; flex-wrap: wrap; }
.mk-cbase { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 4px 14px; }
.mk-cb { display: flex; align-items: center; gap: 6px; }
.mk-cb .mk-cb-k { width: 130px; font-size: 13px; }
.mk-cb.set .mk-cb-k b { color: #a5d6a7; } .mk-cb .mk-cb-k code { font-size: 10px; color: #78909c; } .mk-cb .mk-cb-k { width: 220px; border-left: 3px solid transparent; padding-left: 4px; }
#mk-cfrows { grid-template-columns: 1fr; } #mk-cfrows .mk-cb-k { width: 300px; }
