:root {
    --bg: #071019;
    --panel: #0c1823;
    --panel-2: #112131;
    --panel-3: #162a3c;
    --line: rgba(195, 220, 239, .15);
    --line-strong: rgba(195, 220, 239, .29);
    --text: #eef6ff;
    --muted: #a2b6c7;
    --muted-2: #7f96a9;
    --accent: #56d4c5;
    --accent-2: #7da6ff;
    --warning: #ffc86b;
    --danger: #ff7f8d;
    --success: #69dea6;
    --shadow: 0 22px 65px rgba(0, 0, 0, .34);
    --sidebar-width: 244px;
    --inspector-width: 352px;
    --topbar-height: 78px;
    --radius: 16px;
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid rgba(86, 212, 197, .9);
    outline-offset: 2px;
}
* { scrollbar-width: thin; scrollbar-color: rgba(133, 164, 186, .34) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: rgba(133, 164, 186, .28); border: 2px solid transparent; border-radius: 99px; background-clip: padding-box; }

.login-screen {
    --login-mx: 62vw;
    --login-my: 32vh;
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100%;
    overflow: hidden;
    padding: 30px 38px 24px;
    background:
        radial-gradient(circle 560px at var(--login-mx) var(--login-my), rgba(86,212,197,.12), transparent 64%),
        linear-gradient(145deg, #061018 0%, #07141e 46%, #071019 100%);
    isolation: isolate;
    animation: loginReveal .8s cubic-bezier(.2,.8,.2,1) both;
}
.login-screen[hidden] { display: none; }
.login-screen.is-leaving { animation: loginLeave .72s cubic-bezier(.7,0,.3,1) both; pointer-events: none; }
.login-atmosphere, .login-grid, .login-glow, .login-grain { position: absolute; inset: 0; pointer-events: none; }
.login-atmosphere { z-index: -1; overflow: hidden; }
.login-grid {
    opacity: .55;
    background-image:
        linear-gradient(rgba(125,166,255,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125,166,255,.055) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 72%);
    transform: perspective(680px) rotateX(66deg) scale(1.6) translateY(23%);
    transform-origin: center bottom;
    animation: gridDrift 16s linear infinite;
}
.login-glow {
    background:
        radial-gradient(circle at 68% 42%, rgba(86,212,197,.17), transparent 26%),
        radial-gradient(circle at 78% 22%, rgba(125,166,255,.14), transparent 22%);
    filter: blur(22px);
    animation: glowBreathe 6s ease-in-out infinite alternate;
}
.login-orbit { position: absolute; border: 1px solid rgba(125,166,255,.12); border-radius: 50%; pointer-events: none; }
.login-orbit::before { content: ""; position: absolute; width: 8px; height: 8px; top: 50%; left: -4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 24px rgba(86,212,197,.9); }
.login-orbit-one { width: 560px; height: 560px; right: -170px; top: -210px; animation: orbitSpin 24s linear infinite; }
.login-orbit-two { width: 360px; height: 360px; right: 16%; bottom: -230px; border-color: rgba(86,212,197,.1); animation: orbitSpin 18s linear infinite reverse; }
.login-dune { position: absolute; left: -10%; width: 120%; border-radius: 50% 50% 0 0; transform-origin: center bottom; pointer-events: none; }
.login-dune-back {
    height: 34vh;
    bottom: -22vh;
    background: linear-gradient(180deg, rgba(36,72,84,.38), rgba(8,24,34,.92));
    box-shadow: 0 -1px rgba(99,202,194,.18);
    animation: duneFloat 9s ease-in-out infinite alternate;
}
.login-dune-front {
    height: 27vh;
    bottom: -19vh;
    left: -25%;
    width: 150%;
    background: linear-gradient(180deg, rgba(18,46,58,.88), #071019 74%);
    box-shadow: 0 -1px rgba(125,166,255,.14);
    animation: duneFloat 12s ease-in-out -3s infinite alternate-reverse;
}
.login-grain {
    opacity: .16;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,.45) 0 1px, transparent 1.2px),
        radial-gradient(circle at 72% 63%, rgba(255,255,255,.3) 0 1px, transparent 1.2px);
    background-size: 37px 41px, 53px 47px;
    animation: grainShift .8s steps(2) infinite;
}
.login-brand { display: flex; align-items: center; gap: 12px; width: max-content; animation: loginDrop .7s .08s cubic-bezier(.2,.8,.2,1) both; }
.login-brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(86,212,197,.36); border-radius: 13px; background: linear-gradient(145deg, rgba(86,212,197,.22), rgba(125,166,255,.18)); color: #d9fffa; font-size: 19px; font-weight: 950; box-shadow: 0 10px 35px rgba(44,167,166,.16), inset 0 1px rgba(255,255,255,.12); }
.login-brand strong, .login-brand span { display: block; }
.login-brand strong { font-size: 14px; letter-spacing: .02em; }
.login-brand span { margin-top: 2px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .11em; }
.login-layout { align-self: center; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .62fr); align-items: center; gap: clamp(50px, 8vw, 150px); width: min(1320px, 100%); margin: 0 auto; padding: 40px 0 70px; }
.login-manifesto { max-width: 780px; }
.login-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; color: #a9bfd0; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .2em; animation: loginRise .7s .18s cubic-bezier(.2,.8,.2,1) both; }
.login-kicker span { width: 34px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
.login-manifesto h1 { margin: 0; font-size: clamp(48px, 5.7vw, 92px); line-height: .96; letter-spacing: -.065em; font-weight: 780; text-wrap: balance; }
.login-manifesto h1 > span { display: block; opacity: 0; transform: translateY(38px); animation: titleRise .9s cubic-bezier(.16,1,.3,1) forwards; }
.login-manifesto h1 > span:nth-child(1) { animation-delay: .25s; }
.login-manifesto h1 > span:nth-child(2) { animation-delay: .37s; color: #aebfcc; }
.login-manifesto h1 > span:nth-child(3) { animation-delay: .49s; }
.login-accent { color: #74dfd0; text-shadow: 0 0 48px rgba(86,212,197,.2); }
.login-manifesto > p { max-width: 620px; margin: 28px 0 0; color: #9eb2c2; font-size: 15px; line-height: 1.75; animation: loginRise .8s .62s cubic-bezier(.2,.8,.2,1) both; }
.login-signal { display: flex; align-items: center; gap: 12px; margin-top: 40px; color: #6e8b9e; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; letter-spacing: .14em; animation: loginRise .8s .72s cubic-bezier(.2,.8,.2,1) both; }
.signal-line { position: relative; width: 74px; height: 1px; overflow: hidden; background: rgba(86,212,197,.2); }
.signal-line::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--accent), transparent); transform: translateX(-100%); animation: signalScan 2.4s ease-in-out infinite; }
.login-panel { position: relative; padding: 25px; border: 1px solid rgba(181,214,232,.17); border-radius: 22px; background: linear-gradient(145deg, rgba(17,34,47,.83), rgba(9,22,32,.74)); box-shadow: 0 34px 90px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.05); backdrop-filter: blur(22px); animation: panelArrive .95s .38s cubic-bezier(.16,1,.3,1) both; }
.login-panel::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(86,212,197,.25), transparent 32%, rgba(125,166,255,.16)); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; pointer-events: none; }
.login-panel-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 25px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.login-panel-index { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(86,212,197,.18); border-radius: 9px; background: rgba(86,212,197,.06); color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.login-panel h2 { margin: 4px 0 0; font-size: 18px; letter-spacing: -.025em; }
.login-field { display: grid; gap: 8px; margin-top: 15px; }
.login-field > span:first-child { color: #a9bdcb; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.login-field input { width: 100%; height: 46px; border: 1px solid rgba(181,214,232,.16); border-radius: 11px; outline: 0; background: rgba(4,14,22,.48); color: var(--text); padding: 0 13px; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.login-field input::placeholder { color: #617b8e; }
.login-field input:focus { border-color: rgba(86,212,197,.5); background: rgba(7,20,29,.76); box-shadow: 0 0 0 4px rgba(86,212,197,.07); }
.login-password-wrap { position: relative; display: block; }
.login-password-wrap input { padding-right: 70px; }
.login-password-wrap button { position: absolute; right: 7px; top: 7px; height: 32px; border: 0; border-radius: 7px; background: rgba(255,255,255,.045); color: var(--muted); padding: 0 9px; cursor: pointer; font-size: 9px; font-weight: 800; }
.login-password-wrap button:hover { background: rgba(255,255,255,.08); color: var(--text); }
.login-options { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; color: var(--muted-2); font-size: 9px; }
.login-options label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.login-options input { accent-color: var(--accent); }
.login-submit { position: relative; display: flex; align-items: center; justify-content: space-between; width: 100%; height: 48px; margin-top: 22px; overflow: hidden; border: 0; border-radius: 11px; background: linear-gradient(110deg, #58d7c7, #72a9f2); color: #05181e; padding: 0 16px; cursor: pointer; font-weight: 900; box-shadow: 0 13px 32px rgba(73,181,188,.2); transition: transform .16s ease, filter .16s ease; }
.login-submit::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 25%, rgba(255,255,255,.42), transparent 70%); transform: translateX(-120%); animation: buttonShimmer 3.4s 1.2s ease-in-out infinite; }
.login-submit > span { position: relative; z-index: 1; }
.login-submit:hover { transform: translateY(-2px); filter: brightness(1.07); }
.login-submit:disabled { cursor: wait; filter: saturate(.7); }
.login-screen.is-authenticating .login-submit > span:last-child { animation: orbitSpin .8s linear infinite; }
.login-demo-note { margin: 15px 2px 0; color: #738b9d; font-size: 9px; line-height: 1.5; }
.login-demo-note span { display: inline-block; margin-right: 5px; padding: 2px 5px; border-radius: 5px; background: rgba(255,200,107,.09); color: var(--warning); font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.login-footer { display: flex; justify-content: space-between; gap: 20px; color: #587184; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; letter-spacing: .12em; text-transform: uppercase; animation: loginRise .7s .78s both; }
.login-screen { grid-template: 1fr / 1fr; place-items: center; cursor: pointer; }
.splash-stage { position: relative; z-index: 2; grid-area: 1 / 1; display: grid; justify-items: center; width: min(980px, 92vw); text-align: center; }
.splash-map { position: relative; width: 300px; height: 190px; margin-bottom: 18px; }
.splash-map-core, .splash-map-node { position: absolute; display: grid; place-items: center; border-radius: 50%; opacity: 0; transform: scale(.35); }
.splash-map-core { z-index: 3; left: 50%; top: 50%; width: 68px; height: 68px; border: 1px solid rgba(86,212,197,.5); background: radial-gradient(circle at 35% 30%, rgba(150,255,240,.28), rgba(12,42,51,.96) 58%); color: #d9fffa; font-size: 24px; font-weight: 950; box-shadow: 0 0 0 12px rgba(86,212,197,.035), 0 0 58px rgba(86,212,197,.24); transform: translate(-50%, -50%) scale(.35); }
.splash-map-node { z-index: 2; width: 24px; height: 24px; border: 1px solid rgba(125,166,255,.42); background: #10283a; box-shadow: 0 0 26px rgba(125,166,255,.24); }
.splash-map-node::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #8db0ff; box-shadow: 0 0 12px currentColor; }
.splash-map .node-one { left: 18px; top: 26px; }
.splash-map .node-two { right: 12px; top: 34px; }
.splash-map .node-three { left: 42px; bottom: 16px; }
.splash-map .node-four { right: 38px; bottom: 8px; }
.splash-map-link { position: absolute; z-index: 1; left: 50%; top: 50%; width: 125px; height: 1px; background: linear-gradient(90deg, rgba(86,212,197,.6), rgba(125,166,255,.18)); transform-origin: left center; opacity: 0; }
.splash-map .link-one { --splash-link-angle: 214deg; transform: rotate(var(--splash-link-angle)) scaleX(0); }
.splash-map .link-two { --splash-link-angle: 326deg; transform: rotate(var(--splash-link-angle)) scaleX(0); }
.splash-map .link-three { --splash-link-angle: 150deg; transform: rotate(var(--splash-link-angle)) scaleX(0); }
.splash-map .link-four { --splash-link-angle: 31deg; transform: rotate(var(--splash-link-angle)) scaleX(0); }
.splash-version { margin-bottom: 12px; color: #7996a9; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; letter-spacing: .24em; text-transform: uppercase; opacity: 0; }
.splash-version strong { color: var(--accent); font-weight: 900; }
.splash-stage h1 { margin: 0; font-size: clamp(56px, 8vw, 112px); line-height: .9; letter-spacing: -.07em; font-weight: 820; opacity: 0; transform: translateY(32px); text-shadow: 0 18px 70px rgba(0,0,0,.3); }
.splash-stage > p { max-width: 760px; margin: 25px 0 0; color: #a8bdcc; font-size: clamp(14px, 1.55vw, 20px); font-weight: 650; letter-spacing: .025em; opacity: 0; transform: translateY(18px); }
.splash-progress { width: min(360px, 64vw); height: 2px; margin-top: 36px; overflow: hidden; border-radius: 99px; background: rgba(125,166,255,.12); opacity: 0; }
.splash-progress i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: scaleX(0); transform-origin: left; box-shadow: 0 0 18px rgba(86,212,197,.5); }
.splash-powered { position: absolute; z-index: 3; left: 0; right: 0; bottom: 28px; color: #587184; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; letter-spacing: .13em; text-align: center; text-transform: lowercase; opacity: 0; }
.splash-powered strong { color: #91a9ba; font-weight: 800; }
.login-screen.splash-play .splash-map-core { animation: splashCore .8s .18s cubic-bezier(.16,1,.3,1) forwards; }
.login-screen.splash-play .splash-map-node { animation: splashNode .55s cubic-bezier(.16,1,.3,1) forwards; }
.login-screen.splash-play .node-one { animation-delay: .65s; }
.login-screen.splash-play .node-two { animation-delay: .78s; }
.login-screen.splash-play .node-three { animation-delay: .9s; }
.login-screen.splash-play .node-four { animation-delay: 1.02s; }
.login-screen.splash-play .splash-map-link { animation: splashLink .6s cubic-bezier(.2,.8,.2,1) forwards; }
.login-screen.splash-play .link-one { animation-delay: .48s; }
.login-screen.splash-play .link-two { animation-delay: .6s; }
.login-screen.splash-play .link-three { animation-delay: .72s; }
.login-screen.splash-play .link-four { animation-delay: .84s; }
.login-screen.splash-play .splash-version { animation: loginRise .6s 1.02s forwards; }
.login-screen.splash-play .splash-stage h1 { animation: splashTitle .85s 1.12s cubic-bezier(.16,1,.3,1) forwards; }
.login-screen.splash-play .splash-stage > p { animation: loginRise .7s 1.4s forwards; }
.login-screen.splash-play .splash-progress { animation: loginRise .45s 1.65s forwards; }
.login-screen.splash-play .splash-progress i { animation: splashProgress 1.45s 1.72s cubic-bezier(.25,.1,.25,1) forwards; }
.login-screen.splash-play .splash-powered { animation: loginRise .65s 1.72s forwards; }
.is-login-visible .app-shell { transform: scale(1.015); filter: blur(10px) brightness(.6); }
.app-shell { transition: transform .72s cubic-bezier(.2,.8,.2,1), filter .72s ease; }

@keyframes loginReveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes loginLeave { 0% { opacity: 1; transform: scale(1); } 45% { opacity: 1; } 100% { opacity: 0; transform: scale(1.035); filter: blur(12px); } }
@keyframes loginDrop { from { opacity: 0; transform: translateY(-15px); } to { opacity: 1; transform: none; } }
@keyframes loginRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes titleRise { to { opacity: 1; transform: none; } }
@keyframes panelArrive { from { opacity: 0; transform: translateX(45px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes gridDrift { to { background-position: 0 72px, 72px 0; } }
@keyframes glowBreathe { to { opacity: .68; transform: scale(1.08); } }
@keyframes duneFloat { to { transform: translateX(3%) scaleY(1.05); } }
@keyframes grainShift { 0% { transform: translate(0); } 50% { transform: translate(-4px, 3px); } 100% { transform: translate(3px, -2px); } }
@keyframes signalScan { 50%, 100% { transform: translateX(100%); } }
@keyframes buttonShimmer { 0%, 65% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes splashCore { to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes splashNode { to { opacity: 1; transform: scale(1); } }
@keyframes splashLink { to { opacity: 1; transform: rotate(var(--splash-link-angle)) scaleX(1); } }
@keyframes splashTitle { to { opacity: 1; transform: translateY(0); } }
@keyframes splashProgress { to { transform: scaleX(1); } }

.app-shell { display: grid; grid-template-columns: var(--sidebar-width) 1fr; width: 100%; height: 100%; }
.app-shell.is-sidebar-collapsed { grid-template-columns: 78px 1fr; }
.sidebar {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, #0b1721 0%, #08121b 100%);
    padding: 18px 14px;
}
.sidebar-toggle { position: absolute; z-index: 8; top: 27px; right: -12px; display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--line-strong); border-radius: 50%; background: #0d1c28; color: var(--muted); cursor: pointer; box-shadow: 0 8px 20px rgba(0,0,0,.3); transition: color .15s ease, background .15s ease, transform .2s ease; }
.sidebar-toggle:hover { color: var(--text); background: #142838; transform: scale(1.06); }
.sidebar-toggle span { transform: translateY(-1px); font-size: 17px; }
.is-sidebar-collapsed .brand > div:last-child,
.is-sidebar-collapsed .nav-item span:last-child,
.is-sidebar-collapsed .sidebar-section,
.is-sidebar-collapsed .sidebar-footer { display: none; }
.is-sidebar-collapsed .brand { justify-content: center; padding-inline: 0; }
.is-sidebar-collapsed .nav-item { justify-content: center; padding-inline: 0; }
.is-sidebar-collapsed .nav-icon { width: auto; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 22px; }
.brand-mark {
    display: grid; place-items: center; width: 38px; height: 38px;
    border-radius: 12px; background: linear-gradient(145deg, #53d9c9, #608bf3);
    color: #062128; font-weight: 900; font-size: 20px; box-shadow: 0 8px 28px rgba(72, 207, 194, .25);
}
.brand strong { display: block; font-size: 14px; letter-spacing: .01em; }
.brand span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.main-nav { display: grid; gap: 4px; }
.nav-item, .saved-view {
    appearance: none; border: 0; background: transparent; cursor: pointer; text-align: left;
    color: var(--muted); border-radius: 11px; transition: .16s ease;
}
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 10px 11px; font-size: 13px; }
.nav-item:hover, .saved-view:hover { background: rgba(255,255,255,.045); color: var(--text); }
.nav-item.is-active { background: rgba(86, 212, 197, .11); color: #d9fffa; box-shadow: inset 0 0 0 1px rgba(86, 212, 197, .12); }
.nav-icon { width: 21px; color: var(--accent); text-align: center; font-size: 16px; }
.sidebar-section { margin-top: 26px; border-top: 1px solid var(--line); padding: 20px 5px 0; }
.sidebar-label { color: var(--muted-2); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; margin: 0 6px 7px; }
.saved-view { display: block; width: 100%; padding: 9px; font-size: 12px; }
.sidebar-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding: 14px 8px 0; color: var(--muted-2); border-top: 1px solid var(--line); }
.demo-status { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.demo-status span { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(105,222,166,.09); }
.demo-status b { font: inherit; white-space: nowrap; }
.demo-status[data-state="loading"] span, .demo-status[data-state="saving"] span { background: var(--warning); box-shadow: 0 0 0 4px rgba(255,200,107,.09); animation: syncPulse 1.15s ease-in-out infinite alternate; }
.demo-status[data-state="error"] { color: #d9959e; }
.demo-status[data-state="error"] span { background: var(--danger); box-shadow: 0 0 0 4px rgba(255,127,141,.09); }
@keyframes syncPulse { to { opacity: .45; transform: scale(.78); } }

.app-main { min-width: 0; display: grid; grid-template-rows: var(--topbar-height) 1fr; }
.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 10px 16px 10px 22px; border-bottom: 1px solid var(--line); background: rgba(9, 20, 30, .94);
    backdrop-filter: blur(18px); z-index: 20;
}
.title-stack { min-width: 0; }
.breadcrumbs { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.breadcrumbs button { appearance: none; border: 0; background: none; color: inherit; padding: 0; cursor: pointer; }
.breadcrumbs button:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 6px; color: #52687a; }
.title-row { display: flex; align-items: center; gap: 10px; }
.title-row h1 { font-size: 19px; line-height: 1.2; margin: 0; letter-spacing: -.02em; }
.view-badge { padding: 4px 8px; border: 1px solid rgba(125,166,255,.22); color: #b9ceff; background: rgba(125,166,255,.08); border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.view-meta { color: var(--muted); font-size: 11px; white-space: nowrap; }
.view-meta::before { content: ""; display: inline-block; width: 3px; height: 3px; margin: 0 8px 2px 0; border-radius: 50%; background: var(--muted-2); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.history-controls { display: flex; height: 38px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.history-controls button { width: 36px; height: 36px; border: 0; border-right: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--muted); cursor: pointer; font-size: 16px; transition: background .15s ease, color .15s ease; }
.history-controls button:last-child { border-right: 0; }
.history-controls button:hover:not(:disabled) { background: rgba(255,255,255,.07); color: var(--text); }
.history-controls button:disabled { opacity: .3; cursor: not-allowed; }
.icon-button, .toolbar-button, .primary-button, .secondary-button, .segmented-control button {
    border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: .15s ease;
}
.icon-button { width: 38px; height: 38px; background: rgba(255,255,255,.035); font-size: 17px; }
.toolbar-button { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 10px; background: rgba(255,255,255,.035); color: var(--muted); }
.connect-button.is-active { border-color: rgba(86,212,197,.48); background: rgba(86,212,197,.12); color: #d7fff9; box-shadow: 0 0 0 3px rgba(86,212,197,.06); }
.toolbar-button kbd, .search-input-wrap kbd { padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.035); color: var(--muted-2); font-size: 9px; font-family: inherit; }
.icon-button:hover, .toolbar-button:hover, .segmented-control button:hover { border-color: var(--line-strong); background: rgba(255,255,255,.07); color: var(--text); }
.primary-button { height: 38px; display: inline-flex; align-items: center; gap: 5px; padding: 0 14px; background: linear-gradient(135deg, #5adccb, #69a5f5); color: #061920; border-color: transparent; font-weight: 850; box-shadow: 0 8px 24px rgba(62, 172, 183, .18); }
.primary-button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.secondary-button { height: 38px; padding: 0 14px; background: rgba(255,255,255,.04); color: var(--text); }
.secondary-button:hover { background: rgba(255,255,255,.08); }
.segmented-control { display: flex; height: 38px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.segmented-control button { width: 36px; height: 36px; border: 0; border-radius: 0; background: rgba(255,255,255,.025); }
.segmented-control .zoom-value { width: 54px; color: var(--muted); font-size: 11px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.segmented-control .fit-view { width: 58px; color: #cffff8; font-size: 10px; font-weight: 800; border-left: 1px solid var(--line); }
.subtle-danger:hover { color: #ffc2c9; border-color: rgba(255,127,141,.32); background: rgba(255,127,141,.08); }

.workspace-shell { min-height: 0; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--inspector-width); transition: grid-template-columns .2s ease; }
.workspace-shell.is-inspector-collapsed { grid-template-columns: minmax(0, 1fr) 0; }
.workspace { min-width: 0; min-height: 0; position: relative; background: #071119; outline: none; }
.connection-guide { position: absolute; z-index: 45; top: 14px; left: 50%; display: flex; align-items: center; gap: 11px; min-width: 390px; padding: 9px 10px 9px 12px; transform: translateX(-50%); border: 1px solid rgba(86,212,197,.3); border-radius: 13px; background: rgba(9,24,33,.94); box-shadow: 0 18px 45px rgba(0,0,0,.34); backdrop-filter: blur(16px); }
.connection-guide[hidden] { display: none; }
.connection-guide-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(86,212,197,.4); animation: connectionPulse 1.8s ease-out infinite; }
.connection-guide div { display: grid; gap: 2px; flex: 1; }
.connection-guide strong { font-size: 10px; }
.connection-guide div span { color: var(--muted); font-size: 9px; }
.connection-guide button { height: 30px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.04); color: var(--muted); padding: 0 9px; cursor: pointer; font-size: 9px; }
.connection-guide button:hover { background: rgba(255,255,255,.08); color: var(--text); }
.connection-guide kbd { margin-left: 4px; color: var(--muted-2); font-family: inherit; font-size: 8px; }
@keyframes connectionPulse { 70%, 100% { box-shadow: 0 0 0 8px rgba(86,212,197,0); } }
.canvas-viewport { position: absolute; inset: 0; overflow: hidden; cursor: grab; user-select: none; background-color: #071119; background-image: radial-gradient(circle at 1px 1px, rgba(162, 190, 211, .14) 1px, transparent 0); background-size: 24px 24px; }
.canvas-viewport.is-panning { cursor: grabbing; }
.canvas-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.canvas-world { position: relative; width: 3600px; height: 2400px; }
.connection-layer { position: absolute; inset: 0; z-index: 2; overflow: visible; pointer-events: none; }
.connection-line { fill: none; stroke: var(--connection-color, var(--accent)); stroke-width: 3; opacity: .76; transition: stroke-width .15s ease, opacity .15s ease, filter .15s ease; }
.connection-line.is-dashed { stroke-dasharray: 10 7; }
.connection-hit { fill: none; stroke: transparent; stroke-width: 22; pointer-events: stroke; cursor: pointer; }
.connection-label { pointer-events: all; cursor: pointer; }
.connection-label rect { fill: rgba(8,22,31,.94); stroke: color-mix(in srgb, var(--connection-color) 42%, transparent); stroke-width: 1; filter: drop-shadow(0 9px 16px rgba(0,0,0,.3)); }
.connection-label-title { fill: #e5f2fa; font-size: 10px; font-weight: 800; }
.connection-label-description { fill: #8fa8ba; font-size: 8px; }
.connection-group:hover .connection-line, .connection-group.is-selected .connection-line { stroke-width: 5; opacity: 1; filter: drop-shadow(0 0 7px color-mix(in srgb, var(--connection-color) 55%, transparent)); }
.connection-group.is-selected .connection-label rect { stroke-width: 2; }
.workspace.is-connecting .node { cursor: crosshair; }
.node.is-connection-source::after { content: ""; position: absolute; inset: -7px; border: 3px solid rgba(125,166,255,.95); border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 6px rgba(125,166,255,.12), 0 0 30px rgba(125,166,255,.2); animation: sourcePulse 1.4s ease-in-out infinite alternate; }
.node.is-connection-origin { outline: 3px solid rgba(125,166,255,.8); outline-offset: 4px; }
.node.is-connection-target { outline: 3px solid rgba(86,212,197,.85); outline-offset: 4px; }
@keyframes sourcePulse { to { box-shadow: 0 0 0 10px rgba(125,166,255,.04), 0 0 38px rgba(125,166,255,.28); } }
.canvas-hint { position: absolute; left: 16px; bottom: 14px; z-index: 8; display: flex; gap: 6px; padding: 5px; border-radius: 11px; background: rgba(7,16,25,.86); color: var(--muted); border: 1px solid var(--line); font-size: 10px; pointer-events: none; backdrop-filter: blur(12px); box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.canvas-hint span { padding: 4px 7px; border-radius: 7px; background: rgba(255,255,255,.035); }
.canvas-hint strong { color: #d7e7f3; font-weight: 800; }

.node { position: absolute; user-select: none; touch-action: none; cursor: grab; }
.node:active { cursor: grabbing; }
.node:focus-visible { outline: 2px solid rgba(125,166,255,.95); outline-offset: 4px; }
.node.is-selected { filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }
.node.is-selected::after { content: ""; position: absolute; inset: -4px; border: 2px solid rgba(86,212,197,.82); border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 4px rgba(86,212,197,.1); }
.node-frame { z-index: 1; border: 1px solid rgba(155, 188, 212, .16); border-radius: 24px; background: rgba(11, 25, 37, .56); box-shadow: inset 0 1px rgba(255,255,255,.025); overflow: visible; }
.node-frame.is-selected, .node-frame.is-resizing { border-color: color-mix(in srgb, var(--frame-accent, var(--accent)) 58%, transparent); box-shadow: inset 0 1px rgba(255,255,255,.035), 0 0 0 1px color-mix(in srgb, var(--frame-accent, var(--accent)) 18%, transparent), 0 20px 55px rgba(0,0,0,.2); }
.frame-size-indicator { position: absolute; z-index: 7; right: 14px; bottom: 12px; display: none; padding: 5px 8px; border: 1px solid rgba(195,220,239,.19); border-radius: 8px; background: rgba(7,18,27,.88); color: #a9c0d0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; font-weight: 750; pointer-events: none; backdrop-filter: blur(9px); }
.node-frame.is-selected .frame-size-indicator, .node-frame.is-resizing .frame-size-indicator { display: block; }
.frame-resize-handle { position: absolute; z-index: 10; display: block; opacity: 0; pointer-events: none; touch-action: none; }
.frame-resize-handle::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 8px; height: 8px; border: 2px solid #cffff8; border-radius: 3px; background: #123541; box-shadow: 0 0 0 3px rgba(86,212,197,.12), 0 3px 10px rgba(0,0,0,.4); transform: translate(-50%, -50%); transition: transform .12s ease, background .12s ease; }
.node-frame.is-selected .frame-resize-handle, .node-frame.is-resizing .frame-resize-handle { opacity: 1; pointer-events: auto; }
.frame-resize-handle:hover::after { background: var(--accent); transform: translate(-50%, -50%) scale(1.18); }
.handle-n, .handle-s { left: 50%; width: 42px; height: 18px; transform: translateX(-50%); cursor: ns-resize; }
.handle-n { top: -9px; }
.handle-s { bottom: -9px; }
.handle-e, .handle-w { top: 50%; width: 18px; height: 42px; transform: translateY(-50%); cursor: ew-resize; }
.handle-e { right: -9px; }
.handle-w { left: -9px; }
.handle-nw, .handle-ne, .handle-se, .handle-sw { width: 22px; height: 22px; }
.handle-nw { left: -11px; top: -11px; cursor: nwse-resize; }
.handle-ne { right: -11px; top: -11px; cursor: nesw-resize; }
.handle-se { right: -11px; bottom: -11px; cursor: nwse-resize; }
.handle-sw { left: -11px; bottom: -11px; cursor: nesw-resize; }
.workspace.is-resizing-frame, .workspace.is-resizing-frame .node { cursor: default; }
.workspace.is-resizing-frame .node-frame.is-resizing { cursor: inherit; }
.node-frame.is-drop-target { border-color: rgba(86,212,197,.8); background: rgba(28,65,70,.56); box-shadow: inset 0 0 0 3px rgba(86,212,197,.1), 0 0 0 5px rgba(86,212,197,.06); }
.node-frame.is-drop-target .frame-head { background: rgba(86,212,197,.08); }
.node-frame::before { content: ""; position: absolute; inset: 0; background: linear-gradient(145deg, rgba(255,255,255,.025), transparent 44%); pointer-events: none; }
.frame-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px 13px; border-bottom: 1px solid rgba(155,188,212,.1); }
.frame-title { display: flex; align-items: center; gap: 10px; }
.frame-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--frame-accent, var(--accent)); box-shadow: 0 0 0 5px color-mix(in srgb, var(--frame-accent, var(--accent)) 12%, transparent); }
.frame-title strong { font-size: 15px; letter-spacing: -.01em; }
.frame-meta { color: var(--muted-2); font-size: 11px; }
.frame-description { margin: 0; padding: 12px 20px; color: var(--muted); font-size: 12px; max-width: 72ch; line-height: 1.55; }
.frame-resize-help { margin: 9px 0 0; color: var(--muted-2); font-size: 9px; line-height: 1.5; }

.node-card, .node-portal, .node-metric, .node-note, .node-media, .node-video, .journey-step, .timeline-node, .risk-node {
    z-index: 3; display: flex; flex-direction: column; border: 1px solid rgba(164,194,216,.16); border-radius: 15px; background: linear-gradient(180deg, rgba(17,33,46,.97) 0%, rgba(14,29,42,.98) 78%, rgba(11,25,37,.99) 100%); box-shadow: 0 15px 34px rgba(0,0,0,.22), inset 0 -1px rgba(210,232,246,.045); overflow: hidden; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.node-card:hover, .node-portal:hover, .node-note:hover, .node-media:hover, .node-video:hover, .timeline-node:hover, .risk-node:hover { border-color: rgba(164,194,216,.36); transform: translateY(-2px); box-shadow: 0 19px 42px rgba(0,0,0,.27), inset 0 -1px rgba(210,232,246,.07); }
.node-card { padding: 12px 14px 11px; }
.node-card > *, .node-note > *, .node-metric > *, .timeline-node > *, .risk-node > *, .portal-body > * { flex-shrink: 0; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.kicker { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); font-weight: 850; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--status-color, var(--muted)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--status-color, var(--muted)) 12%, transparent); }
.status-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; min-height: 21px; padding: 2px 7px; border: 1px solid color-mix(in srgb, var(--status-color, var(--muted)) 24%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--status-color, var(--muted)) 8%, transparent); color: color-mix(in srgb, var(--status-color, var(--muted)) 78%, white); font-size: 9px; font-weight: 800; white-space: nowrap; }
.status-chip .status-dot { width: 6px; height: 6px; box-shadow: none; }
.node-card h3, .node-portal h3, .node-note h3, .node-media h3 { display: -webkit-box; margin: 0; overflow: hidden; font-size: 15px; line-height: 1.35; letter-spacing: -.015em; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.node-card p, .node-portal p, .node-note p, .node-media p { display: -webkit-box; margin: 8px 0 0; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 11px; border-top: 1px solid rgba(164,194,216,.11); }
.owner-stack { display: flex; align-items: center; }
.avatar { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #21384a; border: 2px solid #10202e; color: #d9ecfb; font-size: 9px; font-weight: 850; margin-left: -5px; }
.avatar:first-child { margin-left: 0; }
.avatar:hover { border-color: rgba(86,212,197,.35); background: #28465a; }
.card-date { color: var(--muted-2); font-size: 11px; }
.progress { flex: 0 0 auto; height: 5px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; margin: 12px 0 11px; }
.progress > span { display: block; height: 100%; width: var(--progress, 0%); background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: inherit; }
.node-card .card-topline { margin-bottom: 5px; }
.node-card h3 { min-height: 0; font-size: 14px; line-height: 1.3; }
.node-card p { min-height: 0; margin-top: 5px; font-size: 10.5px; line-height: 1.4; }
.node-card .progress { height: 4px; margin: 6px 0; }
.node-card .card-footer { min-height: 31px; padding-top: 6px; }

.node-portal { padding: 0; background: linear-gradient(145deg, rgba(19,40,54,.98), rgba(13,28,41,.98)); }
.portal-cover { position: relative; flex: 0 0 58px; height: 58px; background: radial-gradient(circle at 20% 10%, rgba(86,212,197,.2), transparent 40%), linear-gradient(120deg, rgba(125,166,255,.16), rgba(86,212,197,.04)); border-bottom: 1px solid rgba(164,194,216,.12); }
.portal-cover::after { content: "↗"; position: absolute; right: 14px; top: 12px; color: rgba(232,248,255,.7); font-size: 17px; }
.portal-body { display: flex; flex: 1; flex-direction: column; min-height: 0; padding: 14px 14px 16px; }
.portal-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.portal-metric { padding: 8px 7px; border-radius: 9px; background: rgba(255,255,255,.035); }
.portal-metric strong { display: block; font-size: 12px; }
.portal-metric span { display: block; color: var(--muted-2); font-size: 8px; margin-top: 2px; text-transform: uppercase; letter-spacing: .08em; }
.portal-open { width: 100%; min-height: 32px; margin-top: auto; border: 1px solid rgba(86,212,197,.25); border-radius: 8px; background: linear-gradient(180deg, rgba(86,212,197,.12), rgba(86,212,197,.08)); color: #cffff8; cursor: pointer; font-size: 11px; font-weight: 800; box-shadow: inset 0 1px rgba(255,255,255,.035); }
.portal-open:hover { background: rgba(86,212,197,.15); }

.node-metric { justify-content: center; padding: 14px 14px 16px; }
.node-metric .metric-label { color: var(--muted); font-size: 10px; }
.node-metric .metric-value { font-size: 27px; font-weight: 800; letter-spacing: -.05em; margin-top: 4px; }
.node-metric .metric-delta { margin-top: 7px; font-size: 9px; color: var(--success); }

.node-note { padding: 15px 15px 19px; background: linear-gradient(180deg, rgba(43,49,33,.97), rgba(35,42,30,.98)); border-color: rgba(231,208,100,.16); box-shadow: 0 15px 34px rgba(0,0,0,.2), inset 0 -1px rgba(240,218,113,.075); }
.node-note p { -webkit-line-clamp: 3; }
.node-note .pin { color: var(--warning); margin-right: 5px; }

.node-media { background: #0f1d29; }
.media-preview { display: grid; flex: 0 0 126px; height: 126px; place-items: center; overflow: hidden; background: radial-gradient(circle at 25% 20%, rgba(86,212,197,.2), transparent 45%), linear-gradient(145deg, #172e3c, #0d1b27); }
.media-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-placeholder { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); font-size: 18px; }
.media-body { position: relative; flex: 1; min-height: 0; padding: 13px 14px 18px; background: linear-gradient(180deg, rgba(15,29,41,.97), rgba(10,24,35,.99)); }
.node-video { background: #0b1823; }
.video-embed-preview { position: relative; flex: 0 0 220px; height: 220px; overflow: hidden; border-bottom: 1px solid rgba(164,194,216,.12); background: radial-gradient(circle at 25% 15%, rgba(125,166,255,.18), transparent 42%), #071019; }
.video-embed-preview iframe { width: 100%; height: 100%; display: block; border: 0; background: #05090d; }
.video-provider { position: absolute; z-index: 2; left: 10px; top: 10px; padding: 4px 7px; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; background: rgba(5,12,18,.78); color: #e8f4fc; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; backdrop-filter: blur(8px); }
.video-provider.provider-youtube { color: #ffd9dc; border-color: rgba(255,80,95,.3); }
.video-provider.provider-vimeo { color: #ccefff; border-color: rgba(90,190,255,.3); }
.video-empty { display: grid; place-items: center; align-content: center; gap: 7px; height: 100%; color: var(--muted); text-align: center; }
.video-empty > span { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(86,212,197,.3); border-radius: 50%; background: rgba(86,212,197,.08); color: var(--accent); font-size: 17px; }
.video-empty strong { color: #dcebf5; font-size: 11px; }
.video-empty small { color: var(--muted-2); font-size: 8px; }
.video-card-body { position: relative; flex: 1; min-height: 0; padding: 14px 15px 19px; background: linear-gradient(180deg, rgba(11,24,35,.97), rgba(7,19,29,.99)); }
.video-card-body h3 { margin: 0; font-size: 14px; }
.video-card-body p { display: -webkit-box; margin: 7px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.video-url-status { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--warning); }
.video-url-status > span { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: rgba(255,200,107,.1); font-size: 9px; font-weight: 900; }
.video-url-status small { color: var(--muted-2); font-size: 8px; }
.video-url-status.is-valid { color: var(--success); }
.video-url-status.is-valid > span { background: rgba(105,222,166,.1); }

.journey-step { flex-direction: row; align-items: flex-start; gap: 11px; padding: 13px 13px 16px; }
.journey-number { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(86,212,197,.1); color: var(--accent); font-weight: 900; font-size: 11px; }
.journey-step h3 { margin: 0; font-size: 12px; }
.journey-step p { margin: 4px 0 0; font-size: 9px; color: var(--muted); line-height: 1.4; }
.journey-line { position: absolute; z-index: 2; height: 2px; background: linear-gradient(90deg, rgba(86,212,197,.28), rgba(125,166,255,.28)); transform-origin: left center; pointer-events: none; }

.timeline-node { justify-content: flex-start; padding: 12px 14px 16px; }
.timeline-node strong { display: block; font-size: 12px; }
.timeline-node span { display: block; color: var(--muted); font-size: 9px; margin-top: 5px; }
.risk-node { padding: 13px 13px 17px; border-left: 3px solid var(--danger); background: linear-gradient(180deg, rgba(35,29,38,.98), rgba(27,25,35,.99)); }
.risk-node strong { font-size: 11px; }
.risk-node p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }

.minimap { position: absolute; right: 16px; bottom: 14px; z-index: 10; width: 220px; height: 140px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(6,14,22,.86); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.minimap canvas { display: block; width: 220px; height: 140px; cursor: crosshair; }

.structured-view { position: absolute; inset: 0; overflow: auto; padding: 22px; background: radial-gradient(circle at 12% 4%, rgba(86,212,197,.06), transparent 27%), #071119; }
.board-shell { min-width: 980px; }
.board-summary { display: grid; grid-template-columns: 1.8fr repeat(3, minmax(130px, .55fr)); gap: 12px; margin-bottom: 18px; }
.summary-card { min-height: 92px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: rgba(14,29,41,.85); }
.summary-card h2 { margin: 0; font-size: 15px; }
.summary-card p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.summary-value { font-size: 25px; font-weight: 850; letter-spacing: -.04em; }
.summary-label { color: var(--muted); font-size: 9px; margin-top: 4px; text-transform: uppercase; letter-spacing: .1em; }
.board-columns { display: grid; grid-template-columns: repeat(6, minmax(210px, 1fr)); gap: 12px; align-items: start; }
.board-column { min-height: calc(100vh - 230px); padding: 11px; border: 1px solid var(--line); border-radius: 16px; background: rgba(11,24,35,.72); }
.board-column.is-dragover { border-color: rgba(86,212,197,.5); background: rgba(86,212,197,.055); }
.column-head { position: sticky; top: -1px; z-index: 4; display: flex; align-items: center; justify-content: space-between; margin: -3px -3px 7px; padding: 9px 7px 11px; border-bottom: 1px solid rgba(164,194,216,.08); background: rgba(11,24,35,.92); backdrop-filter: blur(12px); }
.column-title { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 850; }
.column-count { min-width: 22px; height: 20px; display: grid; place-items: center; border-radius: 99px; background: rgba(255,255,255,.06); color: var(--muted); font-size: 9px; }
.column-cards { display: grid; gap: 9px; }
.board-card { padding: 13px 13px 15px; border: 1px solid rgba(164,194,216,.14); border-radius: 12px; background: linear-gradient(180deg, rgba(18,35,48,.97), rgba(13,29,42,.99)); cursor: grab; box-shadow: 0 10px 22px rgba(0,0,0,.17), inset 0 -1px rgba(210,232,246,.04); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.board-card:hover { transform: translateY(-2px); border-color: rgba(164,194,216,.3); box-shadow: 0 15px 28px rgba(0,0,0,.23); }
.board-card:active { cursor: grabbing; }
.board-card.is-selected { border-color: rgba(86,212,197,.7); box-shadow: 0 0 0 3px rgba(86,212,197,.09); }
.board-card .board-label { color: var(--muted-2); font-size: 8px; text-transform: uppercase; letter-spacing: .1em; font-weight: 850; }
.board-card h3 { margin: 7px 0 0; font-size: 12px; line-height: 1.38; }
.board-card p { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.board-card-open { width: 100%; margin-top: 10px; padding: 8px 10px; border: 1px solid rgba(86,212,197,.25); border-radius: 9px; background: rgba(86,212,197,.08); color: #9ce9df; font: inherit; font-size: 9px; font-weight: 800; text-align: left; cursor: pointer; }
.board-card-open:hover { border-color: rgba(86,212,197,.5); background: rgba(86,212,197,.13); }
.board-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; padding: 10px 1px 1px; border-top: 1px solid rgba(164,194,216,.1); color: var(--muted-2); font-size: 9px; }
.priority-pill { padding: 3px 6px; border-radius: 99px; background: rgba(255,255,255,.05); }
.priority-pill.high { color: #ffc0c7; background: rgba(255,127,141,.09); }

.storyboard-shell { min-width: 1020px; }
.storyboard-hero { display: grid; grid-template-columns: 1.6fr .7fr .7fr; gap: 12px; margin-bottom: 18px; }
.storyboard-strip { display: flex; align-items: stretch; gap: 14px; min-width: max-content; padding-bottom: 16px; }
.scene-card { width: 300px; flex: 0 0 300px; border: 1px solid var(--line); border-radius: 17px; background: rgba(14,29,41,.92); overflow: hidden; cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.scene-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 18px 36px rgba(0,0,0,.24); }
.scene-card.is-selected { border-color: rgba(86,212,197,.7); box-shadow: 0 0 0 3px rgba(86,212,197,.09); }
.scene-preview { height: 168px; position: relative; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, rgba(125,166,255,.16), transparent 42%), linear-gradient(145deg, #1a3342, #0d1b27); }
.scene-number { position: absolute; left: 12px; top: 12px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(6,16,25,.78); border: 1px solid rgba(255,255,255,.13); font-size: 11px; font-weight: 900; }
.scene-shot-icon { font-size: 30px; opacity: .8; }
.scene-body { padding: 14px 14px 18px; background: linear-gradient(180deg, rgba(14,29,41,.94), rgba(10,24,35,.98)); }
.scene-body h3 { margin: 0; font-size: 13px; }
.scene-body p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.scene-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 9px; }
.storyboard-status { margin-top: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(11,24,35,.72); }
.production-track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.production-step { position: relative; padding: 12px; border-radius: 11px; background: rgba(255,255,255,.035); }
.production-step.is-done { background: rgba(105,222,166,.07); color: #cffff0; }
.production-step.is-active { background: rgba(86,212,197,.09); box-shadow: inset 0 0 0 1px rgba(86,212,197,.18); }
.production-step strong { display: block; font-size: 10px; }
.production-step span { display: block; color: var(--muted); font-size: 8px; margin-top: 4px; }

.inspector { min-width: 0; overflow-y: auto; border-left: 1px solid var(--line); background: #0a151f; padding: 18px; opacity: 1; transition: opacity .16s ease, padding .16s ease, transform .2s ease; }
.is-inspector-collapsed .inspector { overflow: hidden; padding: 0; border-left: 0; opacity: 0; pointer-events: none; }
.inspector-empty { min-height: 100%; display: grid; place-content: center; text-align: center; color: var(--muted); padding: 24px; }
.empty-icon { width: 46px; height: 46px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--accent); font-size: 21px; }
.inspector-empty h2 { color: var(--text); font-size: 14px; margin: 0; }
.inspector-empty p { max-width: 230px; font-size: 11px; line-height: 1.55; margin: 8px auto 0; }
.inspector-head { position: sticky; top: -18px; z-index: 5; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: -18px -18px 0; padding: 18px 18px 15px; border-bottom: 1px solid var(--line); background: rgba(10,21,31,.94); backdrop-filter: blur(14px); }
.inspector-head .eyebrow { color: var(--accent); }
.inspector-head h2 { margin: 5px 0 0; font-size: 16px; line-height: 1.35; }
.inspector-section { padding: 16px 0; border-bottom: 1px solid var(--line); }
.inspector-section:last-child { border-bottom: 0; }
.inspector-section h3 { margin: 0 0 10px; font-size: 10px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .11em; }
.field { display: grid; gap: 6px; margin-top: 11px; }
.field:first-child { margin-top: 0; }
.field > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.field input, .field textarea, .field select {
    width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.035); color: var(--text); padding: 9px 10px; outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: rgba(86,212,197,.42); box-shadow: 0 0 0 3px rgba(86,212,197,.07); }
.field textarea { resize: vertical; min-height: 76px; line-height: 1.5; }
.field small { color: var(--muted-2); font-size: 9px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inspector-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.connection-route { display: grid; grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr); align-items: center; gap: 7px; }
.connection-route > div { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); }
.connection-route span, .connection-route strong { display: block; }
.connection-route > div span { color: var(--muted-2); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.connection-route > div strong { overflow: hidden; margin-top: 4px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.connection-route-arrow { color: var(--connection-color, var(--accent)); text-align: center; font-size: 20px; }
.connection-description-toggle { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); cursor: pointer; }
.connection-description-toggle input { margin-top: 2px; accent-color: var(--accent); }
.connection-description-toggle strong, .connection-description-toggle small { display: block; }
.connection-description-toggle strong { font-size: 10px; }
.connection-description-toggle small { margin-top: 4px; color: var(--muted-2); font-size: 9px; line-height: 1.4; }
.membership-card { display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px dashed var(--line-strong); border-radius: 11px; background: rgba(255,255,255,.025); }
.membership-card.is-linked { border-style: solid; border-color: rgba(86,212,197,.24); background: rgba(86,212,197,.055); }
.membership-icon { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.04); color: var(--muted); font-size: 18px; }
.membership-card.is-linked .membership-icon { background: rgba(86,212,197,.1); color: var(--accent); }
.membership-card strong, .membership-card small { display: block; }
.membership-card strong { font-size: 11px; }
.membership-card small { margin-top: 4px; color: var(--muted-2); font-size: 9px; line-height: 1.4; }
.region-count { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid rgba(125,166,255,.18); border-radius: 11px; background: rgba(125,166,255,.05); }
.owner-badge-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.owner-badge-picker button { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 43px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); color: var(--text); padding: 6px 8px; text-align: left; cursor: pointer; transition: .15s ease; }
.owner-badge-picker button:hover { border-color: var(--line-strong); background: rgba(255,255,255,.055); }
.owner-badge-picker button.is-selected { border-color: rgba(86,212,197,.4); background: rgba(86,212,197,.085); box-shadow: inset 0 0 0 1px rgba(86,212,197,.04); }
.owner-badge-picker button > span { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid rgba(164,194,216,.14); border-radius: 50%; background: #203a4d; color: #dcf1ff; font-size: 9px; font-weight: 900; }
.owner-badge-picker button.is-selected > span { border-color: rgba(86,212,197,.3); background: rgba(86,212,197,.16); color: #d9fff9; }
.owner-badge-picker button small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.selected-owner-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 27px; margin-top: 11px; }
.selected-owner-list > small { align-self: center; color: var(--muted-2); font-size: 9px; }
.selected-owner-list button { display: inline-flex; align-items: center; gap: 7px; height: 27px; border: 1px solid rgba(125,166,255,.2); border-radius: 99px; background: rgba(125,166,255,.07); color: #d9e5ff; padding: 0 8px 0 10px; cursor: pointer; font-size: 9px; font-weight: 850; }
.selected-owner-list button:hover { border-color: rgba(255,127,141,.32); background: rgba(255,127,141,.08); color: #ffc6cc; }
.selected-owner-list button i { font-style: normal; font-size: 13px; line-height: 1; }
.custom-owner-row { display: grid; grid-template-columns: 84px 1fr; gap: 7px; margin-top: 10px; }
.custom-owner-row input, .custom-owner-row button { height: 36px; border: 1px solid var(--line); border-radius: 9px; }
.custom-owner-row input { min-width: 0; outline: 0; background: rgba(255,255,255,.035); color: var(--text); padding: 0 10px; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.custom-owner-row input:focus { border-color: rgba(86,212,197,.42); box-shadow: 0 0 0 3px rgba(86,212,197,.07); }
.custom-owner-row button { background: rgba(86,212,197,.08); color: #cffff8; cursor: pointer; font-size: 9px; font-weight: 850; }
.custom-owner-row button:hover { border-color: rgba(86,212,197,.35); background: rgba(86,212,197,.13); }
.owner-badge-help { margin: 8px 0 0; color: var(--muted-2); font-size: 8px; line-height: 1.45; }
.region-count strong { display: grid; place-items: center; min-width: 38px; height: 38px; border-radius: 10px; background: rgba(125,166,255,.1); color: #c8d8ff; font-size: 18px; }
.region-count span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.stat-box { padding: 10px; border-radius: 10px; background: rgba(255,255,255,.035); }
.stat-box strong { display: block; font-size: 14px; }
.stat-box span { display: block; margin-top: 3px; color: var(--muted-2); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.open-project-button { width: 100%; height: 38px; border: 1px solid rgba(86,212,197,.22); border-radius: 10px; background: rgba(86,212,197,.1); color: #d1fff9; cursor: pointer; font-weight: 800; }
.open-project-button:hover { background: rgba(86,212,197,.16); }
.delete-button { width: 100%; height: 34px; border: 1px solid rgba(255,127,141,.2); border-radius: 9px; background: rgba(255,127,141,.06); color: #ffc2c9; cursor: pointer; }
.delete-button:hover { background: rgba(255,127,141,.1); }
.checklist { display: grid; gap: 8px; }
.check-item { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.check-item input { margin-top: 2px; accent-color: var(--accent); }

.toast { position: fixed; left: 50%; bottom: 26px; z-index: 100; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(12,25,36,.96); color: var(--text); box-shadow: var(--shadow); transition: .2s ease; font-size: 11px; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.modal-backdrop { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 20px; background: rgba(2,8,13,.72); backdrop-filter: blur(10px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 18px; background: #0d1a26; box-shadow: 0 35px 90px rgba(0,0,0,.5); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 4px 0 0; font-size: 18px; }
.eyebrow { color: var(--muted-2); font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .12em; }
.modal-form { padding: 20px; }
.item-type-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.item-type-grid[hidden] { display: none; }
.type-option { position: relative; min-height: 92px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); cursor: pointer; }
.type-option:hover, .type-option.is-selected { border-color: rgba(86,212,197,.38); background: rgba(86,212,197,.06); }
.type-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-icon { display: block; color: var(--accent); font-size: 18px; margin-bottom: 8px; }
.type-option strong { display: block; font-size: 11px; }
.type-option small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 9px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

.search-overlay { position: absolute; left: 50%; top: 18px; z-index: 40; width: min(570px, calc(100% - 40px)); transform: translateX(-50%); border: 1px solid var(--line-strong); border-radius: 15px; background: rgba(11,24,35,.98); box-shadow: var(--shadow); overflow: hidden; }
.search-input-wrap { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.search-symbol { color: var(--accent); font-size: 19px; }
.search-input-wrap input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.search-results { max-height: 330px; overflow-y: auto; padding: 6px; }
.search-result { display: flex; justify-content: space-between; gap: 14px; width: 100%; border: 0; border-radius: 9px; background: transparent; color: var(--text); text-align: left; padding: 9px 10px; cursor: pointer; }
.search-result:hover, .search-result:focus-visible { background: rgba(255,255,255,.065); }
.search-result-meta { display: grid; justify-items: end; gap: 2px; color: var(--muted-2); font-size: 9px; }
.search-result-meta em { color: var(--accent); font-style: normal; text-transform: uppercase; letter-spacing: .06em; }

@media (max-width: 1180px) {
    :root { --sidebar-width: 214px; --inspector-width: 300px; }
    .topbar { padding-left: 15px; }
    .canvas-hint { display: none; }
    .view-meta { display: none; }
}

@media (max-width: 900px) {
    :root { --sidebar-width: 74px; --inspector-width: 280px; }
    .app-shell.is-sidebar-collapsed { grid-template-columns: var(--sidebar-width) 1fr; }
    .sidebar-toggle { display: none; }
    .brand > div:last-child, .nav-item span:last-child, .sidebar-section, .sidebar-footer small { display: none; }
    .brand { justify-content: center; padding-inline: 0; }
    .nav-item { justify-content: center; }
    .nav-icon { width: auto; }
    .primary-button { padding: 0 10px; }
    .login-screen { padding: 24px; overflow-y: auto; }
    .login-layout { grid-template-columns: 1fr; gap: 38px; padding: 65px 0; }
    .login-manifesto { max-width: 720px; }
    .login-panel { width: min(480px, 100%); }
}

@media (max-width: 760px) {
    :root { --sidebar-width: 64px; --topbar-height: 68px; }
    .workspace-shell, .workspace-shell.is-inspector-collapsed { grid-template-columns: minmax(0, 1fr); }
    .inspector { position: absolute; z-index: 30; inset: 0 0 0 auto; width: min(360px, calc(100% - 16px)); box-shadow: -24px 0 60px rgba(0,0,0,.42); }
    .is-inspector-collapsed .inspector { transform: translateX(100%); }
    .title-row h1 { font-size: 16px; }
    .view-badge { display: none; }
    .toolbar-label, .toolbar-button kbd { display: none; }
    .toolbar-button { width: 38px; justify-content: center; padding: 0; }
    .segmented-control .fit-view { display: none; }
    .canvas-hint { display: none; }
    .minimap { right: 10px; bottom: 10px; transform: scale(.82); transform-origin: right bottom; }
    .form-row { grid-template-columns: 1fr; }
    .item-type-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
    .topbar { gap: 8px; padding-inline: 10px; }
    .breadcrumbs { display: none; }
    .new-item-label { display: none; }
    .primary-button { width: 38px; justify-content: center; padding: 0; font-size: 17px; }
    .segmented-control { display: none; }
    .item-type-grid { grid-template-columns: 1fr 1fr; }
    .login-screen { display: grid; place-items: center; padding: 20px 18px; }
    .splash-map { width: 250px; height: 160px; transform: scale(.86); margin-bottom: 4px; }
    .splash-stage h1 { font-size: clamp(50px, 16vw, 72px); }
    .splash-stage > p { max-width: 330px; font-size: 13px; line-height: 1.55; }
    .splash-powered { bottom: 20px; }
    .login-brand { position: relative; z-index: 2; }
    .login-layout { display: block; padding: 76px 0 54px; }
    .login-manifesto h1 { font-size: clamp(41px, 13vw, 60px); }
    .login-manifesto > p { font-size: 13px; }
    .login-signal { margin-top: 25px; }
    .login-panel { margin-top: 45px; padding: 20px; }
    .login-options { align-items: flex-start; flex-direction: column; }
    .login-footer { padding-top: 20px; flex-direction: column; gap: 7px; }
    .connection-guide { top: 8px; width: calc(100% - 18px); min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
