/* Dedicated notebook surface. Scoped to avoid changing the player app. */
#nb-workspace { --nb-bg:#19181e; --nb-panel:#201f26; --nb-line:#34313d; --nb-text:#dedce5; --nb-muted:#aaa5b7; --nb-accent:#b59adf; position:fixed; inset:0; z-index:90; background:var(--nb-bg); color:var(--nb-text); font:14px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; display:flex; flex-direction:column; text-align:left; }
#nb-workspace[hidden] { display:none; }
body.nb-open { overflow:hidden; }
body.nb-open #frame { display:none; }
#nb-link-form [hidden] { display:none; }
#nb-link-form .nb-link-visibility { display:flex; align-items:center; gap:10px; text-transform:none; letter-spacing:0; }
#nb-link-visible { width:18px; height:18px; flex:none; }
#nb-record-form .nb-record-check { display:flex; align-items:center; gap:10px; text-transform:none; letter-spacing:0; }
#nb-record-form input[type=checkbox] { width:18px; height:18px; flex:none; }
#nb-record-form fieldset { border:1px solid #54445f; border-radius:8px; margin:16px 0; padding:12px; }
#nb-record-form code { overflow-wrap:anywhere; }
#nb-workspace button.nb-delete { color:#f0a9a9; }
#nb-workspace * { box-sizing:border-box; }
#nb-workspace button { font:inherit; font-size:12px; font-weight:500; letter-spacing:0; text-transform:none; border:1px solid transparent; background:transparent; color:var(--nb-muted); border-radius:6px; padding:7px 10px; cursor:pointer; box-shadow:none; min-height:32px; }
#nb-workspace button:hover { background:#ffffff09; color:#f2edf9; border-color:#45404f; }
#nb-workspace button:disabled { opacity:.5; cursor:wait; }
#nb-workspace button:focus-visible,#nb-workspace input:focus-visible,#nb-workspace select:focus-visible { outline:2px solid var(--nb-accent); outline-offset:2px; }
#nb-workspace input,#nb-workspace select { font:inherit; color:var(--nb-text); background:#17161d; border:1px solid var(--nb-line); border-radius:6px; padding:8px 10px; width:100%; outline:none; }
#nb-workspace label { color:var(--nb-muted); font-size:11px; text-transform:none; letter-spacing:0; margin:11px 0 5px; display:block; }
#nb-workspace .nb-accent { color:#f2eafa; background:#5e477c; border:1px solid #806198; }
#nb-workspace .nb-accent:hover { background:#70518f; }
.nb-top { display:flex; align-items:center; justify-content:space-between; min-height:58px; border-bottom:1px solid var(--nb-line); padding:8px 18px; gap:12px; background:#23212a; }
.nb-brand { display:flex; gap:10px; align-items:center; font-size:12px; font-weight:700; letter-spacing:2.3px; white-space:nowrap; }
.nb-brand>span { font-size:29px; font-weight:400; color:var(--nb-accent); }
.nb-brand small { border-left:1px solid #514859; margin-left:4px; padding-left:14px; color:var(--nb-muted); font-size:10px; letter-spacing:1.6px; font-weight:400; }
.nb-top-actions { display:flex; align-items:center; gap:7px; }
#nb-workspace .nb-save { font-size:11px; color:#a8c4a4; }
#nb-workspace .nb-save:before { content:'●'; font-size:8px; margin-right:7px; }
#nb-workspace .nb-save.busy { color:#d8bd85; }
#nb-workspace .nb-save.bad { color:#f0a9a9; }
.nb-layout { display:grid; grid-template-columns:245px minmax(0,1fr) 285px; flex:1; min-height:0; }
.nb-files { background:var(--nb-panel); border-right:1px solid var(--nb-line); padding:18px 12px; overflow:auto; }
.nb-search { padding:0 2px 12px; }
.nb-file-actions { display:flex; gap:8px; padding:0 2px 15px; }
.nb-file-actions>button:first-child { flex:1; }
.nb-folders { display:grid; grid-template-columns:1fr 1fr; padding-bottom:17px; gap:2px; border-bottom:1px solid var(--nb-line); }
#nb-workspace .nb-folders button { text-align:left; font-size:12px; }
#nb-workspace .nb-folders button span { margin-left:6px; }
#nb-workspace .nb-folders button.selected { background:#a88ad51a; color:#d8c3ef; }
.nb-sidebar-heading { display:flex; justify-content:space-between; color:#c3bccd; font-size:9px; letter-spacing:1.4px; font-weight:600; padding:19px 8px 10px; }
.nb-sidebar-heading>span:last-child { color:#8d8798; letter-spacing:0; font-weight:400; }
.nb-file { display:flex; border-radius:6px; margin:2px 0; }
.nb-file.selected { background:#b091da14; }
#nb-workspace .nb-file>button:first-child { flex:1; min-width:0; display:flex; align-items:center; gap:9px; text-align:left; color:#d1ccd9; padding:9px 8px; }
.nb-file>button>span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nb-file small { display:block; color:#9b93a7; font-size:10px; margin-top:2px; }
#nb-workspace .nb-file .nb-icon { padding:5px; color:#847b92; }
.nb-records { border-top:1px solid var(--nb-line); margin-top:18px; padding-top:15px; }
.nb-records>summary { font-size:9px; letter-spacing:1.3px; color:#b5acbf; padding:6px; cursor:pointer; }
#nb-workspace .nb-reference { width:100%; display:flex; gap:8px; text-align:left; padding:7px 8px; font-size:12px; line-height:1.5; }
.nb-ref-tools { display:flex; justify-content:flex-end; margin:0 0 4px; }
#nb-workspace .nb-ref-tools button { min-height:26px; padding:3px 8px; font-size:11px; }
#nb-workspace .nb-reference { flex:1; min-width:0; }
#nb-workspace .nb-reference>span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#nb-workspace .nb-reference.selected { background:#b091da14; color:#d8c3ef; }
.nb-ref-item,.nb-ref-row { display:flex; align-items:center; border-radius:6px; }
#nb-workspace .nb-ref-more { padding:4px 6px; min-height:28px; color:#847b92; opacity:0; }
.nb-ref-item:hover .nb-ref-more,#nb-workspace .nb-ref-more:focus-visible { opacity:1; }
#nb-workspace .nb-ref-edit { opacity:.7; font-size:13px; }
#nb-workspace .nb-ref-row:hover .nb-ref-edit { opacity:1; color:var(--nb-accent); }
@media (hover:none) { #nb-workspace .nb-ref-more { opacity:1; } }
#nb-workspace .nb-ref-toggle { flex:1; min-width:0; display:flex; align-items:center; gap:7px; text-align:left; padding:6px 8px; color:#c9c2d3; }
.nb-ref-caret { width:10px; font-size:9px; color:#847b92; transition:transform .12s; }
.nb-ref-folder.open>.nb-ref-row .nb-ref-caret,.nb-ref-node.open>.nb-ref-item .nb-ref-caret { transform:rotate(90deg); }
#nb-workspace .nb-ref-expander { flex:none; width:20px; min-height:28px; padding:0; display:flex; align-items:center; justify-content:center; }
.nb-ref-spacer { flex:none; width:20px; }
#nb-workspace .nb-ref-item .nb-reference { padding-left:4px; }
.nb-ref-node>.nb-ref-children { margin-left:10px; }
.nb-ref-context .nb-reference { opacity:.6; }
.nb-ref-item.nb-drop-over { background:#b59adf2e; outline:1px dashed var(--nb-accent); }
.nb-ref-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nb-ref-count { font-size:10px; color:#8d8798; }
.nb-ref-children { margin-left:12px; padding-left:5px; border-left:1px solid var(--nb-line); }
.nb-ref-children[hidden] { display:none; }
.nb-ref-unfiled { font-size:9px; letter-spacing:1.2px; text-transform:uppercase; color:#8d8798; padding:12px 8px 5px; border-radius:6px; }
.nb-ref-row.nb-drop-over,.nb-ref-unfiled.nb-drop-over { background:#b59adf2e; outline:1px dashed var(--nb-accent); }
.nb-dragging { opacity:.45; }
#nb-refs [draggable=true] { -webkit-user-drag:element; }
.nb-files footer { padding:24px 8px 0; font-size:10px; color:#928a9e; line-height:1.7; }
.nb-main { display:flex; flex-direction:column; min-width:0; min-height:0; }
#nb-tabs { height:43px; flex-shrink:0; display:flex; overflow:auto; border-bottom:1px solid var(--nb-line); background:#1d1b22; }
.nb-tab { display:flex; border-right:1px solid #302c38; min-width:120px; max-width:245px; flex-shrink:0; align-items:center; }
.nb-tab.active { border-top:2px solid var(--nb-accent); background:#25212e; }
#nb-workspace .nb-tab button:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; text-align:left; padding:10px 12px; }
#nb-workspace .nb-tab.active button { color:#e1d5ed; }
.nb-tab button:last-child { margin-left:auto; }
#nb-panes { display:flex; flex:1; min-height:0; }
.nb-pane { min-width:0; flex:1; display:flex; flex-direction:column; overflow:hidden; }
.nb-pane+.nb-pane { border-left:1px solid #494051; }
.nb-pane-bar { display:flex; align-items:center; justify-content:space-between; padding:9px 18px; gap:8px; min-height:43px; }
.nb-pane-bar>span { color:#a094b1; font-size:9px; letter-spacing:1.3px; }
.nb-pane-bar>div { display:flex; }
#nb-workspace .nb-title { font-family:inherit; font-size:27px; font-weight:600; letter-spacing:-.6px; color:#eee9f4; background:transparent; border:none; border-radius:0; padding:12px 28px 7px; margin:0; min-height:55px; }
.nb-note-meta { display:flex; align-items:center; flex-wrap:wrap; gap:6px; padding:0 25px 12px; color:#a59aaf; font-size:11px; border-bottom:1px solid #2b2832; }
#nb-workspace .nb-note-meta select { width:auto; font-size:10px; padding:4px 5px; border:0; background:transparent; }
#nb-workspace .nb-note-meta button { font-size:10px; padding:3px 7px; min-height:26px; }
.nb-content { flex:1; min-height:0; position:relative; }
.nb-editor { height:100%; }
.nb-content.reading { overflow:auto; }
.nb-markdown { padding:24px 30px 80px; line-height:1.9; font-size:15px; color:#cec9d8; overflow-wrap:anywhere; }
.nb-markdown h1,.nb-markdown h2,.nb-markdown h3 { font-family:inherit; letter-spacing:-.3px; color:#e9e2f1; line-height:1.35; margin:28px 0 13px; }
.nb-markdown h1 { font-size:26px; }.nb-markdown h2 { font-size:21px; }.nb-markdown h3 { font-size:17px; }
.nb-markdown h1:first-child,.nb-markdown h2:first-child { margin-top:0; }
.nb-markdown a { color:#c6a6f0; text-decoration:underline; text-underline-offset:3px; }
.nb-markdown a[href^='#wiki'] { text-decoration:none; background:#a780d719; padding:1px 4px; border-radius:3px; }
.nb-markdown pre { background:#121016; padding:16px; overflow:auto; border:1px solid #302839; border-radius:7px; }
.nb-markdown code { font-size:12px; color:#d9bada; }
.nb-markdown blockquote { border-left:3px solid #81629e; padding:4px 16px; margin:20px 0; color:#b4a5c4; }
.nb-markdown table { border-collapse:collapse; font-size:13px; width:100%; }.nb-markdown td,.nb-markdown th { border:1px solid #403747; padding:8px; text-align:left; }
.nb-markdown img { max-width:100%; height:auto; display:block; margin:18px 0; border:1px solid #3b3545; border-radius:10px; background:#1b1922; cursor:zoom-in; }
.nb-markdown p>img { margin:6px 0; }
.nb-image-missing { display:inline-block; padding:2px 8px; border:1px dashed #4b4458; border-radius:6px; color:#9d97ab; font-size:12px; }
.nb-lightbox { position:fixed; inset:0; z-index:140; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; padding:28px; background:#0d0c11ee; cursor:zoom-out; }
.nb-lightbox figure { margin:0; display:flex; flex-direction:column; align-items:center; gap:10px; max-height:100%; min-height:0; }
.nb-lightbox img { max-width:100%; max-height:76vh; object-fit:contain; border-radius:10px; border:1px solid #453d52; background:#1b1922; }
.nb-lightbox figcaption { color:var(--nb-muted); font-size:12px; text-align:center; max-width:70ch; }
.nb-lightbox-bar { display:flex; align-items:center; gap:14px; }
#nb-workspace .nb-lightbox a { color:#c6a6f0; font-size:12px; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.nb-pane-footer { display:flex; justify-content:space-between; gap:10px; font-size:10px; color:#978caa; border-top:1px solid #302936; padding:8px 16px; }
.nb-widgets { border-left:1px solid var(--nb-line); background:#211e28; padding:0 17px 35px; overflow:auto; }
.nb-widgets>.nb-sidebar-heading { padding-left:0; }
.nb-widget { border-top:1px solid #3b3343; margin-top:20px; padding-top:14px; }
.nb-widget summary { display:flex; justify-content:space-between; align-items:center; font-size:12px; font-weight:600; cursor:pointer; padding:3px 0 9px; color:#d7cbdf; }
.nb-widget summary:before { content:'⌄'; font-size:15px; color:#9a80b6; margin-right:8px; }.nb-widget:not([open]) summary:before { content:'›'; }.nb-widget summary span { margin-left:auto; background:#45334e; border-radius:5px; padding:1px 7px; font-size:10px; }
.nb-widget-hint { font-size:11px; color:#b0a3be; line-height:1.6; margin:10px 0; }
.nb-two { display:grid; grid-template-columns:minmax(0,1fr) 70px; gap:8px; }
#nb-workspace .nb-wide { width:100%; margin-top:10px; background:#ffffff07; }
.nb-person { display:flex; align-items:center; gap:9px; padding:7px 0; font-size:12px; }.nb-person small { display:block; font-size:10px; color:#ad9abd; }
.nb-avatar { width:29px; height:29px; background:#47384f; border:1px solid #67516f; border-radius:9px; display:grid; place-items:center; color:#c8afd9; flex-shrink:0; }
.nb-event { padding:9px 0; border-bottom:1px solid #352e3d; font-size:11px; }.nb-event b { display:block; color:#d2c1df; font-weight:500; }.nb-event span { color:#b8a8c8; }
.nb-empty { font-size:12px; color:#a79db5; padding:10px 8px; line-height:1.8; }
.nb-welcome { margin:auto; text-align:center; padding:40px; max-width:550px; color:#b4a8c6; }.nb-welcome-mark { font-size:65px; color:#a689c9; }.nb-eyebrow { letter-spacing:2.5px; font-size:10px; color:#ac95c5; }.nb-welcome h1 { font-family:inherit; font-size:30px; line-height:1.4; color:#e6ddef; margin:18px 0; }.nb-welcome p { line-height:1.8; }.nb-welcome .nb-accent { margin-top:18px; }.nb-hint { font-size:11px; margin-top:22px; }
.nb-recovery { background:#423329; color:#ffe0b6; padding:10px 16px; font-size:12px; border-block:1px solid #6c4d37; }.nb-recovery span { display:block; }.nb-recovery[hidden] { display:none; }
.nb-revision-text { white-space:pre-wrap; overflow-wrap:anywhere; max-height:40vh; overflow:auto; font-size:13px; background:#17121c; padding:16px; }
.nb-source-prompt { padding:12px 16px; margin-bottom:16px; border:1px solid #705482; border-radius:9px; background:#2e213a; }
body.nb-open #sheet-back { z-index:110; } body.nb-open #sheet { z-index:111; } body.nb-open #confirm-back { z-index:120; } body.nb-open .toast { z-index:130; }
@media (min-width:1001px) { #nb-workspace.nb-show-files .nb-layout { grid-template-columns:0 minmax(0,1fr) 285px; } #nb-workspace.nb-show-files .nb-files { visibility:hidden; padding:0; } #nb-workspace.nb-show-widgets .nb-layout { grid-template-columns:245px minmax(0,1fr) 0; } #nb-workspace.nb-show-widgets .nb-widgets { visibility:hidden; padding:0; } #nb-workspace.nb-show-files.nb-show-widgets .nb-layout { grid-template-columns:0 minmax(0,1fr) 0; } }
@media (max-width:1200px) { .nb-layout { grid-template-columns:210px minmax(0,1fr) 260px; }.nb-pane-bar { padding:6px 10px; }.nb-pane-bar>span { font-size:8px; }#nb-workspace .nb-title { font-size:22px; padding-inline:20px; }.nb-markdown { padding-inline:20px; } }
@media (max-width:1000px) { .nb-layout { grid-template-columns:minmax(0,1fr); }.nb-files,.nb-widgets { display:none; }.nb-show-files .nb-files,.nb-show-widgets .nb-widgets { display:block; position:absolute; top:58px; bottom:0; z-index:5; width:285px; box-shadow:0 15px 70px #0009; }.nb-show-files .nb-files { left:0; }.nb-show-widgets .nb-widgets { right:0; }.nb-brand small { display:none; } }
@media (max-width:600px) { .nb-top { min-height:88px; padding:5px 10px; flex-wrap:wrap; gap:0; }.nb-brand { font-size:10px; }.nb-brand>span { font-size:22px; }.nb-top-actions { gap:1px; flex:1 1 100%; justify-content:space-between; }#nb-workspace .nb-top-actions button { font-size:10px; padding:5px; min-height:36px; }#nb-workspace .nb-save { max-width:90px; font-size:9px; }.nb-show-files .nb-files,.nb-show-widgets .nb-widgets { top:88px; }.nb-pane+.nb-pane { border-left:0; border-top:1px solid #665170; }#nb-panes.split { flex-direction:column; }.nb-pane { min-height:0; }#nb-workspace .nb-title { font-size:22px!important; padding:8px 18px; }.nb-pane-bar { min-height:35px; }#nb-workspace .nb-pane-bar button { min-height:30px; padding:4px 7px; font-size:11px; }.nb-note-meta { padding:0 12px 6px; }.nb-pane-footer { font-size:9px; padding:5px 10px; }.nb-pane-footer span:last-child { max-width:65%; text-align:right; }.nb-welcome { padding:24px; }.nb-welcome h1 { font-size:25px; }#nb-workspace .cm-content { padding:15px 14px 80px; }#nb-workspace .cm-scroller { font-size:16px; }.nb-markdown { padding:16px; } }
