/* ELYNDRA / Art direction 2026.10: preserve original logic, update presentation only */
:root{--bg:#070e19;--bg2:#0c1727;--panel:rgba(12,23,39,.88);--panel2:rgba(9,19,33,.96);--line:rgba(144,195,226,.18);--line2:rgba(165,131,255,.18);--cyan:#90dff1;--violet:#b1a0ef;--gold:#edce90;--mint:#77dfc0;--text:#edf4fb;--muted:#9aafc8;--sidebar:248px;--shadow:0 15px 45px rgba(0,0,0,.24)}
html{scrollbar-color:#38566f #0b1727}body{font-size:14px;line-height:1.52;letter-spacing:.005em}
.arcane-bg{background:radial-gradient(ellipse at 56% 7%,rgba(40,79,106,.24),transparent 48%),radial-gradient(ellipse at 93% 48%,rgba(89,66,120,.16),transparent 50%),linear-gradient(160deg,#08121f,#060d18 62%,#07101b)}
.arcane-bg::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#07101b 5%,rgba(6,14,25,.83) 50%,rgba(6,14,25,.64)),url('../assets/elyndra-world-atlas.webp') center 6%/cover no-repeat;opacity:.26;filter:saturate(.82);animation:bgbreathe 28s ease-in-out infinite alternate;pointer-events:none}
.arcane-bg .stars{z-index:2;opacity:.27;animation:starlift 120s linear infinite}
@keyframes starlift{to{background-position:23px -420px,60px -340px}}@keyframes bgbreathe{to{transform:scale(1.045);opacity:.34}}
.shell{height:100dvh;min-height:580px;overflow:hidden;grid-template-columns:var(--sidebar) minmax(0,1fr)}
.sidebar{height:100dvh;padding:23px 14px 16px;background:linear-gradient(175deg,rgba(8,18,30,.96),rgba(7,13,24,.95));border-right:1px solid rgba(184,206,232,.12);box-shadow:10px 0 40px rgba(0,0,0,.12)}
.brand{padding-bottom:20px;border-bottom:1px solid rgba(160,195,226,.11);margin-bottom:12px}.sigil{width:44px;height:44px;border-radius:14px;color:var(--gold);border-color:rgba(232,195,131,.3);background:radial-gradient(circle,rgba(222,191,125,.20),rgba(67,116,160,.08) 72%);font-size:21px;box-shadow:0 0 38px rgba(153,183,232,.06)}
.brand-title{font-size:17px;letter-spacing:.16em;font-family:Georgia,serif}.brand-sub{font-size:10px;letter-spacing:.15em;color:#8c9fba}
.nav{flex:1;gap:6px;overflow-y:auto;padding:1px 4px 22px 0;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-color:#36536d transparent;scrollbar-width:thin}
.nav-home-link{display:flex;align-items:center;gap:10px;padding:11px 13px 14px;font-size:12px;text-decoration:none;color:#b3c9dc;border-bottom:1px solid rgba(144,188,230,.1);margin-bottom:9px}.nav-home-link small{margin-left:auto;color:#607e9b}.nav-home-link:hover{color:#e5d19f}
.nav-item{font-size:12px;gap:11px;padding:11px 12px;min-height:42px;border:1px solid transparent;border-radius:10px;color:#acbfd0}.nav-item b{font-size:12px;letter-spacing:.01em}.nav-item span{font-size:17px;color:#7eacc6}.nav-item.active{border-color:rgba(120,206,238,.27);color:#f5f9ff;background:linear-gradient(90deg,rgba(82,171,207,.17),rgba(41,71,106,.08));box-shadow:inset 3px 0 0 #92dcf2}.nav-item:hover{border-color:rgba(137,190,226,.16)}
.nav-group{margin-top:12px}.nav-group-trigger{background:transparent;border:0;width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1px 10px;padding:8px 12px;cursor:pointer;text-align:left;color:#d0ddec}.nav-group-trigger span{grid-column:1;font-size:9px;font-weight:700;letter-spacing:.14em;color:#7893a9}.nav-group-trigger b{grid-column:1;font-size:11px;font-weight:600;margin-top:1px}.nav-group-trigger i{grid-column:2;grid-row:1/3;align-self:center;color:#9aaebf;transition:transform .24s;font-style:normal}.nav-group:not(.open) .nav-group-trigger i{transform:rotate(-90deg)}.nav-group-items{display:grid;grid-template-rows:1fr;transition:grid-template-rows .25s;min-height:0}.nav-group-items>.nav-item{margin:2px 0}.nav-group:not(.open) .nav-group-items{display:none}
.sidebar-foot{padding:14px 4px 0}.sidebar-foot-copy strong{font-size:11px}.sidebar-foot-copy span{font-size:10px}.sidebar-foot .health-dot{background:#adbfcc;color:#adbfcc;box-shadow:0 0 10px #7f99b7}
.main{height:100dvh;overflow-y:auto;overflow-x:hidden;padding:0 clamp(16px,2.4vw,36px) 48px;scrollbar-color:#38556d transparent;scrollbar-gutter:stable;scrollbar-width:thin}
.topbar{min-height:80px;padding:15px 0 12px;background:linear-gradient(180deg,rgba(8,16,29,.98),rgba(8,16,29,.90) 83%,rgba(8,16,29,.72));backdrop-filter:blur(20px);border-bottom:1px solid rgba(140,188,226,.09)}
.eyebrow{font-size:10px;color:#9bb5c9;letter-spacing:.15em}.top-title{font-size:21px;font-weight:600;letter-spacing:.005em}.top-badge{font-size:10px;padding:4px 9px}.top-actions{gap:8px}.global-search{background:rgba(13,29,46,.8);border-color:rgba(138,183,219,.18);height:40px;min-width:245px;border-radius:12px}.global-search input{font-size:12px}.auth-user-chip{max-width:140px}
.context-bar{display:flex;justify-content:space-between;align-items:center;gap:18px;min-height:54px;padding:11px 0 12px;margin-bottom:7px;border-bottom:1px solid rgba(138,176,206,.10)}.context-breadcrumb{font-size:11px;color:#8298b4;white-space:nowrap}.context-breadcrumb span{margin:0 8px;color:#586f88}.context-tabs{display:flex;align-items:center;justify-content:flex-end;gap:5px;flex-wrap:wrap}.context-tabs button{border:1px solid transparent;color:#859db4;padding:7px 11px;background:transparent;cursor:pointer;border-radius:9px;font-size:11px;white-space:nowrap}.context-tabs button:hover{border-color:var(--line);color:#e8f5ff}.context-tabs button.active{background:rgba(117,196,229,.12);border-color:rgba(117,196,229,.25);color:#e5f7ff}
.glass,.panel{background:linear-gradient(150deg,rgba(16,30,47,.89),rgba(9,19,33,.90));border-color:rgba(148,187,221,.15);box-shadow:0 14px 38px rgba(0,0,0,.20);backdrop-filter:blur(18px)}.panel{padding:clamp(18px,2vw,25px);border-radius:18px}.panel-head h2{font-size:17px;letter-spacing:.004em}.panel-head small,.page-head span{font-size:10px;color:#80a5be}.page-head{margin:17px 0 22px;align-items:center}.page-head h1{font-size:27px;letter-spacing:-.015em;margin:5px 0 6px}.page-head p{font-size:13px;color:#9bb0c6;line-height:1.6;max-width:800px}
.hero{min-height:255px;padding:34px 36px;align-items:stretch;background:rgba(9,21,36,.9);isolation:isolate;border-radius:22px}.hero::before{background:linear-gradient(90deg,#0c1c2e 0%,rgba(10,22,36,.96) 33%,rgba(8,20,35,.30) 75%,rgba(8,20,35,.48) 100%);z-index:-1}.hero-scenery{position:absolute;inset:0;z-index:-2;background:url('../assets/elyndra-world-atlas.webp') 75% 45%/cover no-repeat;opacity:.89;animation:landscapePan 30s ease-in-out infinite alternate}.hero .hero-glow{opacity:.28}.hero .world-core{opacity:.5}.hero h1{font-family:Georgia,'Noto Sans SC',serif;font-weight:500;font-size:42px;letter-spacing:.02em;margin:20px 0 12px;line-height:1.13}.hero h1 .hero-chinese{font-family:'Noto Sans SC',sans-serif;font-size:.67em;letter-spacing:.08em;margin-left:8px}.hero-kicker{letter-spacing:.2em;color:#cde2ed;font-size:10px}.hero p{font-size:14px;line-height:1.65;max-width:450px;color:#b9cfdf}.hero-time{align-self:flex-end}.hero-time strong{font-size:22px}.hero-time span{font-size:10px}.hero-time small{font-size:11px}.hero-copy{align-self:center;max-width:65%}
@keyframes landscapePan{to{background-position:88% 51%;transform:scale(1.035)}}
.metric-grid{gap:14px;margin-top:16px}.metric{min-height:102px;padding:17px 19px;border-radius:15px}.metric small{font-size:10px;color:#8da3ba}.metric strong{font-size:18px;margin-top:6px}.metric em{font-size:10px;color:#718ca6;margin-top:3px}.metric-icon{width:45px;height:45px;flex-basis:45px}
.npc-directory-spotlight{margin-top:15px!important;min-height:125px!important;background:linear-gradient(105deg,rgba(14,37,48,.96),rgba(15,28,44,.96)),url('../assets/worldtree.webp') right 35%/280px auto no-repeat}
.system-flux[hidden]{display:none!important}.world-os-grid{margin-top:15px}.observatory{position:relative;overflow:hidden}.observatory::before{content:'';position:absolute;inset:0;background:url('../assets/worldtree.webp') 51% 40%/cover no-repeat;opacity:.085;pointer-events:none}.obs-empire{background-color:rgba(9,19,32,.96)!important;background-size:cover!important;background-blend-mode:soft-light!important}.obs-amaterasu{background-image:linear-gradient(120deg,rgba(11,31,52,.85),rgba(8,19,29,.65)),url('../assets/amaterasu.webp')!important}.obs-stellar{background-image:linear-gradient(120deg,rgba(15,30,46,.85),rgba(8,19,29,.65)),url('../assets/stellar.webp')!important}.obs-lunar{background-image:linear-gradient(120deg,rgba(33,26,42,.8),rgba(9,19,29,.7)),url('../assets/lunar.webp')!important}
.btn{font-size:12px;min-height:39px;letter-spacing:.01em;border-radius:10px;padding:10px 14px}.btn-primary{background:linear-gradient(120deg,#72c3df,#7a92ce);color:#051525;border-color:rgba(160,217,236,.24);box-shadow:0 6px 20px rgba(33,115,170,.16);font-weight:700}.btn-primary:hover{filter:brightness(1.1)}.btn-danger{border-color:rgba(237,144,157,.3);color:#efb8be}.pill{font-size:10px;padding:6px 10px}.chip{font-size:11px;padding:8px 12px;border-radius:10px;color:#a4b8ca}.chip.active{color:#ecf9ff;background:rgba(81,163,201,.13)}
/* Larger data presentation and distinct scrollable windows */
.table-wrap,.lib-table-wrap{max-height:65dvh;min-height:260px;overflow:auto;scrollbar-width:thin;scrollbar-color:#537b9b #11243a;border:1px solid var(--line);border-radius:13px;overscroll-behavior:contain}.table-wrap>table,.lib-table-wrap>table{min-width:790px}.table-wrap th,.lib-table-wrap th{position:sticky;top:0;background:#17293e!important;z-index:2;white-space:nowrap}.table-wrap td,.lib-table-wrap td{padding:14px 13px;font-size:12px}.table-wrap th,.lib-table-wrap th{padding:13px 12px;font-size:11px}.table-title{font-size:12px;max-width:450px}.table-sub{font-size:10px;max-width:450px}.mono{font-size:11px}.record b{font-size:12px}.record small{font-size:10px}.record .record-time{font-size:11px}.agenda-entry b{font-size:12px}.agenda-entry span{font-size:10px}.agenda-entry p{font-size:11px}.agenda-column{padding:20px}.agenda-column h2{font-size:15px}
#capabilityGrid{max-height:70dvh;min-height:390px;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#486d86 #122238;scrollbar-width:thin;padding:3px 9px 12px 1px;align-content:start}.cap-card{padding:16px}.cap-card h3{font-size:12px}.cap-card .domain{font-size:10px}.cap-card .meta small{font-size:10px}.cap-card .meta b{font-size:11px}.cap-card .meta div{padding:10px}
/* GM console: wide workspace, taller editor, fixed actions and internal scroll */
.gm-layout{grid-template-columns:218px minmax(0,1fr);gap:16px;align-items:start}.gm-palette{position:sticky;top:143px;padding:12px;max-height:calc(100dvh - 166px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:#426785 #142239}.gm-palette-title{font-size:10px;color:#a2b6cd;letter-spacing:.13em;padding:7px 10px 12px;border-bottom:1px solid var(--line);margin-bottom:7px}.gm-command{padding:12px 10px;min-height:52px;border-radius:10px;gap:9px;grid-template-columns:27px minmax(0,1fr)}.gm-command b{font-size:12px}.gm-command small{font-size:10px;margin-top:4px}.gm-command.active{border-color:rgba(120,207,235,.26);background:rgba(75,156,196,.12)}.gm-builder{min-width:0;padding:21px 24px!important}.gm-form{gap:15px 16px}.field label{font-size:12px;line-height:1.4;color:#bdccdc}.field label em{font-size:10px}.field input,.field select,.field textarea{font-size:13px;min-height:45px;padding:12px 13px;background:rgba(6,16,28,.7);border-color:rgba(139,179,215,.23)}.field input:focus,.field textarea:focus,.field select:focus{outline:1px solid rgba(122,208,238,.66);border-color:rgba(122,208,238,.46)}.gm-common{grid-template-columns:minmax(155px,.35fr) minmax(0,1fr);gap:12px;margin-top:13px;padding-top:15px}.gm-common textarea{min-height:66px}.gm-builder.gm-npc-inner-scroll{height:calc(100dvh - 177px)!important;min-height:540px!important;max-height:none!important;min-width:0;padding:19px 23px!important}.gm-builder.gm-npc-inner-scroll>.panel-head{padding-bottom:12px;margin-bottom:0;border-bottom:1px solid rgba(141,185,219,.16)}.gm-builder.gm-npc-inner-scroll>#gmForm.npc-editor-form{padding:19px 13px 15px 2px!important;scrollbar-width:auto!important;scrollbar-color:#5c96b7 #14263c!important}.gm-builder.gm-npc-inner-scroll>#gmForm::-webkit-scrollbar{width:12px}.gm-builder.gm-npc-inner-scroll>.gm-common{gap:15px;padding-top:14px}.gm-builder.gm-npc-inner-scroll>.gm-actions{padding:11px 0 0;margin-top:8px}.gm-builder.gm-npc-inner-scroll>.notice{font-size:11px;padding:8px 11px;margin-top:8px}.npc-create-section{padding:21px 22px;margin:0 0 17px;border-color:rgba(130,178,216,.18);background:rgba(9,24,39,.65)}.npc-create-section-head{padding:2px 0 17px}.npc-create-section-head h3{font-size:16px}.npc-create-fields{gap:16px 18px}.npc-editor-note{line-height:1.65;font-size:12px!important;border-color:rgba(68,157,196,.45)!important;background:rgba(27,80,106,.21)!important}.npc-create-fields label{font-size:12px!important}
.npc-tabs{display:flex;gap:10px;overflow-x:auto;flex-wrap:nowrap;padding-bottom:9px;scrollbar-width:thin}.npc-tabs .chip{flex:0 0 auto;min-width:118px}.npc-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;max-height:66dvh;min-height:220px;overflow-y:auto;overscroll-behavior:contain;padding:3px 10px 8px 2px;scrollbar-color:#416982 #122138;scrollbar-width:thin}.npc-card{padding:16px;grid-template-columns:50px minmax(0,1fr) 30px}.npc-avatar{width:48px;height:48px}.npc-top b{font-size:14px}.npc-id{font-size:10px}.npc-meta span{font-size:10px}.npc-pipeline{gap:9px}.npc-pipeline b{font-size:12px}.npc-pipeline small{font-size:10px}#npcSocialRelationsList,#knowledgeList,#lifeGrid{max-height:72dvh;min-height:310px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#416982 #122138;padding-right:9px;overscroll-behavior:contain}
.modal-backdrop{padding:24px}.modal{width:min(1100px,96vw);max-height:min(91dvh,1040px);display:flex;flex-direction:column}.modal-head{flex:0 0 auto;padding:21px 25px}.modal-head h2{font-size:21px}.modal-body{flex:1;min-height:0;max-height:none;padding:24px 27px;overflow:auto;font-size:13px;scrollbar-color:#486b86 #14263e}.modal-body pre{font-size:12px;line-height:1.65}.modal-foot{padding:14px 24px}.tool-drawer{width:min(950px,96vw);background:linear-gradient(155deg,rgba(13,26,44,.99),rgba(7,17,29,.99))}.tool-drawer-head{padding:23px 27px}.tool-drawer-head h2{font-size:22px}.tool-drawer-body{padding:24px 28px;font-size:13px;scrollbar-color:#517892 #11253a}.toast{font-size:12px}.mini-search{max-width:430px;min-width:260px;padding:10px 12px}.mini-search input{font-size:12px}.npc-runtime-evidence{font-size:12px;padding:13px 15px}
/* Hover focus and keyboard affordances */
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #91d8ef;outline-offset:3px}a{color:inherit}input,button,textarea,select{touch-action:manipulation}
body.motion-off .hero-scenery,body.motion-off .arcane-bg::after,body.motion-off .arcane-bg .stars{animation:none!important}
body.light .arcane-bg::after{opacity:.09}body.light .sidebar{background:rgba(242,246,250,.97)}body.light .glass,body.light .panel{background:rgba(255,255,255,.88)}body.light .topbar{background:rgba(247,251,255,.96)}body.light .nav-group-trigger{color:#334965}body.light .context-bar{background:transparent}body.light .hero{color:#eaf3ff}body.light .hero p{color:#d9e6f1}
@media(max-width:1250px){.top-actions .global-search{display:none}.hero h1{font-size:36px}.gm-layout{grid-template-columns:185px minmax(0,1fr)}.gm-palette{padding:9px}.gm-command b{font-size:11px}.context-tabs button{padding:7px 8px}}
@media(max-width:1020px){.context-bar{align-items:flex-start;flex-direction:column;gap:6px}.context-tabs{justify-content:flex-start}.gm-layout{grid-template-columns:190px minmax(0,1fr)}.gm-builder.gm-npc-inner-scroll{height:calc(100dvh - 206px)!important;min-height:490px!important}.hero-copy{max-width:75%}.npc-grid{grid-template-columns:1fr}}
@media(max-width:820px){.shell{height:auto;min-height:100dvh;overflow:visible;display:block}.sidebar{position:fixed;left:0;top:0;width:275px;height:100dvh;transform:translateX(-101%);transition:transform .25s;z-index:31}.sidebar.mobile-open{transform:none}.main{height:auto;overflow:visible;padding:0 17px 40px}.topbar{min-height:70px;gap:8px}.context-bar{padding:8px 0;min-height:46px}.hero{min-height:220px;padding:24px}.hero-copy{max-width:90%}.hero h1{font-size:31px}.hero-time{align-self:flex-end}.gm-layout{grid-template-columns:1fr}.gm-palette{position:static;max-height:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.gm-palette-title{grid-column:1/-1}.gm-command{margin:0;padding:10px;min-height:62px}.gm-builder.gm-npc-inner-scroll{height:76dvh!important;min-height:530px!important}.npc-grid{grid-template-columns:1fr}.tool-drawer{width:min(820px,96vw)}.top-actions .btn{display:none}}
@media(max-width:580px){.hero h1{font-size:26px}.hero h1 .hero-chinese{display:block;margin:8px 0 0}.hero-time{align-self:flex-start;text-align:left}.metric-grid,.metric-grid.small{grid-template-columns:1fr 1fr}.metric{padding:12px;min-height:85px}.metric strong{font-size:15px}.metric-icon{display:none}.page-head h1{font-size:23px}.gm-palette{grid-template-columns:repeat(2,minmax(0,1fr))}.gm-builder.gm-npc-inner-scroll{height:81dvh!important;min-height:490px!important;padding:14px!important}.gm-builder.gm-npc-inner-scroll>.gm-common{grid-template-columns:1fr}.gm-builder.gm-npc-inner-scroll>.notice{display:none}.gm-builder.gm-npc-inner-scroll>.gm-actions .btn{white-space:normal;min-height:43px}.npc-create-fields{grid-template-columns:1fr}.npc-create-section{padding:14px}.context-breadcrumb{display:none}.panel{padding:15px}.modal-backdrop{padding:9px}.modal-body{padding:16px}.npc-detail-columns{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.hero-scenery,.arcane-bg::after,.arcane-bg .stars{animation:none!important}}

/* Final workstation fit: footer stays visible while only the editor scrolls. */
@media(min-width:821px){.gm-builder.gm-npc-inner-scroll{height:calc(100dvh - 309px)!important;min-height:535px!important}}
.gm-relationship-evidence[hidden]{display:none!important}
.shell.collapsed{--sidebar:76px}.shell.collapsed .nav-home-link span,.shell.collapsed .nav-home-link small,.shell.collapsed .nav-group-trigger b,.shell.collapsed .nav-group-trigger span,.shell.collapsed .nav-group-trigger i{display:none}.shell.collapsed .nav-group-trigger{height:9px;padding:0;border-top:1px solid rgba(145,188,212,.2);margin:5px 11px}.shell.collapsed .nav-group:not(.open) .nav-group-items{display:grid}.shell.collapsed .nav-item{justify-content:center;padding:10px 0}.shell.collapsed .nav-item span{flex:0 0 auto;width:auto}.shell.collapsed .nav-item b{display:none}.shell.collapsed .nav-home-link{justify-content:center;padding:10px}.shell.collapsed .sidebar{padding:17px 8px}
