@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');:root{color-scheme:dark;--bg:#080c16;--panel:#111927;--line:#35445c;--muted:#a6b8cc;--text:#f4f7ff}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);font-family:'Space Grotesk',Arial,sans-serif;color:var(--text)}button{font:inherit;cursor:pointer}.ambient{position:fixed;inset:0;z-index:-1;background:radial-gradient(ellipse at 50% 16%,#21364c75,transparent 55%),linear-gradient(135deg,#03050d,#0b1421 55%,#090813)}.top{max-width:1280px;margin:auto;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:26px 28px;border-bottom:1px solid #52647a55;font-family:Rajdhani,sans-serif;letter-spacing:.13em;font-weight:700}.top a,footer a{color:#e7eef9;text-decoration:none}.network{color:#9eb2ca;font-size:13px}.pulse{display:inline-block;background:#76e0bf;border-radius:50%;width:6px;height:6px;box-shadow:0 0 8px #76e0bf}.access{color:#b6ccdf;font-size:13px}main{max-width:1280px;margin:auto;padding:0 28px}.intro{text-align:center;padding:65px 0 12px}.overline,.eyebrow,.directory-no{color:#8aa5c4;letter-spacing:.2em;font:700 13px Rajdhani,sans-serif}.intro h1{font:700 clamp(40px,6.3vw,82px)/.98 Rajdhani,sans-serif;letter-spacing:.025em;margin:16px 0}.intro h1 span{background:linear-gradient(95deg,#e7e7fa,#92b8e1 30%,#b9aff3 55%,#b7f1df);background-clip:text;color:transparent}.subtitle{color:#b8c6d7;max-width:650px;margin:0 auto;line-height:1.65}.hero{position:relative;text-align:center;min-height:560px;display:flex;align-items:center;flex-direction:column;justify-content:end;padding:20px 0 30px;overflow:hidden}.hero-lines{pointer-events:none;position:absolute;inset:8% 13% 0;border:1px solid #4b65873d;border-radius:50%;box-shadow:0 0 0 56px #3b57710c,0 0 0 125px #58617d08}.mainframe-frame{position:relative;width:min(480px,86vw);height:395px;display:flex;justify-content:center;align-items:center;filter:drop-shadow(0 0 26px #4a64a344)}.mainframe-figure{max-width:100%;max-height:100%;object-fit:contain;animation:glitch-shift 9s infinite;will-change:transform}.mainframe-frame:before,.mainframe-frame:after{content:'';position:absolute;inset:5% 0;background:center/contain no-repeat url('assets/mainframe-denied.png');pointer-events:none;opacity:0;mix-blend-mode:screen}.mainframe-frame:before{filter:hue-rotate(65deg);animation:ghost-a 11s infinite}.mainframe-frame:after{filter:hue-rotate(245deg);animation:ghost-b 11s infinite}.scan{position:absolute;inset:2% 0;background:repeating-linear-gradient(180deg,transparent 0 5px,#a6eff707 6px 7px);opacity:.3;pointer-events:none;mix-blend-mode:screen}@keyframes glitch-shift{0%,12%,12.5%,40%,40.3%,72%,72.5%,100%{transform:translate(0)}12.2%{transform:translate(-5px,1px)}40.15%{transform:translate(3px,-2px)}72.2%{transform:translate(-2px,2px)}}@keyframes ghost-a{0%,12%,12.7%,40%,40.5%,72%,72.7%,100%{opacity:0;transform:translateX(0)}12.3%,40.2%,72.3%{opacity:.5;transform:translateX(5px)}}@keyframes ghost-b{0%,12%,12.7%,40%,40.5%,72%,72.7%,100%{opacity:0;transform:translateX(0)}12.3%,40.2%,72.3%{opacity:.45;transform:translateX(-5px)}}.terminal{position:relative;width:min(760px,100%);background:#0b1420ed;border:1px solid #54708b99;box-shadow:0 12px 60px #0007,0 0 22px #9ce1fc14;text-align:left;padding:0 24px 18px;border-radius:9px}.terminal-bar{display:flex;align-items:center;gap:10px;border-bottom:1px solid #3b5065;padding:15px 0 10px;font:700 14px Rajdhani,sans-serif;letter-spacing:.12em}.terminal-bar small{margin-left:auto;color:#9cb5c9}.light{border-radius:50%;width:7px;height:7px;background:#a9bce9;box-shadow:0 0 10px #a9bce9}.terminal-line{font-size:clamp(16px,2vw,20px);line-height:1.55;color:#e7f2ff;min-height:62px}.terminal-foot{display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px;font:600 12px Rajdhani,sans-serif;letter-spacing:.1em;color:#8da8c4}.terminal-foot b{color:#dbe9f9}.catalogue,.clearance{padding:75px 0 40px}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:22px}.section-heading h2,.clearance h2,.directory-display h2{font:700 clamp(28px,4vw,48px) Rajdhani,sans-serif;letter-spacing:.03em;margin:8px 0}.section-heading p{color:#a6b7ce;max-width:385px;line-height:1.55}.directory-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:25px}.directory{display:flex;flex-direction:column;align-items:start;text-align:left;min-height:275px;gap:14px;padding:23px;background:linear-gradient(145deg,#182436,#0e1522);border:1px solid #3f5570;color:var(--text);border-radius:12px;transition:transform .2s,border-color .2s,box-shadow .2s}.directory:hover,.directory:focus-visible{transform:translateY(-4px);border-color:#85cde3;box-shadow:0 10px 30px #12324b7d}.symbol{font-size:34px;color:#adc8e8}.directory strong{font:700 25px Rajdhani,sans-serif}.directory>span:nth-of-type(3){color:#aabed5;line-height:1.5;font-size:13px;flex:1}.directory em{font:700 13px Rajdhani,sans-serif;letter-spacing:.1em;color:#b5e7ed;font-style:normal}.clearance{border-top:1px solid #52657b55}.clearance>p{max-width:760px;color:#b6c5d6;line-height:1.65}.access-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:26px}.access-grid fieldset{border:1px solid #41556d;background:#101a2a;padding:18px 22px;border-radius:12px}.access-grid legend{font:700 16px Rajdhani,sans-serif;letter-spacing:.1em;color:#dbe6fb;padding:0 7px}.access-grid label{display:flex;align-items:center;gap:10px;padding:12px 2px;border-bottom:1px solid #394b5e55}.access-grid label:last-child{border:0}.access-grid small{font-size:11px;color:#9caec4}.access-grid input{accent-color:#81bde4;width:17px;height:17px}.clearance-actions{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin-top:20px}.clearance-actions button,#close-display{background:#23344b;border:1px solid #7289a5;color:#f3faff;padding:12px 16px;border-radius:7px;font-weight:700}.clearance-actions button:hover,#close-display:hover{background:#344e69}.clearance-actions span{font:700 14px Rajdhani,sans-serif;letter-spacing:.1em;color:#b5d0ea}.clearance .protocol{font-size:13px;color:#91a3b9}.directory-display{padding:30px;border:1px solid #7893af;background:linear-gradient(145deg,#122238,#0b1220);margin:35px 0 75px;border-radius:14px}.display-top{display:flex;justify-content:space-between;align-items:center}.directory-display blockquote{margin:10px 0 30px;padding-left:19px;border-left:3px solid #bbd9f3;color:#d7e9fa;font-style:italic;font-size:19px}.display-body{display:grid;grid-template-columns:1fr 1fr;gap:24px}.display-body p{color:#a7bfd9;line-height:1.6}.coming{border:1px dashed #506b84;padding:20px;border-radius:9px}.coming span{display:block;font-size:11px;letter-spacing:.2em;color:#8eb9d0}.coming strong{display:block;margin-top:10px}footer{display:flex;justify-content:space-between;gap:22px;border-top:1px solid #43546a66;padding:27px 0 45px;color:#829bb7;font:700 12px Rajdhani,sans-serif;letter-spacing:.08em}@media(max-width:850px){.directory-grid{grid-template-columns:repeat(2,1fr)}.network{display:none}}@media(max-width:570px){main{padding:0 16px}.top{padding:18px 16px}.directory-grid,.access-grid,.display-body{grid-template-columns:1fr}.section-heading{display:block}.intro{padding-top:42px}.hero{min-height:0}.mainframe-frame{height:320px}.terminal{padding:0 15px 12px}.terminal-foot{font-size:10px}.directory{min-height:230px}footer{flex-direction:column}.access{font-size:11px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* v4.4 prismatic archival network */
body{position:relative;isolation:isolate;--prism-glow:#87ccdc;--surface-edge:#466078}
.ambient{z-index:-3;background:radial-gradient(ellipse at 50% 21%,#183b527d,transparent 54%),radial-gradient(ellipse at 92% 78%,#34305930,transparent 46%),linear-gradient(145deg,#02060e,#0b1422 48%,#070b14)}
.prism-scene{position:fixed;inset:0;z-index:-2;overflow:hidden;pointer-events:none;opacity:.65;transition:opacity .8s}
.prism-scene:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0 24%,#badbf509 24.1% 24.2%,transparent 24.3% 75%,#badbf509 75.1% 75.2%,transparent 75.3%),repeating-linear-gradient(0deg,transparent 0 95px,#98b6d207 96px 97px);mask-image:linear-gradient(to bottom,#000a,transparent 87%)}
.prism-shape{position:absolute;top:115px;left:50%;width:min(67vw,760px);aspect-ratio:1.3;transform:translateX(-50%);background:conic-gradient(from 32deg at 50% 56%,#7097da21,#8cbff10c 17%,#f7e7f117 28%,#a5c2ff0a 40%,#72adbb1d 66%,#f9c8da0e 76%,#7097da21);clip-path:polygon(50% 0,100% 89%,0 89%);filter:drop-shadow(0 0 24px #9daccb25)}
.prism-shape:after{content:"";position:absolute;inset:3px;background:#0b1424cf;clip-path:polygon(50% 0,100% 89%,0 89%)}
.data-rings{position:absolute;top:45px;left:50%;width:min(95vw,1060px);height:720px;transform:translateX(-50%);border:1px solid #82a9df24;border-radius:50%;box-shadow:0 0 0 90px #9ebfe405,0 0 0 165px #9ebfe406,0 0 0 245px #9ebfe403}
.beam{position:absolute;top:170px;left:50%;height:520px;width:2px;transform-origin:top;opacity:.22;filter:blur(1px);background:linear-gradient(#b6d5ef,transparent)}
.beam-a{transform:rotate(-59deg)}.beam-b{transform:rotate(58deg)}.beam-c{transform:rotate(0)}
.floating-code{position:absolute;top:30%;right:3%;writing-mode:vertical-rl;font:700 12px Rajdhani,sans-serif;letter-spacing:.4em;color:#87a4bf4c}
.spectrum-status{display:flex;justify-content:center;gap:12px;align-items:center;flex-wrap:wrap;margin:22px auto 3px;color:#9cbad1;font:700 12px Rajdhani,sans-serif;letter-spacing:.14em}
.spectrum-dots{letter-spacing:.3em;color:#6995b1;transition:all .5s}
.intro{padding-top:52px}.intro h1{filter:drop-shadow(0 0 25px #95bcdb20)}
.hero{min-height:550px}.hero-lines{border-color:#92bde52b;box-shadow:0 0 0 48px #86a9c405,0 0 0 105px #a2a9d208,0 0 0 170px #a3b8d605}
.mainframe-frame{isolation:isolate}.mainframe-figure{position:absolute;inset:0;margin:auto;max-height:100%;max-width:100%;transition:opacity .65s,filter .65s,transform .65s}
.revealed-figure{opacity:0;transform:scale(.95);filter:drop-shadow(0 0 25px #b0aaf140);animation:none}
.denied-figure{opacity:1}
.identity-spark{position:absolute;left:50%;top:15%;transform:translateX(-50%);font-size:44px;color:#a6c4ef;opacity:.12;filter:blur(4px);transition:opacity .8s}
.terminal{backdrop-filter:blur(5px);background:#0a1422ed}.terminal:before{content:"ARCHIVE FEED  ◇  ANALYSIS  ◇  ACCESS";position:absolute;left:16px;top:-23px;font:700 11px Rajdhani,sans-serif;letter-spacing:.25em;color:#94acc2a1}
.archive-visor{display:flex;align-items:center;gap:16px;color:#85a2ba;font:700 12px Rajdhani,sans-serif;letter-spacing:.15em;margin-bottom:24px}
.visor-line{height:1px;background:linear-gradient(90deg,#8cbbda80,#8cbbda0a);flex:1}
.directory{position:relative;overflow:hidden;background:linear-gradient(149deg,#18253bcf,#0c1321ed);box-shadow:inset 0 1px #afcfe516}
.directory:before{content:"";position:absolute;inset:0 0 auto;height:3px;background:linear-gradient(90deg,#8dc2e2,transparent);opacity:.38}
.directory:after{content:"";position:absolute;top:-90px;right:-80px;width:170px;height:200px;background:radial-gradient(circle,#a6bce520,transparent 68%);transition:transform .35s}
.directory:hover:after{transform:translate(-30px,50px)}
.directory .symbol{text-shadow:0 0 25px #b0c4f49c}
.directory:nth-child(1) .symbol{color:#9edbfa}.directory:nth-child(2) .symbol{color:#d7c4ff}.directory:nth-child(3) .symbol{color:#b2edce}.directory:nth-child(4) .symbol{color:#ffcfac}
.clearance{position:relative}.clearance:before{content:"";position:absolute;top:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,#badff8,#beacd7,transparent);opacity:.6}
.access-grid label.selected{color:#dff4fe;background:linear-gradient(90deg,#80baef15,transparent)}
.directory-display{position:relative;overflow:hidden;padding-right:165px}.directory-avatar{position:absolute;top:30px;right:20px;width:135px;height:205px;opacity:.4;pointer-events:none}.directory-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;transition:opacity .5s}.directory-avatar .avatar-reveal{opacity:0}
.prism-unlocked{--prism-glow:#d5aeff;--surface-edge:#bd88db}
.prism-unlocked .ambient{background:radial-gradient(ellipse at 50% 18%,#55356d7b,transparent 52%),radial-gradient(ellipse at 5% 80%,#156a6d33,transparent 46%),radial-gradient(ellipse at 88% 60%,#73466b36,transparent 50%),linear-gradient(125deg,#070712,#101123 60%,#090d18)}
.prism-unlocked .prism-scene{opacity:1}
.prism-unlocked .prism-shape{background:conic-gradient(from 25deg at 50% 56%,#ff739946,#ffd67d25,#a6fbbb25,#77b7ff36,#ba89ff46,#ff739946);filter:drop-shadow(0 0 44px #bb77ff55)}
.prism-unlocked .prism-shape:after{background:#111329b8}
.prism-unlocked .beam-a{background:linear-gradient(#ff87ba,transparent);opacity:.45;animation:light-breathe 7s infinite alternate}
.prism-unlocked .beam-b{background:linear-gradient(#79edca,transparent);opacity:.45;animation:light-breathe 8s infinite alternate}
.prism-unlocked .beam-c{background:linear-gradient(#a895ff,transparent);opacity:.38;animation:light-breathe 6s infinite alternate}
.prism-unlocked .spectrum-dots{background:linear-gradient(90deg,#f7a8b8,#ffdd91,#b7f5b5,#9edbf5,#dbb6ff);background-clip:text;color:transparent;text-shadow:0 0 15px #dac1ff5a}
.prism-unlocked .denied-figure{opacity:0;pointer-events:none;animation:none}
.prism-unlocked .revealed-figure{opacity:1;transform:scale(1);filter:drop-shadow(0 0 30px #a388ef75)}
.prism-unlocked .mainframe-frame:before,.prism-unlocked .mainframe-frame:after{animation:none;opacity:0}
.prism-unlocked .identity-spark{opacity:.7;color:#ffd3f7;filter:drop-shadow(0 0 13px #e4b5ff)}
.prism-unlocked .terminal{border-color:#a28aca;box-shadow:0 14px 55px #0009,0 0 35px #b683f02f}
.prism-unlocked .light{background:#d4a9f3;box-shadow:0 0 13px #e6baf5}
.prism-unlocked .terminal-line{color:#f4e6ff}
.prism-unlocked .directory{border-color:#8d7caa;background:linear-gradient(153deg,#27213eec,#101527ed)}
.prism-unlocked .directory:before{background:linear-gradient(90deg,#ff9da8,#fee4a2,#9bead2,#9ac0ff,#d8aaff);opacity:.85}
.prism-unlocked .directory:hover{border-color:#d5b5ed;box-shadow:0 12px 33px #452f6a8c}
.prism-unlocked .clearance:before{opacity:1}
.prism-unlocked .directory-avatar .avatar-public{opacity:0}
.prism-unlocked .directory-avatar .avatar-reveal{opacity:1}
.prism-unlocked .directory-display{border-color:#a38fc6;background:linear-gradient(140deg,#26203c,#0b1323)}
.prism-unlocked #top-access{color:#ecc6ff}
@keyframes light-breathe{from{opacity:.25;filter:blur(1px)}to{opacity:.65;filter:blur(4px)}}
@media(max-width:720px){.directory-display{padding-right:30px}.directory-avatar{display:none}.archive-visor{flex-wrap:wrap}.floating-code{display:none}}
@media(prefers-reduced-motion:reduce){.beam{animation:none!important}.mainframe-figure{transition:none!important}}

/* v4.5: the refracted light system and four independently selected revelation states */
:root{--clearance-wash:#08101e}
.ambient{transition:background .8s ease}
body.prism-unlocked .ambient{background:radial-gradient(ellipse at 50% 11%,#536a9d9e,transparent 55%),radial-gradient(ellipse at 8% 60%,#315e7977,transparent 60%),radial-gradient(ellipse at 96% 65%,#6b497c80,transparent 62%),linear-gradient(140deg,#182338,#263348 48%,#1b233a)}
body.identity-revealed .ambient{background:radial-gradient(ellipse at 51% 12%,#746ba8a6,transparent 60%),radial-gradient(ellipse at 8% 58%,#3b7a856b,transparent 62%),radial-gradient(ellipse at 94% 65%,#8b548d7c,transparent 62%),linear-gradient(138deg,#202740,#303651 50%,#262d4b)}
body.reclaimer-mode .ambient{background:radial-gradient(ellipse at 51% 12%,#8a82b5a8,transparent 57%),radial-gradient(ellipse at 6% 60%,#4e868d78,transparent 58%),radial-gradient(ellipse at 93% 65%,#a77d9a70,transparent 57%),linear-gradient(137deg,#26364a,#38465e 52%,#303952)}
.prism-scene{opacity:.65}
.beam{top:150px;left:50%;height:78vh;min-height:540px;width:clamp(20px,3.2vw,66px);opacity:.085;filter:blur(10px);clip-path:polygon(49% 0,51% 0,100% 100%,0 100%);transform-origin:50% 0;background:linear-gradient(to bottom,#aac9ff,transparent 85%);mix-blend-mode:screen;transition:opacity .7s,filter .7s}
.beam-a{transform:rotate(-57deg)}.beam-b{transform:rotate(57deg)}.beam-c{transform:rotate(0deg)}
.beam-d{transform:rotate(-39deg)}.beam-e{transform:rotate(-20deg)}.beam-f{transform:rotate(21deg)}.beam-g{transform:rotate(40deg)}
.incident-light{position:absolute;top:290px;left:-15%;width:68%;height:4px;background:linear-gradient(90deg,transparent,#cdd9f9,transparent);transform:rotate(-13deg);filter:blur(3px);opacity:.08}
.prism-unlocked .beam{opacity:.48;filter:blur(9px);animation:beam-pulse 8s ease-in-out infinite alternate}
.prism-unlocked .beam-a{background:linear-gradient(#f5a0ca88,#ff738dd2 42%,transparent);animation-delay:-1s}
.prism-unlocked .beam-b{background:linear-gradient(#8addfba0,#658dffb0 42%,transparent);animation-delay:-3s}
.prism-unlocked .beam-c{background:linear-gradient(#d0b1ff95,#ba8effcd 42%,transparent);animation-delay:-5s}
.prism-unlocked .beam-d{background:linear-gradient(#ffcf91a0,#f9ad64c9 42%,transparent);animation-delay:-2s}
.prism-unlocked .beam-e{background:linear-gradient(#faffb199,#e5e779be 42%,transparent);animation-delay:-4s}
.prism-unlocked .beam-f{background:linear-gradient(#a1ffd3a0,#67dabbc9 42%,transparent);animation-delay:-6s}
.prism-unlocked .beam-g{background:linear-gradient(#e2b0ffa0,#c394f7c9 42%,transparent);animation-delay:-7s}
.prism-unlocked .incident-light{opacity:.32;background:linear-gradient(90deg,transparent,#f9f3ff,#a3e9ff,transparent)}
.reclaimer-mode .beam{opacity:.32;filter:blur(13px)}
@keyframes beam-pulse{from{opacity:.3}to{opacity:.65}}
.reclaimer-figure{opacity:0;transform:scale(.95);animation:none!important;filter:drop-shadow(0 0 22px #9bbbdc44)}
.reclaimer-mode .revealed-figure{opacity:0;pointer-events:none}
.reclaimer-mode .reclaimer-figure{opacity:1;transform:scale(1);filter:drop-shadow(0 0 25px #b0e6fa6b)}
.reclaimer-mode .directory-avatar .avatar-reveal{opacity:0}
.reclaimer-mode .directory-avatar .avatar-reclaimer{opacity:1}
.directory-avatar .avatar-reclaimer{opacity:0}
.prism-unlocked .mainframe-frame:before,.prism-unlocked .mainframe-frame:after{animation:none;opacity:0}
.public-baseline{font:700 13px Rajdhani,sans-serif;letter-spacing:.08em;color:#b4c6d7;background:#23354a75;padding:13px;border:1px solid #50698577;border-radius:6px;margin:9px 0}
.reclaimer-mode .terminal{border-color:#a5cce2;box-shadow:0 12px 55px #060a1799,0 0 35px #a7e5e540}
.reclaimer-mode .directory{background:linear-gradient(149deg,#34435bd9,#1b2b42e9);border-color:#a4b4d6}
.reclaimer-mode .directory-display{background:linear-gradient(150deg,#30455c,#20263d)}
.reclaimer-mode #top-access{color:#d3f6f9}
@media(prefers-reduced-motion:reduce){.beam{animation:none!important}}

/* v4.6: slow drifting spectral light behind all content */
body{isolation:isolate}
.ambient{z-index:-4}
.ambient-spectrum{position:fixed;inset:0;z-index:-3;overflow:hidden;pointer-events:none;opacity:.26;transition:opacity .8s ease}
.ambient-spectrum i{position:absolute;top:-45%;left:var(--x);width:var(--w);height:175%;background:linear-gradient(180deg,transparent 2%,var(--c) 32%,transparent 63%,var(--c) 76%,transparent 97%);filter:blur(23px);transform:rotate(var(--a));mix-blend-mode:screen;opacity:.4;animation:spectrumFloat var(--t) ease-in-out infinite alternate}
.ambient-spectrum i:nth-child(1){--x:5%;--w:56px;--a:19deg;--c:#66d9ff;--t:22s}
.ambient-spectrum i:nth-child(2){--x:19%;--w:31px;--a:-15deg;--c:#ca9cff;--t:29s;animation-delay:-12s}
.ambient-spectrum i:nth-child(3){--x:36%;--w:48px;--a:11deg;--c:#ff89ba;--t:26s;animation-delay:-9s}
.ambient-spectrum i:nth-child(4){--x:51%;--w:32px;--a:-20deg;--c:#ffe0a1;--t:31s;animation-delay:-20s}
.ambient-spectrum i:nth-child(5){--x:70%;--w:63px;--a:14deg;--c:#7bffd2;--t:28s;animation-delay:-7s}
.ambient-spectrum i:nth-child(6){--x:83%;--w:40px;--a:-14deg;--c:#94a2ff;--t:34s;animation-delay:-18s}
.ambient-spectrum i:nth-child(7){--x:95%;--w:35px;--a:20deg;--c:#ff91c4;--t:25s;animation-delay:-11s}
.prism-unlocked .ambient-spectrum{opacity:.75}
.identity-revealed .ambient-spectrum{opacity:.88}
.reclaimer-mode .ambient-spectrum{opacity:.68}
@keyframes spectrumFloat{from{transform:translate(-36px,-5%) rotate(var(--a));opacity:.19}to{transform:translate(56px,7%) rotate(calc(var(--a) + 8deg));opacity:.55}}
/* Story 4: keep the actual character large; hide her lower legs rather than stacking a full body above the terminal. */
.reclaimer-mode .mainframe-frame{height:395px;overflow:hidden;align-items:flex-start;isolation:isolate}
.reclaimer-mode .reclaimer-figure{position:absolute;display:block;left:50%;right:auto;top:0;bottom:auto;margin:0;width:auto;max-width:none;max-height:none;height:580px;object-fit:contain;transform:translateX(-50%);transform-origin:top center}
@media(max-width:570px){.reclaimer-mode .mainframe-frame{height:320px}.reclaimer-mode .reclaimer-figure{height:470px}}
@media(prefers-reduced-motion:reduce){.ambient-spectrum i{animation:none!important}}


/* v4.7 — visible ambient refracted ribbons, above the backdrop and below UI. */
body{isolation:isolate;overflow-x:hidden}
.ambient{z-index:-1}
.ambient-spectrum{z-index:0;opacity:.65;isolation:isolate;mix-blend-mode:screen}
.prism-scene{z-index:0;opacity:.78}
.top,main,footer{position:relative;z-index:2}
.ambient-spectrum i{
  top:-42%;height:188%;width:var(--w);
  background:linear-gradient(180deg,transparent 0%,var(--c) 15%,var(--c) 35%,transparent 48%,var(--c) 66%,var(--c) 83%,transparent 100%);
  box-shadow:0 0 38px 9px var(--c),0 0 90px 22px color-mix(in srgb,var(--c) 43%,transparent);
  filter:blur(19px);mix-blend-mode:screen;opacity:.75;
  animation:spectrum-sweep var(--t) ease-in-out infinite alternate;
}
.ambient-spectrum i:nth-child(1){--x:4%;--w:86px;--a:23deg;--c:#35bfff;--t:24s}
.ambient-spectrum i:nth-child(2){--x:21%;--w:60px;--a:-18deg;--c:#ab6aff;--t:32s;animation-delay:-12s}
.ambient-spectrum i:nth-child(3){--x:39%;--w:68px;--a:16deg;--c:#fb69ae;--t:27s;animation-delay:-9s}
.ambient-spectrum i:nth-child(4){--x:54%;--w:60px;--a:-24deg;--c:#ffc76c;--t:34s;animation-delay:-21s}
.ambient-spectrum i:nth-child(5){--x:67%;--w:80px;--a:19deg;--c:#52e7bc;--t:29s;animation-delay:-8s}
.ambient-spectrum i:nth-child(6){--x:81%;--w:66px;--a:-17deg;--c:#718dff;--t:36s;animation-delay:-18s}
.ambient-spectrum i:nth-child(7){--x:94%;--w:65px;--a:22deg;--c:#f880de;--t:26s;animation-delay:-13s}
.prism-unlocked .ambient-spectrum{opacity:.9}
.identity-revealed .ambient-spectrum{opacity:1}
.reclaimer-mode .ambient-spectrum{opacity:.88}
@keyframes spectrum-sweep{
  0%{transform:translate(-95px,-5%) rotate(var(--a)) scaleX(.8);opacity:.52}
  50%{opacity:.9}
  100%{transform:translate(105px,7%) rotate(calc(var(--a) + 9deg)) scaleX(1.18);opacity:.7}
}
@media(prefers-reduced-motion:reduce){.ambient-spectrum i{animation:none;opacity:.65}}

/* v4.8 — reliable terminal panel and timeline archive */
.terminal{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:#0a1423f5!important;isolation:isolate;z-index:4;transform:translateZ(0)}
.terminal:before{backdrop-filter:none!important}
.ambient-spectrum i{animation-duration:calc(var(--t) * .78)}
.timeline-app{grid-column:1/-1;min-width:0;margin-top:26px;padding-top:28px;border-top:1px solid #536c8d77}
.timeline-app[hidden]{display:none!important}
.directory-display:has(.timeline-app:not([hidden])){padding-right:30px}
.directory-display:has(.timeline-app:not([hidden])) .display-body{grid-template-columns:1fr}
.timeline-tools{padding:22px;background:linear-gradient(125deg,#182b42e8,#171c34ee);border:1px solid #526f94;border-radius:14px}
.timeline-meta{display:flex;align-items:center;justify-content:space-between;gap:15px;font:700 13px Rajdhani,sans-serif;letter-spacing:.16em;color:#b4d9ee}
.timeline-meta strong{color:#f3f6ff}
.timeline-search{display:block;margin:18px 0 13px}.timeline-search span,.timeline-filters label{display:block;font:700 12px Rajdhani,sans-serif;letter-spacing:.13em;color:#b7cde5}
.timeline-search input,.timeline-filters select{width:100%;margin-top:7px;padding:13px 14px;border:1px solid #607e9f;border-radius:8px;background:#091526;color:#f1f6ff;font:500 14px 'Space Grotesk',Arial,sans-serif}
.timeline-search input:focus,.timeline-filters select:focus{outline:2px solid #9acfed;outline-offset:1px}
.timeline-filters{display:grid;grid-template-columns:1fr 1fr;gap:13px}.timeline-filters label{min-width:0}
.timeline-legend{display:flex;gap:12px 20px;flex-wrap:wrap;margin-top:17px;font-size:12px;color:#d7e4f8}
.pin{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:4px;background:#9ab4fc}.pin.port{background:#f3bd72}.pin.mitm{background:#cf9cff}.pin.history{background:#86e3cd}.pin.origins{background:#a6b5c9}
.timeline-disclaimer{font-size:12px;color:#a8b9d3;line-height:1.6;margin:17px 0 0}
.timeline-list{margin:22px 0 10px;position:relative;padding-left:18px}.timeline-list:before{content:'';position:absolute;left:5px;top:12px;bottom:12px;width:2px;background:linear-gradient(#8ce5ee,#b58deb,#eec48c,#7fcdbb)}
.mc-event{position:relative;display:grid;grid-template-columns:minmax(125px,165px) minmax(0,1fr);gap:20px;margin:0 0 13px;padding:16px 20px;background:#101c2ee9;border:1px solid #445a76;border-radius:12px;box-shadow:0 5px 22px #03091644}
.mc-event:before{content:'';position:absolute;left:-18px;top:24px;width:12px;height:12px;border-radius:50%;background:#a6b5c9;box-shadow:0 0 14px #a6b5c988}.mc-event.port:before{background:#f3bd72;box-shadow:0 0 14px #f3bd7299}.mc-event.mitm:before{background:#cf9cff;box-shadow:0 0 14px #cf9cff99}.mc-event.history:before{background:#86e3cd;box-shadow:0 0 14px #86e3cd99}
.mc-date{font:700 19px Rajdhani,sans-serif;letter-spacing:.06em;color:#f3efff}.mc-track{display:inline-block;font:700 11px Rajdhani,sans-serif;letter-spacing:.16em;color:#b9cfeb}.mc-summary{margin:8px 0 2px!important;color:#e2eaf8!important;line-height:1.62!important;font-size:14px}.mc-note{display:block;margin-top:9px;color:#f0cb9d;line-height:1.5}.mc-lock{display:block;margin-top:10px;font:700 11px Rajdhani,sans-serif;letter-spacing:.12em;color:#edc195}.mc-event.gated{border-style:dashed;background:#151d2d}.timeline-empty{padding:30px;color:#c6d7e8;text-align:center}
@media(max-width:650px){.timeline-filters,.mc-event{grid-template-columns:1fr}.mc-event{gap:5px;padding:14px}.timeline-tools{padding:14px}.timeline-meta{flex-wrap:wrap}.directory-display:has(.timeline-app:not([hidden])){padding:15px}.directory-display:has(.timeline-app:not([hidden])) .directory-avatar{display:none}}

/* v4.9: illustrated historical explorer */
.timeline-view-switch{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:17px}
.timeline-view-switch button{border:1px solid #6384ac;border-radius:9px;background:#17233a;color:#c9d8ed;cursor:pointer;padding:12px 18px;font:700 14px Rajdhani,sans-serif;letter-spacing:.11em}
.timeline-view-switch button.is-selected{background:linear-gradient(120deg,#264e71,#423c73);border-color:#a3cbec;color:#fff;box-shadow:0 0 15px #80c6ff32}
.timeline-list.explore-mode{padding-left:26px}.timeline-list.explore-mode:before{left:10px}
.timeline-list.explore-mode .mc-event{position:relative;transition:border-color .25s ease,background .25s ease}
.timeline-list.explore-mode .mc-event:before{content:'';position:absolute;width:10px;height:10px;border-radius:50%;background:#9fc2fa;top:25px;left:-22px;box-shadow:0 0 11px #8be6f4a8}
.timeline-list.explore-mode .mc-event.mc-feature{display:flex;flex-direction:column;gap:12px;padding:20px 22px;margin:26px 0;border:1px solid #8e9ed3;background:linear-gradient(145deg,#1b2c46,#24203a);box-shadow:0 18px 44px #050b1e85}
.timeline-list.explore-mode .mc-event.mc-feature:before{width:15px;height:15px;left:-26px;background:#e6c1ff;box-shadow:0 0 23px #df9bff}
.mc-feature .mc-date{font-size:25px;color:#fff}
.mc-feature .mc-track{color:#b5deff}
.mc-art{margin:12px 0 16px;width:100%;border-radius:10px;overflow:hidden;border:1px solid #7b86ae88;background:#070e1b}
.mc-art img{display:block;width:100%;height:auto;max-height:520px;object-fit:cover}
.mc-art figcaption{padding:8px 13px;color:#b8c7dd;font:600 11px Rajdhani,sans-serif;letter-spacing:.14em;text-transform:uppercase;background:#0d172b}
.timeline-easter-egg{display:flex;align-items:end;justify-content:flex-end;gap:16px;margin:45px 0 0;padding:0 8px;flex-wrap:wrap}
.timeline-easter-egg img{display:block;max-width:min(360px,75vw);width:100%;height:auto;object-fit:contain;filter:drop-shadow(0 14px 22px #050a16)}
.timeline-easter-dialogue{background:#131e32;border:1px solid #556c91;border-radius:13px;padding:16px 20px;color:#e3e8f8;line-height:1.9;font-size:14px;max-width:360px}
.timeline-easter-dialogue strong{color:#abd8ff}
@media(min-width:900px){.timeline-easter-egg{flex-direction:row-reverse}}
@media(max-width:650px){.timeline-list.explore-mode .mc-event.mc-feature{padding:13px}.timeline-easter-egg{justify-content:center}.timeline-easter-dialogue{order:2}}

/* v5.0 guided historical explorer */
#historical-explorer[hidden],#timeline-list[hidden]{display:none!important}
.timeline-tools.in-explorer .timeline-search,.timeline-tools.in-explorer .timeline-filters,.timeline-tools.in-explorer .timeline-legend,.timeline-tools.in-explorer .timeline-disclaimer{display:none}
.historical-explorer{padding:24px 0;color:#eaf1ff}.chapter-intro{max-width:850px;margin:0 auto 24px;text-align:center}.chapter-kicker,.chapter-time{font:700 12px Rajdhani,sans-serif;letter-spacing:.22em;color:#a0d4ff}.chapter-intro h3{font-size:clamp(30px,4vw,52px);margin:8px 0}.chapter-intro p{color:#bed0e3;line-height:1.7}.chapter-rail{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;margin:28px 0}.chapter-tab{background:#111d30;border:1px solid #475a7a;border-radius:10px;padding:12px 7px;color:#c4d2ea;cursor:pointer;min-height:76px;display:flex;flex-direction:column;justify-content:center;gap:8px;align-items:center;font-family:Rajdhani,sans-serif}.chapter-tab:hover,.chapter-tab.selected{background:linear-gradient(145deg,#2c3d69,#403151);border-color:#bdbeff;color:white}.chapter-tab-no{font-size:20px;font-weight:800;color:#a9cafa}.chapter-tab-label{font-size:11px;letter-spacing:.12em;font-weight:700;text-align:center}.chapter-stage{border:1px solid #7180a8;border-radius:17px;background:linear-gradient(160deg,#18253d,#16192c);overflow:hidden;box-shadow:0 22px 60px #0006}.chapter-progress{height:4px;background:linear-gradient(90deg,#54b7ff,#cf87f1,#ffd38d);transition:width .35s}.chapter-stage #chapter-scene{padding:clamp(18px,4vw,36px)}.chapter-title{font-size:clamp(28px,4vw,42px);margin:7px 0 10px}.chapter-summary{max-width:790px;line-height:1.7;color:#c7d5ed}.chapter-art{margin:24px 0 20px;border-radius:13px;overflow:hidden;border:1px solid #7d90be}.chapter-art img{width:100%;height:auto;max-height:560px;object-fit:cover;display:block}.chapter-records{background:#0d1729;border:1px solid #354968;border-radius:13px;padding:17px 20px;margin:25px 0 0}.chapter-records h4{font:700 12px Rajdhani,sans-serif;letter-spacing:.15em;color:#a9cef7;margin:0 0 9px}.chapter-record{border-top:1px solid #33445d;padding:12px 0}.chapter-record summary{color:#ecf3ff;cursor:pointer;font-weight:700}.chapter-record p{color:#cbd7e9;line-height:1.7}.chapter-record small{color:#d3a8dd}.chapter-controls{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:16px 22px;border-top:1px solid #405172}.chapter-controls button,.story-entry-links button{background:#243856;border:1px solid #7184ac;color:#edf5ff;padding:12px 16px;border-radius:8px;cursor:pointer;font:700 13px Rajdhani,sans-serif;letter-spacing:.08em}.chapter-controls button:hover,.story-entry-links button:hover{background:#40537a}.chapter-controls button:disabled{opacity:.3;cursor:default}.chapter-counter{font:700 13px Rajdhani,sans-serif;color:#b6c8e9}.chapter-continue{margin:30px 0;padding:23px;border:1px solid #53678b;border-radius:12px;background:#111d30}.chapter-continue strong{font-family:Rajdhani,sans-serif;letter-spacing:.12em}.chapter-continue p{color:#b8c9df;line-height:1.7}.story-entry-links{display:flex;flex-wrap:wrap;gap:12px}.story-entry-links button{display:flex;gap:12px;align-items:center}.story-entry-links span{color:#9fccff}.story-target{outline:2px solid #f5c2ff;outline-offset:4px}@media(max-width:700px){.chapter-rail{grid-template-columns:repeat(3,minmax(0,1fr))}.chapter-tab{min-height:64px}.chapter-controls{flex-wrap:wrap}.chapter-controls button{padding:9px}.chapter-continue{padding:15px}}

/* v5.1 complete historical explorer */
.timeline-era-cards{display:flex;gap:9px;overflow-x:auto;padding:6px 0 14px;scrollbar-color:#7386ad transparent}
.era-choice{flex:1 0 125px;background:#121e33;color:#c5d9f4;border:1px solid #516484;border-radius:9px;padding:13px 9px;font:700 12px Rajdhani,sans-serif;letter-spacing:.09em;cursor:pointer}
.era-choice:hover,.era-choice.active{background:linear-gradient(125deg,#304b75,#4b335d);border-color:#ceb7f9;color:white}
.chapter-rail{grid-template-columns:repeat(auto-fit,minmax(95px,1fr))}

/* Character dossiers: separate from global archival identity */
.character-app{margin:28px -135px 6px 0;position:relative;z-index:2;overflow:visible}
.char-navigation{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:18px}.char-navigation h3{font:700 27px Rajdhani,sans-serif;margin:0}.char-navigation small{color:#a7c2dd;letter-spacing:.12em}.char-story-tabs,.char-alt-row,.char-links{display:flex;gap:9px;flex-wrap:wrap}.char-story-tabs button,.char-alt-row button,.char-link,.char-modal-actions button{background:#182e43;border:1px solid #527391;border-radius:8px;color:#d9ecff;padding:10px 14px;font-weight:700;cursor:pointer}.char-story-tabs button.active,.char-alt-row button.active{background:#b0d8ee;color:#091527;border-color:#d4efff}.char-story-tabs button.locked:not(.active){border-style:dashed;color:#a6b9cf}.char-panel{border:1px solid #57718d;border-radius:15px;overflow:hidden;background:linear-gradient(160deg,#182a40,#101928 65%)}.char-top{display:grid;grid-template-columns:minmax(240px,37%) 1fr;gap:0;min-height:450px}.char-art{position:relative;min-height:440px;background:radial-gradient(ellipse at 50% 38%,#62799970,transparent 75%),linear-gradient(140deg,#1e2f48,#0e1828);overflow:hidden;border-right:1px solid #425875}.char-art img{position:absolute;top:6px;left:50%;height:150%;width:auto;max-width:none;object-fit:contain;object-position:center top;transform:translateX(-50%);filter:drop-shadow(0 16px 22px #0008)}.char-top-content{padding:27px 30px}.char-eyebrow{font:700 13px Rajdhani,sans-serif;letter-spacing:.17em;color:#9cbedb}.char-top h3{font:700 clamp(38px,5vw,58px) Rajdhani,sans-serif;margin:6px 0}.char-intro{font-size:15px;line-height:1.65;color:#d7e5f4}.char-aka{font-size:13px;color:#a8bfd7;margin:8px 0 18px}.char-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;border-top:1px solid #415774;padding-top:17px}.char-facts div{min-width:0}.char-facts span{font:700 11px Rajdhani,sans-serif;letter-spacing:.14em;color:#9eb2cc;display:block}.char-facts strong{font-size:14px;overflow-wrap:anywhere}.char-sub{padding:23px 28px;border-top:1px solid #435875}.char-sub h4{font:700 23px Rajdhani,sans-serif;margin:0 0 15px}.char-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 24px}.char-field label{display:block;text-transform:uppercase;font:700 12px Rajdhani,sans-serif;letter-spacing:.09em;color:#a2b8d1}.char-field p{font-size:14px;color:#e0e9f5;line-height:1.6;margin:5px 0}.char-archivist{background:#0b1728dd;border-left:3px solid #aec7f5;border-radius:8px;padding:18px 20px;margin-top:8px}.char-archivist .char-voice{font:700 12px Rajdhani,sans-serif;letter-spacing:.15em;color:#b8d8f2}.char-archivist p{line-height:1.7;margin:8px 0 0;font-style:italic}.char-archivist img{height:92px;width:85px;object-fit:contain;float:right;margin-left:12px}.char-note{font-size:12px;color:#a7b8ce;margin:10px 0 0}.char-link{text-align:left}.char-link span{font-size:11px;color:#9ec1d3;display:block;margin-top:3px}.char-alt-row{padding-top:6px}.char-modal{border:1px solid #93b6cc;background:linear-gradient(145deg,#19283d,#0c1422);border-radius:13px;margin-top:16px;padding:24px}.char-modal h3{font:700 28px Rajdhani,sans-serif;margin:0 0 8px}.char-modal p{color:#c6d8eb;line-height:1.65}.char-modal-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}.char-modal-actions .danger{background:#6b3d60;border-color:#c19aba}.char-reference{font-size:12px;color:#9fb6ce}.char-link:focus-visible,.char-alt-row button:focus-visible,.char-story-tabs button:focus-visible{outline:2px solid #e8c6ff;outline-offset:3px}
@media(max-width:1100px){.character-app{margin-right:-125px}}@media(max-width:850px){.character-app{margin-right:0}.char-top{grid-template-columns:1fr}.char-art{min-height:350px;border-right:0;border-bottom:1px solid #425875}.char-art img{height:150%}.char-top-content{padding:20px}}@media(max-width:570px){.char-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.char-fields{grid-template-columns:1fr}.char-art{min-height:300px}.char-sub{padding:18px}.char-story-tabs button{padding:8px 10px}}

/* v5.4 dossier navigation and on-screen archivist */
#return-to-profile{border:1px solid #a3c4e9;background:#172e46;color:#f0f7ff;padding:10px 15px;border-radius:9px;font:700 13px Rajdhani,sans-serif;letter-spacing:.08em;cursor:pointer}
#return-to-profile:hover{background:#2d5575}
.dossier-archivist[hidden],#return-to-profile[hidden]{display:none!important}
.dossier-archivist{position:fixed;bottom:15px;right:18px;z-index:90;width:min(440px,calc(100vw - 30px));display:flex;align-items:flex-end;justify-content:flex-end;pointer-events:none;filter:drop-shadow(0 7px 18px #000a)}
.dossier-archivist img{order:2;flex:none;align-self:flex-end;width:116px;max-height:204px;object-fit:contain;object-position:bottom center;pointer-events:none}
.floating-speech{order:1;position:relative;pointer-events:auto;background:#111c2ef5;border:1px solid #8eabd4;border-radius:12px;padding:16px 29px 14px 16px;min-width:0;max-width:318px;color:#e8f3ff;box-shadow:0 8px 24px #0009}
.floating-speech:after{content:'';position:absolute;right:-8px;bottom:36px;width:13px;height:13px;transform:rotate(45deg);background:#111c2e;border-top:1px solid #8eabd4;border-right:1px solid #8eabd4}
.floating-speaker{font:700 12px Rajdhani,sans-serif;letter-spacing:.12em;color:#a6d8f9;line-height:1.35}
.floating-speech p{font-size:13px;line-height:1.5;margin:8px 0 0;font-style:italic}
#floating-minimize{position:absolute;right:5px;top:5px;border:0;background:transparent;color:#d6ebfa;cursor:pointer;font-size:20px;padding:0 6px}
.dossier-archivist.collapsed .floating-speech p{display:none}
.dossier-archivist.collapsed .floating-speech{padding-bottom:12px}
@media(max-width:600px){.dossier-archivist{bottom:8px;right:6px;width:min(350px,calc(100vw - 12px))}.dossier-archivist img{width:80px;max-height:137px}.floating-speech{padding:10px 22px 9px 11px}.floating-speech p{font-size:12px;line-height:1.4}}

/* v5.5 Character Directory switching; story-accurate floating guide */
.char-person-nav{display:flex;gap:12px;margin:0 0 21px;flex-wrap:wrap}
.char-person-nav button{border:1px solid #5e7d9f;background:#15283e;border-radius:10px;padding:13px 20px;color:#d1e4f7;font:700 15px Rajdhani,sans-serif;letter-spacing:.11em;cursor:pointer}
.char-person-nav button.active{background:linear-gradient(110deg,#b6def7,#dfc6ef);color:#102338;border-color:#e4f2ff}
.dossier-archivist img{width:150px;max-height:255px;height:240px;object-fit:cover;object-position:center top;align-self:flex-end}
.dossier-archivist{width:min(510px,calc(100vw - 26px))}
.raleigh-art img{height:135%;max-height:none}
@media(max-width:600px){.dossier-archivist img{width:98px;height:165px;max-height:165px}.dossier-archivist{width:min(385px,calc(100vw - 12px))}}

/* v5.6: selectable character directory, standardized floating archivist, bottom clearance */
.char-directory-head{margin:0 0 24px}.char-directory-head h3{font:700 clamp(32px,4vw,46px) Rajdhani,sans-serif;margin:6px 0}.char-directory-head p{font-size:15px;line-height:1.6;color:#bcd2e5;max-width:670px}
.char-directory-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.char-directory-card{min-width:0;overflow:hidden;display:flex;align-items:stretch;gap:14px;text-align:left;padding:0;border:1px solid #6685a6;border-radius:17px;background:linear-gradient(130deg,#233a55,#0e192b);color:#f1f7ff;cursor:pointer;transition:border-color .15s,transform .15s}
.char-directory-card:hover,.char-directory-card:focus-visible{border-color:#e0c4fa;transform:translateY(-2px);outline:0}
.char-directory-portrait{height:220px;width:42%;flex:none;overflow:hidden;display:block;background:radial-gradient(circle at center,#677d9955,transparent 70%);position:relative}
.char-directory-portrait img{width:100%;height:155%;object-fit:cover;object-position:center top;display:block}
.char-directory-info{padding:18px 10px 18px 0;display:flex;flex:1;min-width:0;flex-direction:column;gap:8px;justify-content:center}
.char-directory-info strong{font:700 28px Rajdhani,sans-serif;line-height:1.1}.char-directory-info small{font-size:11px;color:#bed5ea;letter-spacing:.14em}.char-directory-info em{font-size:12px;color:#b1c5db;font-style:normal;line-height:1.45}.char-directory-info b{font:700 13px Rajdhani,sans-serif;color:#a5e4ff;letter-spacing:.07em;margin-top:8px}
.char-person-nav{margin:0 0 17px}.char-person-nav button{background:#203955}
/* The original images include very long full-body poses; the avatar viewport is deliberately portrait-cropped */
.dossier-archivist{width:min(550px,calc(100vw - 22px))}
.dossier-archivist #floating-portrait{flex:0 0 190px;width:190px;height:252px;max-height:none;object-fit:cover;object-position:center top;align-self:flex-end}
.floating-speech{max-width:345px}
@media(max-width:850px){.char-directory-grid{grid-template-columns:1fr}.character-app{margin-right:0}}
@media(max-width:600px){.dossier-archivist #floating-portrait{width:116px;height:160px;flex-basis:116px}.dossier-archivist{width:min(400px,calc(100vw - 10px))}.char-directory-portrait{height:170px}.char-directory-info strong{font-size:24px}}

/* v5.7: actual portrait clipping, rather than object-fit on a fully visible image */
.dossier-archivist .floating-portrait-window{
 order:2;position:relative;flex:0 0 195px;width:195px;height:264px;
 overflow:hidden;align-self:flex-end;pointer-events:none;
 -webkit-mask-image:linear-gradient(to bottom,#000 0%,#000 96%,transparent 100%);
 mask-image:linear-gradient(to bottom,#000 0%,#000 96%,transparent 100%);
}
.dossier-archivist #floating-portrait{
 position:absolute;display:block;top:0;left:50%;right:auto;bottom:auto;
 transform:translateX(-50%);height:auto!important;width:296px!important;
 min-width:296px;max-width:none!important;max-height:none!important;
 object-fit:initial!important;object-position:initial!important;flex:none!important;
}
@media(max-width:600px){
 .dossier-archivist .floating-portrait-window{width:118px;flex-basis:118px;height:160px}
 .dossier-archivist #floating-portrait{width:179px!important;min-width:179px}
}

/* v5.8: public/Story 2 archival images were already framed correctly.
   Restore their earlier scale without touching Story 3/4 portraits. */
.dossier-archivist #floating-portrait[src$="mainframe-denied.png"],
.dossier-archivist #floating-portrait[src$="mainframe-welcome.png"]{width:195px!important;min-width:195px;top:0}
@media(max-width:600px){
 .dossier-archivist #floating-portrait[src$="mainframe-denied.png"],
 .dossier-archivist #floating-portrait[src$="mainframe-welcome.png"]{width:118px!important;min-width:118px}
}

/* v5.9: nudge only the public and Story 2 floating portraits down within their fixed clip. */
.dossier-archivist #floating-portrait[src$="mainframe-denied.png"],
.dossier-archivist #floating-portrait[src$="mainframe-welcome.png"]{top:24px}
@media(max-width:600px){
 .dossier-archivist #floating-portrait[src$="mainframe-denied.png"],
 .dossier-archivist #floating-portrait[src$="mainframe-welcome.png"]{top:15px}
}

/* v6.0 scalable character directory */
.char-directory-controls{display:flex;align-items:end;justify-content:space-between;gap:15px;flex-wrap:wrap;margin-bottom:10px}
.char-collection{display:flex;gap:8px;flex-wrap:wrap}
.char-collection button{background:#192e46;border:1px solid #587799;border-radius:8px;color:#c1d9ec;cursor:pointer;font-weight:800;letter-spacing:.08em;padding:12px 18px}
.char-collection button.active{background:#b6d8eb;color:#0b2032;border-color:#eef7ff}
.char-directory-search{color:#a6c1dc;display:flex;flex-direction:column;gap:6px;font:700 12px Rajdhani,sans-serif;letter-spacing:.08em;min-width:min(265px,100%)}
.char-directory-search input{border-radius:8px;border:1px solid #547693;background:#091b2e;color:#fff;padding:12px;font:500 14px sans-serif;width:100%}
.char-directory-count{font:700 12px Rajdhani,sans-serif;letter-spacing:.13em;color:#b8c9dc;margin:8px 0 15px}
.char-empty{padding:25px;color:#bacce0}
.darla-art img{height:127%;top:0}
@media(max-width:600px){.char-directory-controls{align-items:stretch}.char-directory-search{width:100%}.char-collection{justify-content:center}}

/* Rival dossier */
.rival-art{background:radial-gradient(ellipse at 49% 39%,#85524b55,transparent 70%),linear-gradient(140deg,#292036,#101928)}.rival-integrity{background:#2c2027;border-top:1px solid #936877}.rival-integrity p{margin:0;color:#ecc7ac;font-style:italic;line-height:1.6}

.faction-app[hidden]{display:none!important}.faction-app{margin-top:20px}.faction-app .char-panel{max-width:100%}

/* v6.3: consistent dossier histories and compact field rhythm */
.char-history{background:linear-gradient(135deg,#17263c,#101a2b);padding:28px 32px}
.char-history h4{margin-bottom:16px}
.char-history p{color:#dfebfa;line-height:1.85;font-size:15px;margin:0;max-width:85ch;white-space:normal;overflow-wrap:break-word}
.char-fields{align-items:start;grid-auto-flow:row;gap:18px 32px}
.char-fields .char-field{min-width:0;align-self:start}
.char-fields .char-field p{overflow-wrap:break-word}
@media(max-width:650px){.char-history{padding:21px 19px}.char-history p{font-size:14px;line-height:1.75}}

/* v6.4 — faction dossier */
.faction-story-tabs{margin:0 0 18px}.faction-header{display:grid;grid-template-columns:minmax(180px,32%) 1fr;gap:26px;align-items:center;padding:24px;background:radial-gradient(ellipse at 20% 50%,#54202b80,transparent 64%),#0c1423}
.faction-emblem{display:flex;align-items:center;justify-content:center;background:#030405;border:1px solid #62414c;border-radius:14px;min-height:270px;overflow:hidden}.faction-emblem img{display:block;width:100%;max-width:260px;height:260px;object-fit:contain}.faction-title h3{font:700 clamp(30px,4.5vw,58px) Rajdhani,sans-serif;margin:9px 0;color:#f3f4ff}.faction-title p{color:#c3d1e1}.faction-status{display:inline-block;border:1px solid #8a5667;border-radius:5px;padding:7px 12px;color:#eeb4b9;font:700 12px Rajdhani,sans-serif;letter-spacing:.14em}.faction-prose p,.faction-dossier .char-sub>p{color:#dce5f1;line-height:1.75;font-size:15px;max-width:95ch}.faction-balance{display:grid;grid-template-columns:1fr 1fr;gap:20px}.faction-balance>div,.faction-person{border:1px solid #3f536c;background:#132237;border-radius:10px;padding:16px}.faction-balance h5{margin:0 0 8px;color:#e0b2b7;font:700 15px Rajdhani,sans-serif;letter-spacing:.12em}.faction-balance p{line-height:1.65;margin:0}.faction-people{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-top:18px}.faction-person strong,.faction-person small{display:block}.faction-person small{color:#a7bdd5;margin:8px 0}.faction-person button{border:1px solid #688ba7;background:#1e3852;color:#dff1ff;padding:9px 12px;border-radius:6px;cursor:pointer;font-weight:bold}.faction-comment{background:linear-gradient(135deg,#19263b,#1d1832)}.faction-comment blockquote{font-style:italic;line-height:1.75;margin:14px 0 0;color:#e8deee;border-left:2px solid #b3a0e0;padding-left:16px;font-size:16px}
@media(max-width:750px){.faction-header{grid-template-columns:1fr}.faction-emblem{min-height:180px}.faction-emblem img{height:180px}.faction-balance{grid-template-columns:1fr}}

#return-to-faction[hidden]{display:none!important}
#return-to-faction{border:1px solid #7598ba;background:#172a40;color:#bfe8ff;border-radius:6px;padding:10px 14px;font:700 14px Rajdhani,sans-serif;letter-spacing:.07em;cursor:pointer}
#return-to-faction:hover{background:#28435d}

/* v6.6 — Empire exhibit: unframed personnel and clearance-aware linked portraits. */
.faction-dossier .faction-header{position:relative;grid-template-columns:minmax(140px,29%) minmax(0,1fr);padding-right:clamp(115px,19vw,245px);min-height:330px;isolation:isolate}
.faction-dossier .faction-title,.faction-dossier .faction-emblem{position:relative;z-index:1}
.faction-dossier .imperial-guard{display:block;position:absolute;right:5px;z-index:0;width:clamp(110px,18%,205px);height:auto;object-fit:contain;pointer-events:none;user-select:none;filter:drop-shadow(0 13px 13px #0007)}
.faction-dossier .imperial-grunt{bottom:0;max-height:320px;object-position:bottom center}
.faction-dossier .imperial-culture{position:relative;min-height:340px;padding-right:clamp(125px,20vw,240px);isolation:isolate}
.faction-dossier .imperial-culture p,.faction-dossier .imperial-culture h4{position:relative;z-index:1}
.faction-dossier .imperial-officer{bottom:0;max-height:355px;right:14px}
.faction-dossier .faction-people{grid-template-columns:repeat(auto-fit,minmax(235px,1fr));align-items:stretch}
.faction-dossier .faction-person-link{display:flex;align-items:center;gap:12px;cursor:pointer;color:#e6efff;text-align:left;font:inherit;min-width:0;transition:border-color .2s,background .2s;background:#182c43}
.faction-dossier .faction-person-link:hover,.faction-dossier .faction-person-link:focus-visible{border-color:#acc9e9;background:#243c57;outline-offset:3px}
.faction-dossier .faction-person-portrait{width:88px;height:114px;object-fit:cover;object-position:center top;flex:none;border-radius:7px;background:#0b1525}
.faction-dossier .faction-person-description{display:block;min-width:0}
.faction-dossier .faction-person-description small{line-height:1.4}
.faction-dossier .faction-person-action{display:block;color:#a5e4ff;font:700 13px Rajdhani,sans-serif;letter-spacing:.08em}
@media(max-width:760px){.faction-dossier .faction-header{grid-template-columns:1fr;padding-right:115px;min-height:240px;gap:12px}.faction-dossier .faction-emblem{min-height:150px;max-width:190px}.faction-dossier .faction-emblem img{height:150px}.faction-dossier .imperial-grunt{width:115px;max-height:240px}.faction-dossier .imperial-culture{padding-right:112px;min-height:285px}.faction-dossier .imperial-officer{width:120px;max-height:280px;right:0}}
@media(max-width:480px){.faction-dossier .faction-header{padding-right:85px}.faction-dossier .imperial-grunt{width:88px}.faction-dossier .imperial-culture{padding-right:0;padding-bottom:175px}.faction-dossier .imperial-officer{height:175px;width:auto;right:2px}}

/* v6.7 Nested location dossiers */
.location-app[hidden]{display:none!important}.location-record{margin-top:18px}.world-breadcrumb{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:12px;letter-spacing:.08em;color:#b5c5d9;margin:16px 0}.world-breadcrumb button,.location-back{background:transparent;border:1px solid #50627d;border-radius:8px;color:#d6e4fd;padding:10px 13px;cursor:pointer}.location-back{margin-bottom:10px}.location-world-hero{position:relative;min-height:290px;overflow:hidden;border-radius:15px;display:flex;align-items:end;padding:26px;background:#1a263a}.location-world-hero>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.55}.location-world-hero>div{position:relative;z-index:1;text-shadow:0 2px 12px #080b16}.location-world-hero h3,.location-record h3{font-size:clamp(24px,4vw,43px);margin:6px 0}.location-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}.location-facts>div{display:flex;flex-direction:column;gap:7px;border:1px solid #485670;border-radius:12px;padding:15px}.location-facts small,.location-children small{color:#a4b4d0;font-size:11px;letter-spacing:.07em}.location-facts strong{font-weight:650}.location-facts button{color:#d6e6ff;background:none;border:0;text-align:left;padding:0;cursor:pointer}.location-children{display:grid;gap:12px}.location-child-link{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;padding:18px;background:rgba(107,138,180,.12);border:1px solid rgba(172,194,225,.28);border-radius:12px;color:#f1f5ff;text-align:left;cursor:pointer}.location-child-link:hover{background:rgba(107,138,180,.24)}.location-child-link span:first-child{display:flex;flex-direction:column;gap:6px}.location-locked{padding:20px}.location-actions{display:flex;gap:10px;flex-wrap:wrap}.location-actions button{border:1px solid #7e91b3;background:#263653;color:#fff;border-radius:9px;padding:12px 15px;cursor:pointer}.location-subtitle{color:#c2d0e6}@media(max-width:650px){.location-facts{grid-template-columns:1fr}.location-world-hero{min-height:230px}}

/* v6.8 — Imperial exhibit and fleet gallery */
.faction-dossier .faction-header{padding-right:clamp(185px,25vw,330px);min-height:440px}
.faction-dossier .imperial-grunt{width:clamp(175px,26%,310px);max-height:435px;right:8px}
.faction-dossier .imperial-culture{padding-right:clamp(185px,25vw,325px);min-height:470px}
.faction-dossier .imperial-officer{width:clamp(180px,27%,320px);max-height:455px;right:8px}
.faction-world-link{border:0;background:none;padding:0;color:#aad9ff;text-align:left;font:inherit;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.fleet-ship-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:15px;margin-top:16px}
.fleet-ship{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:12px;border:1px solid #48617c;border-radius:12px;background:#14273a;text-align:left;color:#e7effb;cursor:pointer}
.fleet-ship:hover,.fleet-ship:focus-visible{border-color:#b1d9ff;background:#203950}
.fleet-ship img{width:100%;height:175px;object-fit:cover;object-position:top left;background:#e5e6e9;border-radius:7px}
.fleet-ship strong{font:700 19px Rajdhani,sans-serif;letter-spacing:.04em}
.fleet-ship small{line-height:1.4;color:#adc2d8}
.fleet-ship span{font:700 12px Rajdhani,sans-serif;letter-spacing:.1em;color:#a8e6ff;margin-top:auto}
.fleet-inspection{margin-top:18px;background:#101d2c;border:1px solid #627995;border-radius:12px;padding:12px}
.fleet-inspection[hidden]{display:none!important}
.fleet-inspection-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.fleet-inspection-bar button{border:1px solid #7896b7;background:#213a55;color:#fff;border-radius:7px;cursor:pointer;padding:8px}
.fleet-inspection img{width:100%;max-height:78vh;object-fit:contain;background:#eee;display:block}
.fleet-inspection p{color:#aec5da;font-size:12px}
@media(max-width:760px){.faction-dossier .faction-header{min-height:310px;padding-right:160px}.faction-dossier .imperial-grunt{width:160px;max-height:310px}.faction-dossier .imperial-culture{padding-right:160px;min-height:340px}.faction-dossier .imperial-officer{width:160px;max-height:330px}}
@media(max-width:480px){.faction-dossier .faction-header{padding-right:105px;min-height:255px}.faction-dossier .imperial-grunt{width:112px;max-height:245px}.faction-dossier .imperial-culture{padding-right:0;padding-bottom:245px;min-height:0}.faction-dossier .imperial-officer{width:170px;max-height:240px}}

/* v6.9 archive gateway galleries. Text and click targets remain unchanged. */
.directory[data-category="characters"],.directory[data-category="locations"],.directory[data-category="factions"]{isolation:isolate;background:#101827;}
.archive-card-gallery,.archive-card-shade{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:-1}
.archive-card-gallery .archive-card-frame{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 24%;opacity:0;animation:archiveGalleryCycle 25s infinite;transform:scale(1.04)}
.archive-card-gallery-characters .archive-card-frame{object-fit:contain;object-position:right bottom;filter:drop-shadow(0 8px 12px #0008);}
.archive-card-gallery-factions .archive-card-frame{object-fit:contain;object-position:center 36%;padding:34px 16px 65px;filter:drop-shadow(0 4px 14px #f33a);}
.archive-card-gallery .archive-card-frame:nth-child(1){animation-delay:-1s}
.archive-card-gallery .archive-card-frame:nth-child(2){animation-delay:4s}
.archive-card-gallery .archive-card-frame:nth-child(3){animation-delay:9s}
.archive-card-gallery .archive-card-frame:nth-child(4){animation-delay:14s}
.archive-card-gallery .archive-card-frame:nth-child(5){animation-delay:19s}
.archive-card-gallery-factions .archive-card-frame{animation:none;opacity:.75}
.archive-card-shade{background:linear-gradient(0deg,#07101df5 0%,#0a1425e8 43%,#0d172f83 80%,#06101c8a 100%)}
.directory[data-category="characters"] > :not(.archive-card-gallery):not(.archive-card-shade),.directory[data-category="locations"] > :not(.archive-card-gallery):not(.archive-card-shade),.directory[data-category="factions"] > :not(.archive-card-gallery):not(.archive-card-shade){position:relative;z-index:1;text-shadow:0 2px 8px #030814}
@keyframes archiveGalleryCycle{0%,16%{opacity:.82;transform:scale(1.04)}20%,96%{opacity:0;transform:scale(1.12)}100%{opacity:.82;transform:scale(1.04)}}
.location-world-directory{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:18px 0 34px}
.location-world-choice{display:flex;flex-direction:column;position:relative;overflow:hidden;text-align:left;cursor:pointer;background:#142337;border:1px solid #59708a;color:#eaf1fd;border-radius:13px;padding:0 0 20px}
.location-world-choice img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover}
.location-world-choice span{padding:17px 20px 0;display:flex;flex-direction:column;gap:8px}
.location-world-choice strong{font:700 22px Rajdhani,sans-serif;letter-spacing:.06em}
.location-world-choice small{font-size:13px;color:#afc4d6}
.location-world-choice b{position:absolute;right:19px;bottom:22px;color:#9be5ff}
.location-world-choice:hover,.location-world-choice:focus-visible{border-color:#a1dcf4;box-shadow:0 8px 24px #080d22}
@media(max-width:700px){.location-world-directory{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.archive-card-gallery .archive-card-frame{animation:none!important;opacity:0}.archive-card-gallery .archive-card-frame:first-child{opacity:.82}}

/* v7.0 - second faction record and historical gallery */
.faction-directory-switch{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 19px}
.faction-directory-switch button{border:1px solid #466180;background:#101f31;color:#b8cce4;padding:12px 16px;cursor:pointer;border-radius:7px;font:700 15px Rajdhani,sans-serif;letter-spacing:.05em}
.faction-directory-switch button.selected,.faction-directory-switch button:hover{background:#254a71;color:#fff;border-color:#75c0f8}
.coalition-dossier .coalition-header{background:radial-gradient(ellipse at 17% 50%,#154a7c80,transparent 65%),#0d1b30}
.coalition-dossier .coalition-emblem{background:#07172d;border-color:#507bb2}
.coalition-dossier .faction-status{border-color:#5a9fd0;color:#a7deff}
.coalition-dossier .coalition-header,.coalition-dossier .coalition-culture,.coalition-dossier .coalition-hacker{position:relative;isolation:isolate;overflow:hidden}
.coalition-dossier .coalition-header{min-height:420px;padding-right:clamp(185px,25vw,330px)}
.coalition-figure{position:absolute;z-index:0;object-fit:contain;object-position:bottom center;pointer-events:none;filter:drop-shadow(0 15px 15px #0008)}
.coalition-dossier .coalition-grunt{right:0;bottom:0;width:clamp(170px,25%,310px);max-height:415px}
.coalition-dossier .coalition-culture,.coalition-dossier .coalition-hacker{min-height:430px;padding-right:clamp(180px,27vw,330px)}
.coalition-dossier .coalition-officer,.coalition-dossier .hacker-figure{right:10px;bottom:0;max-height:430px;width:clamp(165px,25%,315px)}
.coalition-dossier .coalition-culture>*:not(img),.coalition-dossier .coalition-hacker>*:not(img){position:relative;z-index:1}
.coalition-gods{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(195px,1fr))}.coalition-gods>div{background:#142b47;border:1px solid #365c81;border-radius:10px;padding:17px}.coalition-gods strong{color:#bee7ff}.coalition-gods p{line-height:1.6}
.coalition-locked{padding:34px}.coalition-locked button{border:1px solid #78baf1;color:#e1f5ff;background:#1c4568;padding:13px;border-radius:8px;cursor:pointer}
.coalition-gallery{width:100%;aspect-ratio:16/9;border:1px solid #457096;position:relative;overflow:hidden;border-radius:12px;background:#08162a}
.coalition-gallery .gallery-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;transition:opacity .65s;pointer-events:none}
.coalition-gallery .gallery-image.is-current{opacity:1}
.coalition-gallery-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px}.coalition-gallery-actions button{border:1px solid #507ca1;background:#142e4a;color:#d6eeff;padding:10px 14px;border-radius:6px;cursor:pointer}
.timeline-era-gallery{width:100%;height:190px;position:relative;overflow:hidden;border-radius:10px;margin:16px 0;background:#0e1727}
.timeline-era-gallery .timeline-gallery-frame{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;animation:era-slide-cycle var(--gallery-duration,15s) linear infinite}
@keyframes era-slide-cycle{0%,27%{opacity:1}34%,95%{opacity:0}100%{opacity:1}}
@media(prefers-reduced-motion:reduce){.timeline-era-gallery .timeline-gallery-frame{animation:none;opacity:0}.timeline-era-gallery .timeline-gallery-frame:first-child{opacity:1}.coalition-gallery .gallery-image{transition:none}}
@media(max-width:760px){.coalition-dossier .coalition-header{padding-right:140px;min-height:290px}.coalition-dossier .coalition-grunt{width:140px;max-height:290px}.coalition-dossier .coalition-culture,.coalition-dossier .coalition-hacker{padding-right:145px;min-height:320px}.coalition-dossier .coalition-officer,.coalition-dossier .hacker-figure{width:135px;max-height:310px}}
@media(max-width:480px){.coalition-dossier .coalition-header{padding-right:110px;min-height:240px}.coalition-dossier .coalition-grunt{width:105px;max-height:235px}.coalition-dossier .coalition-culture,.coalition-dossier .coalition-hacker{padding-right:0;padding-bottom:230px}.coalition-dossier .coalition-officer,.coalition-dossier .hacker-figure{width:170px;max-height:225px}}
.archive-card-gallery-factions .archive-card-frame-coalition{animation-delay:5s}

.archive-card-gallery-factions .archive-card-frame{animation:archive-card-cycle 10s linear infinite;opacity:0;filter:drop-shadow(0 4px 12px #3b8ded)}
.archive-card-gallery-factions .archive-card-frame:first-child{animation-delay:0s}
.archive-card-gallery-factions .archive-card-frame:nth-child(2){animation-delay:5s}
@media(prefers-reduced-motion:reduce){.archive-card-gallery-factions .archive-card-frame{animation:none!important;opacity:0}.archive-card-gallery-factions .archive-card-frame:first-child{opacity:.82}}
@keyframes coalitionArchiveCycle{0%,43%{opacity:.78;transform:scale(1.04)}50%,95%{opacity:0;transform:scale(1.10)}100%{opacity:.78;transform:scale(1.04)}}
.archive-card-gallery-factions .archive-card-frame{animation:coalitionArchiveCycle 10s linear infinite}
@keyframes eraCycleTwo{0%,43%{opacity:1}50%,95%{opacity:0}100%{opacity:1}}
@keyframes eraCycleThree{0%,28%{opacity:1}34%,96%{opacity:0}100%{opacity:1}}
.timeline-era-gallery[data-count="2"] .timeline-gallery-frame{animation-name:eraCycleTwo}
.timeline-era-gallery[data-count="3"] .timeline-gallery-frame{animation-name:eraCycleThree}
@media(prefers-reduced-motion:reduce){.archive-card-gallery-factions .archive-card-frame,.timeline-era-gallery .timeline-gallery-frame{animation:none!important}}

/* v7.1: independent faction selection, matching world/character indexes */
.faction-world-directory{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px;margin:22px 0 28px}
.faction-world-choice{border:1px solid #486a90;background:linear-gradient(140deg,#102943,#0b1426);border-radius:11px;padding:18px;display:flex;gap:16px;align-items:center;text-align:left;cursor:pointer;color:#f1f7ff;min-height:178px}
.faction-world-choice:hover,.faction-world-choice:focus-visible{border-color:#9de0ff;background:linear-gradient(140deg,#1c466e,#0d2239)}
.faction-world-choice img{width:118px;height:118px;object-fit:contain;flex-shrink:0;border-radius:9px}
.faction-world-choice span{display:flex;flex-direction:column;gap:10px}
.faction-world-choice strong{font:700 22px Rajdhani,sans-serif;letter-spacing:.035em}
.faction-world-choice small{color:#adbed4;font:14px Rajdhani,sans-serif}
.faction-world-choice em{color:#96d8fc;font:700 12px Rajdhani,sans-serif;font-style:normal}
@media(max-width:700px){.faction-world-directory{grid-template-columns:1fr}.faction-world-choice img{width:88px;height:88px}}
/* Chronology category entrance: historic artwork slideshow behind original text/symbol */
.archive-card-gallery-timeline .archive-card-frame{animation:timelineCardCycle 45s linear infinite;opacity:0}
.archive-card-gallery-timeline .archive-card-frame:nth-child(1){animation-delay:0s}
.archive-card-gallery-timeline .archive-card-frame:nth-child(2){animation-delay:5s}
.archive-card-gallery-timeline .archive-card-frame:nth-child(3){animation-delay:10s}
.archive-card-gallery-timeline .archive-card-frame:nth-child(4){animation-delay:15s}
.archive-card-gallery-timeline .archive-card-frame:nth-child(5){animation-delay:20s}
.archive-card-gallery-timeline .archive-card-frame:nth-child(6){animation-delay:25s}
.archive-card-gallery-timeline .archive-card-frame:nth-child(7){animation-delay:30s}
.archive-card-gallery-timeline .archive-card-frame:nth-child(8){animation-delay:35s}
.archive-card-gallery-timeline .archive-card-frame:nth-child(9){animation-delay:40s}
@keyframes timelineCardCycle{0%,9%{opacity:.76;transform:scale(1.03)}11.111%,97.8%{opacity:0;transform:scale(1.09)}100%{opacity:.76;transform:scale(1.03)}}
@media(prefers-reduced-motion:reduce){.archive-card-gallery-timeline .archive-card-frame{animation:none!important;opacity:0!important}.archive-card-gallery-timeline .archive-card-frame:first-child{opacity:.76!important}}

.directory[data-category="timeline"] > :not(.archive-card-gallery):not(.archive-card-shade){position:relative;z-index:1;text-shadow:0 2px 8px #030814}

/* v7.2: parity for gallery opacity and square faction emblems */
.directory[data-category="timeline"] .archive-card-shade{background:linear-gradient(0deg,#07101dc9 0%,#0a142590 43%,#0d172f42 80%,#06101c66 100%)}
.archive-card-gallery-timeline .archive-card-frame{filter:brightness(1.24) saturate(1.20)}
@keyframes timelineCardCycle{0%,9%{opacity:1;transform:scale(1.03)}11.111%,97.8%{opacity:0;transform:scale(1.09)}100%{opacity:1;transform:scale(1.03)}}
.faction-world-choice>img{width:118px;height:118px;aspect-ratio:1/1;object-fit:contain;background:#071426;border-radius:10px} 
.faction-world-choice[data-faction="coalition"]>img{object-fit:contain;background:#07172d} 
.crossbone-dossier .faction-emblem{background:#090909;border-color:#8a4b4c} 
.crossbone-figure{object-fit:contain;object-position:center bottom;max-height:460px;max-width:300px;align-self:end} 
@media(max-width:700px){.faction-world-choice>img{width:88px;height:88px}.crossbone-figure{max-height:260px;max-width:150px}}

/* Cycle all three factions rather than allowing the third to sit permanently on top */
.archive-card-gallery-factions .archive-card-frame{animation:crossboneThreeCycle 15s linear infinite;opacity:0}
.archive-card-gallery-factions .archive-card-frame:nth-child(1){animation-delay:0s}
.archive-card-gallery-factions .archive-card-frame:nth-child(2){animation-delay:5s}
.archive-card-gallery-factions .archive-card-frame:nth-child(3){animation-delay:10s}
@keyframes crossboneThreeCycle{0%,27%{opacity:.84;transform:scale(1.03)}33.333%,98%{opacity:0;transform:scale(1.10)}100%{opacity:.84;transform:scale(1.03)}}
@media(prefers-reduced-motion:reduce){.archive-card-gallery-factions .archive-card-frame{animation:none!important;opacity:0!important}.archive-card-gallery-factions .archive-card-frame:first-child{opacity:.84!important}}

/* v7.3: keep Crossbone personnel beside the title, matching Empire and Coalition. */
.crossbone-dossier .faction-header{position:relative;isolation:isolate;min-height:440px;padding-right:clamp(185px,25vw,330px)}
.crossbone-dossier .crossbone-figure{display:block;position:absolute;right:8px;bottom:0;width:clamp(175px,26%,310px);height:auto;max-width:none;max-height:435px;object-fit:contain;object-position:center bottom;pointer-events:none;filter:drop-shadow(0 13px 13px #0007);z-index:0}
.crossbone-dossier .faction-title,.crossbone-dossier .faction-emblem{position:relative;z-index:1}
@media(max-width:760px){.crossbone-dossier .faction-header{padding-right:160px;min-height:310px}.crossbone-dossier .crossbone-figure{width:160px;max-height:310px}}
@media(max-width:480px){.crossbone-dossier .faction-header{padding-right:105px;min-height:255px}.crossbone-dossier .crossbone-figure{width:112px;max-height:245px}}
/* Archive entrance chronology slideshow is visually consistent with the other cards.
   The z-index and isolation are the crucial pieces: its moving images must not
   fall behind the entire button. Text remains legible via the shared shade. */
.directory[data-category="timeline"]{isolation:isolate;background:#101827}
.directory[data-category="timeline"] .archive-card-gallery .archive-card-frame{filter:none;object-fit:cover;object-position:center center}
.directory[data-category="timeline"] .archive-card-shade{background:linear-gradient(0deg,#07101df0 0%,#0a1425bd 43%,#0d172f62 80%,#06101c6a 100%)}
@keyframes timelineCardCycle{0%,9%{opacity:.86;transform:scale(1.03)}11.111%,97.8%{opacity:0;transform:scale(1.09)}100%{opacity:.86;transform:scale(1.03)}}

/* NST v7.4: independent Neo Empire faction dossier */
.neo-dossier .neo-header{position:relative;isolation:isolate;min-height:440px;padding-right:clamp(190px,26vw,340px)}
.neo-dossier .neo-grunt{display:block;position:absolute;right:8px;bottom:0;width:clamp(175px,26%,315px);height:auto;max-height:435px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 12px 15px #0007);z-index:0}
.neo-dossier .faction-title,.neo-dossier .faction-emblem{position:relative;z-index:1}
.neo-dossier .neo-culture{position:relative;min-height:410px;padding-right:clamp(190px,27vw,330px)}
.neo-dossier .neo-officer{position:absolute;bottom:0;right:12px;width:clamp(170px,25%,310px);max-height:410px;object-fit:contain;pointer-events:none}
.neo-dossier .neo-culture>*:not(img){position:relative;z-index:1}
.neo-symbol-pair{display:flex;gap:20px;justify-content:center;flex-wrap:wrap;margin:18px 0}
.neo-symbol-pair img{display:block;width:min(100%,220px);height:210px;object-fit:contain;border-radius:12px}
.neo-symbol-pair figure{margin:0;text-align:center;max-width:230px}.neo-symbol-pair figcaption{margin-top:8px;font-size:.78rem;letter-spacing:.1em;color:#a9c4dd}
.neo-group-shot{width:100%;height:auto;border-radius:12px;border:1px solid #48647f}
.faction-world-choice[data-faction="neo"]>img{object-fit:contain;background:#fff}
@media(max-width:760px){.neo-dossier .neo-header{padding-right:160px;min-height:320px}.neo-dossier .neo-grunt{width:160px;max-height:310px}.neo-dossier .neo-culture{padding-right:155px;min-height:310px}.neo-dossier .neo-officer{width:150px;max-height:300px}}
@media(max-width:480px){.neo-dossier .neo-header{padding-right:108px;min-height:250px}.neo-dossier .neo-grunt{width:110px;max-height:245px}.neo-dossier .neo-culture{padding-right:0;padding-bottom:225px}.neo-dossier .neo-officer{width:170px;max-height:220px}}

@keyframes fourFactionCycle{0%,21%{opacity:.84;transform:scale(1.02)}25%,99%{opacity:0;transform:scale(1.07)}100%{opacity:.84;transform:scale(1.02)}}
.archive-card-gallery-factions .archive-card-frame{animation:fourFactionCycle 20s linear infinite;opacity:0}
.archive-card-gallery-factions .archive-card-frame:nth-child(1){animation-delay:0s}
.archive-card-gallery-factions .archive-card-frame:nth-child(2){animation-delay:5s}
.archive-card-gallery-factions .archive-card-frame:nth-child(3){animation-delay:10s}
.archive-card-gallery-factions .archive-card-frame:nth-child(4){animation-delay:15s}

/* NST v7.5: square emblem headers, preserving natural aspect ratios */
.faction-dossier .faction-header .faction-emblem{width:100%;aspect-ratio:1/1;height:auto;min-height:0;max-height:none;overflow:hidden;align-self:center;background:#07090c}
.faction-dossier .faction-header .faction-emblem img{width:100%;height:100%;max-width:none;max-height:none;object-fit:contain;display:block}
.faction-dossier .faction-header .faction-emblem:has(img[src$="neo-empire-emblem.png"]){background:#fff}
.faction-dossier .faction-header .faction-emblem:has(img[src$="coalition-emblem.png"]){background:#10284b}
.faction-dossier .faction-header .faction-emblem:has(img[src$="union-emblem.png"]){background:#252923}
/* Union: decorative personnel and story-specific soldiers */
.union-dossier .union-header{position:relative;isolation:isolate;min-height:430px;padding-right:clamp(185px,25vw,325px)}
.union-dossier .union-grunt{position:absolute;bottom:0;right:8px;width:clamp(170px,25%,305px);max-height:430px;object-fit:contain;object-position:bottom;pointer-events:none;z-index:0;filter:drop-shadow(0 12px 15px #0009)}
.union-dossier .faction-title,.union-dossier .faction-emblem{z-index:1;position:relative}
.union-dossier .union-culture,.union-dossier .union-civil{position:relative;min-height:420px;padding-right:clamp(180px,28vw,335px)}
.union-dossier .union-representative,.union-dossier .union-stripes-figure{position:absolute;right:10px;bottom:0;width:clamp(175px,27%,310px);max-height:410px;object-fit:contain;object-position:bottom;pointer-events:none}
.union-dossier .union-culture>*:not(img),.union-dossier .union-civil>*:not(img){position:relative;z-index:1}
.union-wide-image{display:block;width:100%;height:auto;max-height:590px;object-fit:contain;border-radius:12px;border:1px solid #53647c;margin:16px 0}
.faction-world-choice[data-faction="union"]>img{object-fit:cover;object-position:center;background:#1e2b22}
@media(max-width:760px){.union-dossier .union-header{min-height:300px;padding-right:155px}.union-dossier .union-grunt{width:150px;max-height:300px}.union-dossier .union-culture,.union-dossier .union-civil{min-height:305px;padding-right:155px}.union-dossier .union-representative,.union-dossier .union-stripes-figure{max-height:300px;width:145px}}
@media(max-width:480px){.union-dossier .union-header{min-height:250px;padding-right:105px}.union-dossier .union-grunt{width:105px;max-height:245px}.union-dossier .union-culture,.union-dossier .union-civil{padding-right:0;padding-bottom:205px;min-height:0}.union-dossier .union-representative,.union-dossier .union-stripes-figure{height:200px;width:auto}}
@media(max-width:760px){.faction-dossier .faction-header .faction-emblem{width:min(100%,190px);min-height:0}.faction-dossier .faction-header .faction-emblem img{height:100%}}

@keyframes fiveFactionCycle{0%,17%{opacity:.84;transform:scale(1.02)}20%,99%{opacity:0;transform:scale(1.07)}100%{opacity:.84;transform:scale(1.02)}}
.archive-card-gallery-factions .archive-card-frame{animation:fiveFactionCycle 25s linear infinite;opacity:0}
.archive-card-gallery-factions .archive-card-frame:nth-child(1){animation-delay:0s}
.archive-card-gallery-factions .archive-card-frame:nth-child(2){animation-delay:5s}
.archive-card-gallery-factions .archive-card-frame:nth-child(3){animation-delay:10s}
.archive-card-gallery-factions .archive-card-frame:nth-child(4){animation-delay:15s}
.archive-card-gallery-factions .archive-card-frame:nth-child(5){animation-delay:20s}

/* NST v7.6: avoid letterbox bars in faction emblems; square source artwork fills square displays. */
.faction-dossier .faction-header .faction-emblem img{aspect-ratio:1/1;object-fit:cover}
.union-dossier .union-history-header{min-height:0;padding-right:24px;grid-template-columns:minmax(145px,245px) 1fr}
.union-dossier .union-war-record .union-war-header{min-height:380px}
.union-dossier .union-war-record .union-civil{min-height:470px}
.union-dossier .union-war-record .union-civil h4:not(:first-of-type){margin-top:24px}
@media(max-width:760px){.union-dossier .union-history-header{grid-template-columns:1fr;padding-right:15px}}

/* NST 7.7: distinct hacker organization snapshots */
.hacker-dossier .hacker-header{position:relative;isolation:isolate;min-height:420px;padding-right:clamp(165px,24vw,310px)}
.hacker-dossier .hacker-header .faction-emblem{background:#05070c}
.hacker-dossier .hacker-figure{position:absolute;bottom:0;right:10px;width:clamp(160px,22vw,295px);height:100%;object-fit:contain;object-position:bottom center;pointer-events:none;z-index:0}
.hacker-dossier .faction-title,.hacker-dossier .faction-emblem{z-index:1;position:relative}
.hacker-dossier .hacker-group{display:block;width:min(100%,860px);max-height:590px;object-fit:contain;object-position:center;border:1px solid #40506c;border-radius:12px;margin:16px auto 23px;background:#070b14}
.hacker-roster{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:9px;margin:18px 0}.hacker-roster span{border:1px solid #394b65;border-radius:7px;padding:12px;background:#101c2e;color:#dce5fb;font:700 12px Rajdhani,sans-serif;letter-spacing:.05em}
.patchworks-dossier .hacker-header{background:radial-gradient(ellipse at 10% 10%,#4c204760,transparent 65%),#121527}.patchworks-dossier .faction-status{color:#f6bbdf;border-color:#cf70ae}
.omnihack-dossier .hacker-header{background:radial-gradient(ellipse at 10% 40%,#17483370,transparent 65%),#09121c}
@media(max-width:760px){.hacker-dossier .hacker-header{padding-right:145px;min-height:300px}.hacker-dossier .hacker-figure{width:145px}}
@media(max-width:480px){.hacker-dossier .hacker-header{padding-right:96px;min-height:265px}.hacker-dossier .hacker-figure{width:105px}}

/* HOME: expanded organizations / two-era faction record */
.home-dossier .home-hero{background:radial-gradient(ellipse at 20% 20%,#9c532850,transparent 66%),#181b25;min-height:270px}
.home-dossier .faction-status{color:#ffc17d;border-color:#ad632b}
.home-head-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px;margin:18px 0}
.home-head{padding:14px;background:#101c2b;border:1px solid #45546c;border-radius:10px}
.home-head strong,.home-head small{display:block}.home-head strong{font-size:17px}.home-head small{color:#f2b978;margin:3px 0 8px;font-weight:700}.home-head p{margin:0;font-size:14px;line-height:1.55}
.home-orgs{display:flex;flex-direction:column;gap:16px;margin-top:20px}
.home-org{display:grid;grid-template-columns:125px minmax(0,1fr) 115px;align-items:center;gap:20px;min-height:170px;padding:15px;border:1px solid #41516a;border-radius:12px;background:linear-gradient(100deg,#111c2c,#182131)}
.home-org-icon{aspect-ratio:1;overflow:hidden;border-radius:10px;background:#090b12}.home-org-icon img{width:100%;height:100%;object-fit:contain}
.home-org-copy h5{font-size:19px;margin:0 0 5px;color:#f5e3cd}.home-org-copy small{display:block;color:#e5ad73;font-weight:700;margin-bottom:10px}.home-org-copy p{margin:0;line-height:1.6}
.home-org-figure{width:100%;height:155px;object-fit:contain;object-position:bottom}
.home-wide-img{display:block;width:100%;height:auto;max-height:750px;object-fit:contain;margin:16px auto;border:1px solid #41516a;border-radius:12px;background:#0c121c}
.home-memorial{max-height:850px;object-fit:contain}
.home-people{display:flex;justify-content:center;flex-wrap:wrap;gap:20px;margin:20px 0}.home-people figure{margin:0;width:min(42%,250px);text-align:center}.home-people figure img{width:100%;height:215px;object-fit:contain}.home-people figcaption strong,.home-people figcaption small{display:block}.home-people figcaption small{color:#f2b978}
.home-shadow-gallery{display:grid;grid-template-columns:1fr 1fr;gap:12px}.home-shadow-gallery img{width:100%;height:240px;object-fit:contain;background:#0b101a;border:1px solid #41516a;border-radius:10px}
@media(max-width:740px){.home-org{grid-template-columns:90px minmax(0,1fr) 78px;gap:10px;padding:10px}.home-org-figure{height:130px}.home-org-icon{width:90px}}
@media(max-width:520px){.home-org{grid-template-columns:82px minmax(0,1fr)}.home-org-icon{width:82px}.home-org-figure{grid-column:2;height:155px;justify-self:end;max-width:120px}.home-shadow-gallery{grid-template-columns:1fr}.home-shadow-gallery img{height:auto}}

.home-w-mark{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font:900 55px Rajdhani,sans-serif;color:#ffd64a;background:#19212b}

/* NST v8.1: Mainframe portrait has a shorter composition; anchor her actual image bottom, not oversized character art. */
.char-art.mainframe-dossier-art img{top:6px;bottom:auto;height:150%;max-height:none;width:auto;max-width:none;object-fit:contain;object-position:center top}

/* v8.5: consistent full-figure presentation */
/* Match Clyde's under-knee framing: enlarge within the existing clipped portrait viewport. */
.char-art.squad-dossier-art img,.char-art.marcus-dossier-art img{top:6px;bottom:auto;left:50%;height:150%;width:auto;max-width:none;object-fit:contain;object-position:center top;transform:translateX(-50%)}
.union-squad-photo{display:block;width:min(100%,720px);height:auto;margin:14px auto 18px;border-radius:12px;border:1px solid #506882}

/* v9.3.1: Keep Proxy's intentionally crooked honeymoon postcard fully visible. */
.proxy-honeymoon-panel .char-top{display:grid;grid-template-columns:minmax(0,43%) minmax(0,57%);align-items:center;position:relative;overflow:visible;min-width:0}
.proxy-honeymoon-panel .proxy-postcard-escape{box-sizing:border-box;position:relative;min-width:0;width:calc(100% - 22px);max-width:550px;margin:20px 0 18px 18px;transform:rotate(-5deg);transform-origin:center center;z-index:2;filter:drop-shadow(7px 9px 7px rgba(0,0,0,.38));pointer-events:none}
.proxy-honeymoon-panel .proxy-postcard-escape img{display:block;width:100%;height:auto;max-width:100%;border:5px solid #f6f4e9;border-radius:3px;box-sizing:border-box;object-fit:contain;background:#eee}
.proxy-honeymoon-panel .char-top-content{position:relative;z-index:1;min-width:0}
@media(max-width:850px){.proxy-honeymoon-panel .char-top{grid-template-columns:1fr}.proxy-honeymoon-panel .proxy-postcard-escape{width:min(85%,550px);margin:30px auto 12px;transform:rotate(-4deg)}.proxy-honeymoon-panel .char-top-content{padding:22px}}

/* Port Authority hierarchy: isolated from character dossiers */
.port-dossier .port-center{display:flex;justify-content:center}.port-center .port-person{max-width:260px;width:100%}.port-person{border:1px solid #45536b;border-radius:13px;background:#172437;padding:12px;min-width:0;text-align:center;display:flex;align-items:center;flex-direction:column;gap:6px}.port-person-art{height:190px;width:100%;display:flex;justify-content:center;align-items:center}.port-person-art img{height:100%;max-width:100%;object-fit:contain}.port-person strong{font-size:1rem}.port-person small{color:#b8c8da}.port-person button,.port-layout-head button{font:inherit;color:#e6f1ff;background:#293c58;border:1px solid #61748b;border-radius:6px;padding:7px 12px;cursor:pointer}.port-division-choice{background:#1b2c43;color:#edf4ff;border:1px solid #4a5970;border-radius:9px;padding:16px;text-align:left;cursor:pointer;font-weight:700}.port-division-choice small{display:block;color:#b2c8e0;margin-top:7px;font-weight:400}.port-divisions{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:12px}.port-division-choice.selected{outline:1px solid #ccaf64}.port-leadership{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:16px;max-width:820px;margin:16px auto}.port-special .port-person:first-child{grid-column:1/-1;max-width:250px;justify-self:center}.port-ranks{margin-top:22px;background:#19283a;border:1px solid #47586e;padding:16px;border-radius:8px}.port-ranks summary{cursor:pointer;font-weight:700}.port-note,.port-layout-head p,.port-ranks p{color:#bacbe0}.port-missing-portrait{padding:25px;color:#abbad0;font-size:12px}.port-layout-head h4{margin:12px 0}.port-lookup-note{padding:12px;color:#deceaa}@media(max-width:540px){.port-person-art{height:145px}.port-leadership{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Official Port Authority / division insignias */
.port-parent-emblem{display:block;width:min(220px,55%);height:auto;object-fit:contain;margin:0 auto 16px;border-radius:12px}
.port-division-choice{display:flex;flex-direction:column;align-items:center;text-align:center;gap:5px}
.port-division-emblem{width:min(100%,145px);aspect-ratio:1;object-fit:contain;border-radius:7px;margin-bottom:5px}
.port-division-choice span{font-weight:700}
.port-selected-emblem{display:block;width:min(245px,65%);aspect-ratio:1;object-fit:contain;margin:12px auto;border-radius:9px}
@media(max-width:540px){.port-division-emblem{width:min(100%,110px)}.port-parent-emblem{width:150px}}

/* Update 24.1: Story 1 Imperial command, isolated from Port Authority styles */
#faction-app .imperial24-entry{border:1px solid #89653e;background:linear-gradient(145deg,#1a1318,#25171a 66%,#140f16);color:#f3e4ca}
#faction-app .imperial24-entry>h4{color:#efcd90;letter-spacing:.14em}
#faction-app .imperial24-launch,#faction-app [data-imperial24-hide]{cursor:pointer;border:1px solid #ba8a50;background:#3a1820;color:#f8dda8;padding:12px 18px;font-weight:800;letter-spacing:.07em}
#faction-app .imperial24-hierarchy[hidden],#faction-app .imperial24-launch[hidden]{display:none!important}
#faction-app .imperial24-hierarchy{margin-top:20px;scroll-margin-top:24px}
#faction-app .imperial24-mast{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:16px;padding:14px;border-block:2px solid #a97b43;background:linear-gradient(90deg,#200b11,#492029,#200b11);font-weight:800;letter-spacing:.12em;text-align:center}
#faction-app .imperial24-mast img{height:66px;width:66px;object-fit:contain}
#faction-app .imperial24-mast button{margin-left:auto;font-size:.7rem}
#faction-app .imperial24-sovereign{display:flex;justify-content:center;padding:30px 0 20px}
#faction-app .imperial24-person{appearance:none;border:0;background:none;min-width:0;width:min(100%,215px);color:#f5e8db;cursor:pointer;display:flex;align-items:center;flex-direction:column;text-align:center;padding:0 2px 12px;transition:transform .18s}
#faction-app .imperial24-person:hover{transform:translateY(-5px)}
#faction-app .imperial24-person>img{width:100%;height:240px;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 9px 8px #000b)}
#faction-app .imperial24-emperor{width:min(100%,310px)}
#faction-app .imperial24-emperor>img{height:385px}
#faction-app .imperial24-plate{background:linear-gradient(120deg,#391b23,#201419);border:1px solid #b89457;box-shadow:0 3px 0 #100c10,inset 0 0 0 3px #201318;padding:11px 9px;display:flex;flex-direction:column;gap:4px;width:100%;min-height:64px;justify-content:center}
#faction-app .imperial24-plate strong{font-size:.94rem;line-height:1.25;color:#ffdfaa}
#faction-app .imperial24-plate small{font-size:.64rem;letter-spacing:.085em;color:#d9b994}
#faction-app .imperial24-person>em{font-style:normal;font-size:.69rem;line-height:1.45;max-width:200px;color:#c5b4a7;padding-top:8px}
#faction-app .imperial24-appointments{margin:4px auto 24px;padding:16px 10px;border-top:1px solid #6c4935;border-bottom:1px solid #6c4935}
#faction-app .imperial24-appointments h5,#faction-app .imperial24-branch h5{color:#eac68c;text-align:center;letter-spacing:.12em;margin:0 0 19px}
#faction-app .imperial24-pair{display:flex;justify-content:center;gap:30px;flex-wrap:wrap}
#faction-app .imperial24-branches{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}
#faction-app .imperial24-branch{min-width:0;padding:20px 12px;background:linear-gradient(#2c1a20,#191219);border:1px solid #92693d;display:flex;align-items:center;flex-direction:column;gap:13px}
#faction-app .imperial24-branch h5{width:100%;padding-bottom:12px;border-bottom:1px solid #845635}
#faction-app .imperial24-civic{grid-column:1/-1}
#faction-app .imperial24-branch .imperial24-person>img{height:240px}
#faction-app .imperial24-insignia{display:flex;align-items:center;gap:14px;padding:10px;border:1px solid #6b4e32;background:#1b1116;width:100%;max-width:370px}
#faction-app .imperial24-insignia img{width:100px;height:100px;object-fit:contain}
#faction-app .imperial24-insignia strong{color:#eec689;display:block}
#faction-app .imperial24-insignia small{color:#cbbba8;font-size:.72rem;line-height:1.5;display:block}
#faction-app .imperial24-ranks{border-top:1px solid #79523b;padding:12px;text-align:center;color:#e3cead}
#faction-app .imperial24-ranks p{font-size:.82rem;line-height:1.7}
#faction-app .imperial24-ranks small{color:#c2ac9c}
#faction-app .imperial24-representatives{width:100%;display:flex;gap:18px;justify-content:center}
#faction-app .imperial24-representatives>div{max-width:145px;text-align:center;color:#dab57d;font-size:.7rem;letter-spacing:.04em}
#faction-app .imperial24-representatives img{width:100%;height:175px;object-fit:contain;object-position:bottom}
#faction-app .imperial24-unit-title{text-align:center;display:flex;flex-direction:column;gap:3px;color:#f0cf94;border-top:1px solid #805b3b;padding-top:16px}
#faction-app .imperial24-unit-title small{color:#c7b5a0}
#faction-app .imperial24-units{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:13px;justify-items:center}
#faction-app .imperial24-units .imperial24-person{width:100%;max-width:160px}
#faction-app .imperial24-units .imperial24-person>img{height:170px}
#faction-app .imperial24-units .imperial24-plate strong{font-size:.82rem}
#faction-app .imperial24-units .imperial24-plate small{font-size:.55rem}
#faction-app .imperial24-footnote,#faction-app .imperial24-civic>p,#faction-app .imperial24-archive-note{color:#c9b4a0;font-size:.77rem;line-height:1.6}
#faction-app .imperial24-archive-note{margin-top:18px;padding:14px;border-left:3px solid #ae8352;background:#24171c}
@media(max-width:750px){#faction-app .imperial24-branches{grid-template-columns:1fr}#faction-app .imperial24-civic{grid-column:auto}#faction-app .imperial24-mast button{margin-left:0}#faction-app .imperial24-emperor>img{height:300px}}

/* Update 24.4 — Imperial command tiers (scoped to Imperial view) */
#faction-app .imperial24-chain{width:100%;display:flex;flex-direction:column;gap:10px;align-items:stretch}
#faction-app .imperial24-rank-tier{position:relative;display:flex;flex-direction:column;align-items:center;gap:9px;padding:10px 6px 12px;border-top:1px solid rgba(187,139,76,.4);background:linear-gradient(180deg,rgba(60,28,31,.32),transparent)}
#faction-app .imperial24-rank-tier:before{content:"";display:block;height:16px;border-left:2px solid #b38a55;margin:-10px auto 0}
#faction-app .imperial24-tier-label{text-align:center;color:#f4d49b;letter-spacing:.11em;font-size:.74rem}
#faction-app .imperial24-tier-label small{display:block;color:#c9b399;font-size:.66rem;letter-spacing:normal;margin-top:3px}
#faction-app .imperial24-roster{display:flex;width:100%;gap:12px;flex-wrap:wrap;justify-content:center;align-items:flex-end}
#faction-app .imperial24-support{width:clamp(104px,23%,160px);cursor:default}
#faction-app .imperial24-support:hover{transform:none}
#faction-app .imperial24-support>img{height:175px;object-position:center bottom}
#faction-app .imperial24-support .imperial24-plate{min-height:65px;padding:8px 5px}
#faction-app .imperial24-support .imperial24-plate strong{font-size:.78rem}
#faction-app .imperial24-support .imperial24-plate small{font-size:.56rem}
#faction-app .imperial24-subcommand{width:100%;padding:14px 8px;border:1px solid rgba(181,135,77,.65);background:linear-gradient(155deg,#28171d,#181219);display:flex;flex-direction:column;align-items:center;gap:13px}
#faction-app .imperial24-subcommand h6{margin:0;text-align:center;color:#f2cf91;letter-spacing:.12em;font-size:.78rem}
#faction-app .imperial24-subcommand>.imperial24-person{margin:auto}
#faction-app .imperial24-subcommand .imperial24-roster{max-width:760px}
#faction-app .imperial24-branch:first-child{gap:20px}
@media(max-width:560px){#faction-app .imperial24-support{width:clamp(105px,44%,150px)}#faction-app .imperial24-subcommand{padding:10px 4px}}

/* Update 24.5 — restore the complete width and readability of the Imperial command chart */
#faction-app .imperial24-branches{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start}
#faction-app .imperial24-branches>.imperial24-branch:first-child{grid-column:1/-1;padding:24px clamp(14px,3vw,36px);background:linear-gradient(160deg,#29161c,#191219 65%,#27151d)}
#faction-app .imperial24-branches>.imperial24-branch:first-child>.imperial24-chain{width:min(100%,920px);margin-inline:auto}
#faction-app .imperial24-branches>.imperial24-branch:first-child>.imperial24-subcommand{width:min(100%,1040px);margin-inline:auto}
#faction-app .imperial24-branch .imperial24-rank-tier{padding:16px 10px 19px;gap:12px;border-top:1px solid rgba(187,139,76,.5)}
#faction-app .imperial24-branch .imperial24-tier-label{font-size:.85rem;line-height:1.45}
#faction-app .imperial24-branch .imperial24-tier-label small{font-size:.71rem}
#faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-support{width:clamp(145px,19%,195px)}
#faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-support>img{height:210px}
#faction-app .imperial24-support>img{display:block;max-width:100%;object-fit:contain;object-position:bottom center}
#faction-app .imperial24-branch .imperial24-roster{gap:18px 22px}
#faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-plate{min-height:68px}
#faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-plate strong{font-size:.85rem}
#faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-plate small{font-size:.61rem}
#faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-subcommand .imperial24-roster{max-width:950px}
#faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-insignia{max-width:450px}
@media(max-width:750px){#faction-app .imperial24-branches{grid-template-columns:1fr}#faction-app .imperial24-branches>.imperial24-branch:first-child{grid-column:auto;padding:18px 10px}#faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-support{width:clamp(120px,40%,175px)}#faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-support>img{height:178px}}

/* Update 24.6: visible command, expandable subordinate formations */
#faction-app .imperial24-command-roster{width:min(100%,1050px);display:flex;flex-direction:column;align-items:center;gap:12px;margin:14px auto 0;border-top:1px solid #835d3a;padding-top:22px}
#faction-app .imperial24-command-roster .imperial24-insignia{max-width:430px}
#faction-app .imperial24-expand{width:100%;min-width:0;border:1px solid #a67a48;background:linear-gradient(135deg,#29171e,#181219);margin-top:8px}
#faction-app .imperial24-expand>summary{list-style:none;text-align:center;padding:16px 12px;color:#f5d7a2;font-weight:800;letter-spacing:.09em;cursor:pointer;background:linear-gradient(90deg,#3d2028,#29181e,#3d2028);border-bottom:1px solid transparent}
#faction-app .imperial24-expand>summary::-webkit-details-marker{display:none}
#faction-app .imperial24-expand>summary span{display:inline-block;margin-left:12px;transition:transform .18s}
#faction-app .imperial24-expand[open]>summary{border-bottom-color:#a67a48}
#faction-app .imperial24-expand[open]>summary span{transform:rotate(180deg)}
#faction-app .imperial24-expand-inner{padding:18px 12px;display:flex;flex-direction:column;align-items:center;gap:18px}
#faction-app .imperial24-expand-inner>.imperial24-chain{width:100%}
#faction-app .imperial24-expand-inner>.imperial24-subcommand{max-width:970px}
#faction-app .imperial24-reclamation{margin-top:8px}
#faction-app .imperial24-admiral-group{width:100%;display:flex;flex-direction:column;align-items:center;gap:12px}
#faction-app .imperial24-admiral-subordinate{display:flex;flex-direction:column;align-items:center;gap:9px;padding:12px 15px;border-left:2px solid #b38a55;background:rgba(55,28,35,.3)}
#faction-app .imperial24-admiral-subordinate>span{font-size:.69rem;letter-spacing:.09em;text-align:center;color:#e8c591}
#faction-app .imperial24-admiral-subordinate:before{content:'↓';color:#d1a26b;font-size:1.3rem}
#faction-app .imperial24-expand-inner .imperial24-units{max-width:520px}
@media(max-width:650px){#faction-app .imperial24-expand-inner{padding:12px 5px}#faction-app .imperial24-expand>summary{font-size:.74rem}}

/* Update 24.7: prominent chain of command and clickable named personnel */
#faction-app .imperial24-branch:first-child>.imperial24-command-roster{order:0;margin:10px auto 18px;padding:22px 16px;background:linear-gradient(180deg,rgba(115,48,56,.23),rgba(25,16,21,.12));border:1px solid rgba(185,130,70,.58);width:min(100%,960px)}
#faction-app .imperial24-navy-ranks-heading{order:1;width:min(100%,920px);text-align:center;padding:15px 8px;color:#f0d5a7;font-weight:800;letter-spacing:.12em;border-top:2px solid #a47a4b;border-bottom:1px solid #6c4935;background:#301b22}
#faction-app .imperial24-branch:first-child>.imperial24-chain{order:2}
#faction-app .imperial24-command-roster>.imperial24-person{width:min(100%,240px)}
#faction-app .imperial24-expand{display:block!important}
#faction-app .imperial24-expand>summary{display:block!important;cursor:pointer}
#faction-app .imperial24-expand[open]>.imperial24-expand-inner{display:flex}
#faction-app .imperial24-expand:not([open])>.imperial24-expand-inner{display:none}
#faction-app button.imperial24-support.imperial24-linkable{appearance:none;cursor:pointer;font:inherit;color:inherit;border:0;background:transparent}
#faction-app button.imperial24-support.imperial24-linkable:hover{transform:translateY(-5px);filter:brightness(1.12)}
#faction-app button.imperial24-support.imperial24-linkable:focus-visible{outline:2px solid #f0d5a7;outline-offset:3px}
#faction-app .imperial24-admiral-subordinate{margin:4px auto 0}
@media(max-width:650px){#faction-app .imperial24-branch:first-child>.imperial24-command-roster{padding:12px 6px}#faction-app .imperial24-navy-ranks-heading{font-size:.73rem}}

/* Update 24.8: equal full-width command branches and readable personnel galleries */
#faction-app .imperial24-branches{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:28px!important}
#faction-app .imperial24-branches>.imperial24-branch{width:100%!important;grid-column:auto!important;box-sizing:border-box;padding:26px clamp(14px,3vw,38px)!important;gap:20px}
#faction-app .imperial24-branches>.imperial24-branch>h5{width:100%;font-size:1.15rem;letter-spacing:.15em}
#faction-app .imperial24-branches>.imperial24-branch>.imperial24-person{width:min(100%,290px)}
#faction-app .imperial24-branches>.imperial24-branch>.imperial24-person>img{height:310px}
#faction-app .imperial24-branches>.imperial24-branch>.imperial24-command-roster{width:min(100%,1060px);box-sizing:border-box;margin:8px auto 0;padding:22px 14px}
#faction-app .imperial24-reclamation>.imperial24-person{margin:0 auto}
#faction-app .imperial24-reclamation>.imperial24-person>img{height:270px}
#faction-app .imperial24-branches>.imperial24-branch .imperial24-units{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:26px;width:100%}
#faction-app .imperial24-branches>.imperial24-branch .imperial24-units>.imperial24-person{width:clamp(185px,22vw,245px);max-width:245px}
#faction-app .imperial24-branches>.imperial24-branch .imperial24-units .imperial24-person>img{height:245px}
#faction-app .imperial24-branches>.imperial24-branch .imperial24-units .imperial24-plate strong{font-size:1rem}
#faction-app .imperial24-branches>.imperial24-branch .imperial24-units .imperial24-plate small{font-size:.65rem}
#faction-app .imperial24-branch>.imperial24-unit-title{width:100%}
@media(max-width:650px){#faction-app .imperial24-branches>.imperial24-branch{padding:18px 8px!important}#faction-app .imperial24-branches>.imperial24-branch .imperial24-units>.imperial24-person{width:44%;min-width:130px}#faction-app .imperial24-branches>.imperial24-branch .imperial24-units .imperial24-person>img{height:190px}}

/* v24.9: science first below imperial appointments, then Navy; vertical branch order */
#faction-app .imperial24-branches{display:flex!important;flex-direction:column!important;align-items:stretch!important}
#faction-app .imperial24-branches>.imperial24-branch{width:100%!important;box-sizing:border-box}

/* v24.10: contextual return from Imperial hierarchy */
#record-display .imperial24-dossier-return{position:sticky;top:8px;z-index:20;display:flex;justify-content:flex-start;padding:10px 4px;background:linear-gradient(90deg,rgba(22,29,42,.95),rgba(22,29,42,.50));}
#record-display .imperial24-dossier-return button{cursor:pointer;padding:12px 18px;color:#e9ca9c;background:#35232c;border:1px solid #ae7b4e;border-radius:6px;font:700 14px inherit;letter-spacing:.055em}

/* Update 24.12: Vampire Legion commander should have senior-officer portrait scale. */
#faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-admiral-subordinate>.imperial24-person{
  width:min(100%,340px)!important;
  max-width:340px!important;
}
#faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-admiral-subordinate>.imperial24-person>img{
  width:100%;height:435px!important;object-fit:contain;object-position:center bottom;
}
#faction-app .imperial24-admiral-subordinate{width:min(100%,540px);box-sizing:border-box;padding:24px 14px 20px}
@media(max-width:650px){
 #faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-admiral-subordinate>.imperial24-person{width:min(100%,260px)!important}
 #faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-admiral-subordinate>.imperial24-person>img{height:335px!important}
}

/* Update 24.13: commander portrait scale, without altering other navy tiers. */
#faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-admiral-subordinate>.imperial24-person{width:min(100%,430px)!important;max-width:430px!important}
#faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-admiral-subordinate>.imperial24-person>img{height:570px!important;max-height:none!important;width:100%!important;object-fit:contain;object-position:center bottom}
#faction-app .imperial24-admiral-subordinate{width:min(100%,660px);padding:20px 14px 24px}
@media(max-width:650px){#faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-admiral-subordinate>.imperial24-person{width:min(100%,335px)!important;max-width:335px!important}#faction-app .imperial24-branches>.imperial24-branch:first-child .imperial24-admiral-subordinate>.imperial24-person>img{height:450px!important}}

/* Update 25 · Crossbone Remnant · distinct red/black hierarchy */
#faction-app .crossbone25-section{--cb25-red:#bd484d;--cb25-line:rgba(214,87,86,.48);--cb25-gold:#d6b887}
#faction-app .crossbone25-toggle{padding:.85rem 1.4rem;background:linear-gradient(120deg,#62272d,#321b25);color:#fff2e8;border:1px solid #b75a57;border-radius:10px;font-weight:800;letter-spacing:.06em;cursor:pointer;margin:.9rem 0}
#faction-app .crossbone25-toggle:hover{background:#79353b}
#faction-app .crossbone25-hierarchy[hidden]{display:none!important}
#faction-app .crossbone25-hierarchy{margin:1.3rem 0;padding:1rem clamp(.7rem,2.5vw,1.7rem) 1.6rem;border:1px solid rgba(190,80,85,.62);border-radius:16px;background:radial-gradient(ellipse at top,rgba(113,28,37,.22),transparent 58%),linear-gradient(#1d1720,#120f18);color:#efe7e8;box-shadow:0 15px 40px rgba(0,0,0,.25)}
#faction-app .crossbone25-mast{display:flex;align-items:center;gap:1rem;min-height:100px;border-bottom:2px solid #7d343d;margin-bottom:1.2rem}
#faction-app .crossbone25-mast>img{width:66px;height:95px;object-fit:contain;opacity:.78}
#faction-app .crossbone25-mast>div{flex:1;display:grid;gap:.2rem}
#faction-app .crossbone25-mast strong{font-size:clamp(1.1rem,2.5vw,1.75rem);letter-spacing:.12em;color:#fce5e5}
#faction-app .crossbone25-mast span,#faction-app .crossbone25-mast small{color:#d9b6b6;font-size:.74rem;letter-spacing:.11em}
#faction-app .crossbone25-mast>button{border:1px solid #b45c65;background:#342029;color:#f7dfdf;padding:.55rem .65rem;border-radius:7px;cursor:pointer}
#faction-app .crossbone25-tier{margin:1rem auto 1.2rem;max-width:1100px}
#faction-app .crossbone25-tier-title{text-align:center;padding:.6rem .8rem;border-block:1px solid var(--cb25-line);background:linear-gradient(90deg,transparent,rgba(117,39,47,.35),transparent);margin-bottom:1rem;display:grid;gap:.25rem}
#faction-app .crossbone25-tier-title strong{letter-spacing:.11em;color:#f1c4bd;font-size:.91rem}
#faction-app .crossbone25-tier-title small{color:#beaeb1;font-size:.78rem}
#faction-app .crossbone25-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:1rem;margin:auto}
#faction-app .crossbone25-card{min-width:0;flex:0 1 175px;max-width:215px;text-align:center;display:flex;flex-direction:column;align-items:stretch;color:inherit;border:1px solid #693740;border-radius:11px;padding:0;background:linear-gradient(160deg,#30222b,#201923 72%);overflow:hidden;font:inherit;box-shadow:0 6px 17px rgba(0,0,0,.18)}
#faction-app button.crossbone25-card{cursor:pointer}
#faction-app button.crossbone25-card:hover{border-color:#db8679;transform:translateY(-2px);box-shadow:0 10px 24px rgba(0,0,0,.3)}
#faction-app button.crossbone25-card:focus-visible{outline:2px solid #e5b997;outline-offset:3px}
#faction-app .crossbone25-art{display:flex;align-items:end;justify-content:center;height:218px;padding:6px 6px 0;background:radial-gradient(ellipse at bottom,rgba(179,44,55,.2),transparent 75%)}
#faction-app .crossbone25-art img{display:block;max-width:100%;width:auto;height:100%;object-fit:contain;object-position:center bottom}
#faction-app .crossbone25-name{display:grid;gap:.2rem;padding:.75rem .45rem .6rem;border-top:1px solid rgba(212,102,92,.4);background:#38232b;min-height:65px}
#faction-app .crossbone25-name strong{color:#fff0e7;font-size:.87rem}
#faction-app .crossbone25-name small{color:#d2a69d;font-size:.64rem;letter-spacing:.055em}
#faction-app .crossbone25-detail{display:block;padding:.5rem .55rem;font-size:.7rem;color:#cfc4c6;line-height:1.4}
#faction-app .crossbone25-open{margin-top:auto;padding:.5rem;background:#492b33;color:#ebcdb8;font-size:.65rem;letter-spacing:.06em}
#faction-app .crossbone25-line{width:1px;height:28px;margin:.15rem auto;background:#a84851}
#faction-app .crossbone25-division{text-align:center;color:#f2c6ad;padding:1rem .4rem;border:1px solid #783d45;margin:2rem 0 1.1rem;border-radius:8px;background:#42252d;font-size:.81rem;font-weight:800;letter-spacing:.09em}
#faction-app .crossbone25-footnote{border-top:1px solid #59343c;padding-top:1rem;margin:1.4rem 0 0;font-size:.78rem;color:#b7abb0}
#faction-app .crossbone25-aftermath-intro{text-align:center;border:1px solid #65404a;border-radius:9px;padding:1rem;margin-bottom:1rem}
#faction-app .crossbone25-aftermath-intro strong{color:#f3c8c3;letter-spacing:.07em}
#faction-app .crossbone25-aftermath-intro p{font-size:.86rem;margin:.5rem 0 0}
#faction-app .crossbone25-old{border:1px solid #6e4248;border-radius:10px;padding:.9rem;margin:1rem 0}
#faction-app .crossbone25-old>summary{cursor:pointer;color:#f3c6c4;font-weight:700;letter-spacing:.06em}
#faction-app .crossbone25-old>.crossbone25-grid{margin-top:1rem}
@media(max-width:620px){#faction-app .crossbone25-card{flex-basis:calc(50% - .6rem)}#faction-app .crossbone25-art{height:165px}#faction-app .crossbone25-mast>img{display:none}#faction-app .crossbone25-mast{flex-wrap:wrap;padding:.8rem 0}#faction-app .crossbone25-mast>button{margin-left:auto}}
@media(prefers-reduced-motion:reduce){#faction-app .crossbone25-card{transition:none!important}}

/* Update 25.1: Crossbone hierarchy uses the Empire's dedicated, free-standing portrait presentation. */
#faction-app .crossbone25-dedicated{width:100%;max-width:none}
#faction-app .crossbone25-dedicated .crossbone25-section{padding:18px clamp(10px,2vw,26px);background:linear-gradient(145deg,#1a1318,#25171a 66%,#140f16);border:1px solid #89653e;color:#f3e4ca}
#faction-app .crossbone25-dedicated .crossbone25-hierarchy{margin:12px 0 0;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
#faction-app .crossbone25-dedicated .crossbone25-mast{padding:12px 16px;min-height:85px;border-block:2px solid #ab654f;background:linear-gradient(90deg,#200b11,#492029,#200b11)}
#faction-app .crossbone25-dedicated .crossbone25-spine{display:flex;flex-direction:column;align-items:stretch;gap:3px}
#faction-app .crossbone25-dedicated .crossbone25-tier{width:100%;max-width:none;margin:8px auto 12px}
#faction-app .crossbone25-dedicated .crossbone25-tier-title{max-width:820px;margin:0 auto 10px;background:none;border:0;border-bottom:1px solid rgba(187,139,76,.4);padding:10px 5px 8px}
#faction-app .crossbone25-dedicated .crossbone25-grid{gap:18px;align-items:start}
#faction-app .crossbone25-dedicated .crossbone25-card{appearance:none;background:none;border:0;border-radius:0;box-shadow:none;overflow:visible;padding:0 2px 10px;flex:0 1 190px;width:190px;max-width:215px;min-width:0;display:flex;flex-direction:column;align-items:center;text-align:center;color:#f5e8db;transition:transform .18s}
#faction-app .crossbone25-dedicated button.crossbone25-card:hover{transform:translateY(-5px);border:0;box-shadow:none}
#faction-app .crossbone25-dedicated .crossbone25-art{width:100%;height:235px;padding:0;background:none;display:flex;align-items:end;justify-content:center}
#faction-app .crossbone25-dedicated .crossbone25-art img{width:100%;height:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 9px 8px #000b)}
#faction-app .crossbone25-dedicated .crossbone25-name{display:flex;flex-direction:column;justify-content:center;gap:4px;width:100%;min-height:64px;padding:11px 9px;border:1px solid #b89457;border-radius:0;background:linear-gradient(120deg,#391b23,#201419);box-shadow:0 3px 0 #100c10,inset 0 0 0 3px #201318}
#faction-app .crossbone25-dedicated .crossbone25-name strong{font-size:.94rem;color:#ffdfaa}
#faction-app .crossbone25-dedicated .crossbone25-name small{font-size:.64rem;color:#d9b994}
#faction-app .crossbone25-dedicated .crossbone25-detail{font-size:.69rem;line-height:1.45;color:#c5b4a7;padding:8px 0 0}
#faction-app .crossbone25-dedicated .crossbone25-open{padding:5px 0;background:none;color:#dcbf91}
#faction-app .crossbone25-dedicated .crossbone25-tier:first-child .crossbone25-card{width:min(100%,300px);max-width:300px;flex-basis:300px}
#faction-app .crossbone25-dedicated .crossbone25-tier:first-child .crossbone25-art{height:350px}
#faction-app .crossbone25-dedicated .crossbone25-division{border:0;border-block:1px solid #79523b;border-radius:0;background:none}
#faction-app .crossbone25-dedicated .crossbone25-aftermath-intro{border:0;border-bottom:1px solid #79523b;border-radius:0}
#faction-app .crossbone25-dedicated .crossbone25-archive-grid{margin:15px 0 25px}
@media(max-width:620px){#faction-app .crossbone25-dedicated .crossbone25-card{flex:0 1 calc(50% - 12px);width:calc(50% - 12px)}#faction-app .crossbone25-dedicated .crossbone25-art{height:175px}#faction-app .crossbone25-dedicated .crossbone25-tier:first-child .crossbone25-art{height:265px}}

/* Update 26 — Neo Empire dedicated command hierarchy */
#faction-app .neo26-launch{background:linear-gradient(110deg,#5f242c,#a75e43);border:1px solid #e6c48d;color:#fff4dc;border-radius:8px;padding:13px 19px;font-weight:800;letter-spacing:.08em;cursor:pointer}
#faction-app .neo26-dedicated{--neo-gold:#e7c891;--neo-red:#ba4145;width:100%}
#faction-app .neo26-hierarchy{padding:clamp(14px,3vw,32px);border:1px solid #8d5c4b;border-radius:15px;background:radial-gradient(circle at top,rgba(161,65,62,.13),transparent 46%),linear-gradient(140deg,#211b24,#15151d 70%);color:#faf2eb}
#faction-app .neo26-mast{display:flex;align-items:center;gap:16px;border-bottom:1px solid #9e6a52;padding-bottom:22px;margin-bottom:25px}
#faction-app .neo26-mast img{width:95px;height:100px;object-fit:contain}
#faction-app .neo26-mast span{font-size:.73rem;color:var(--neo-gold);letter-spacing:.14em}
#faction-app .neo26-mast h4{margin:5px 0;font-size:clamp(1.3rem,3vw,2rem);letter-spacing:.12em;color:#fff5ea}
#faction-app .neo26-mast p{margin:0;color:#d1c3ba}
#faction-app .neo26-tier,#faction-app .neo26-associate{margin:22px 0 30px;text-align:center}
#faction-app .neo26-heading{border-top:1px solid rgba(226,189,137,.32);padding:15px 8px 6px;max-width:1050px;margin:0 auto 12px}
#faction-app .neo26-heading h5{margin:0;color:var(--neo-gold);font-size:clamp(.9rem,1.7vw,1.15rem);letter-spacing:.1em}
#faction-app .neo26-heading p{margin:7px auto 0;font-size:.84rem;color:#bdb2b2}
#faction-app .neo26-roster{display:flex;align-items:flex-end;justify-content:center;flex-wrap:wrap;column-gap:clamp(13px,2.4vw,35px);row-gap:28px;max-width:1200px;margin:12px auto 0}
#faction-app .neo26-person{appearance:none;cursor:default;display:flex;align-items:center;flex-direction:column;width:clamp(155px,19vw,215px);min-width:0;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:center}
#faction-app .neo26-person img{display:block;width:100%;height:clamp(220px,27vw,300px);object-fit:contain;object-position:center bottom;filter:drop-shadow(0 10px 12px rgba(0,0,0,.32))}
#faction-app .neo26-name{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:10px 8px 7px;margin-top:2px;min-height:51px;border-top:2px solid #c5a37b;width:100%;box-sizing:border-box}
#faction-app .neo26-name strong{font-size:.95rem;color:#fff2df}
#faction-app .neo26-name small{font-size:.67rem;letter-spacing:.065em;color:#dec9b8}
#faction-app .neo26-person em{font-size:.72rem;color:#aca1a5;line-height:1.45;font-style:normal;max-width:215px}
#faction-app button.neo26-linked{cursor:pointer}
#faction-app button.neo26-linked:hover{transform:translateY(-5px);filter:brightness(1.16)}
#faction-app button.neo26-linked:focus-visible{outline:2px solid var(--neo-gold);outline-offset:4px}
#faction-app .neo26-tier:first-of-type .neo26-person{width:min(100%,295px)}
#faction-app .neo26-tier:first-of-type .neo26-person img{height:385px}
#faction-app .neo26-connector{width:2px;height:30px;margin:0 auto;background:linear-gradient(var(--neo-gold),var(--neo-red))}
#faction-app .neo26-branch-title{margin:8px auto;padding:12px 16px;width:fit-content;max-width:100%;box-sizing:border-box;border-bottom:2px solid #bd6b5c;font-weight:850;letter-spacing:.14em;color:#fff0dc}
#faction-app .neo26-branch-title small{display:block;font-weight:400;letter-spacing:normal;color:#c9b6ae;margin-top:6px}
#faction-app .neo26-associate{max-width:650px;margin:0 auto 28px;padding:10px 10px 15px;border-top:1px dashed #b79072;border-bottom:1px dashed #b79072}
#faction-app .neo26-footnote{text-align:center;color:#baa9a4;font-size:.79rem;line-height:1.6;margin:27px auto 0;max-width:780px}
@media(max-width:620px){#faction-app .neo26-mast img{width:65px;height:80px}#faction-app .neo26-person{width:45%;max-width:200px}#faction-app .neo26-person img{height:220px}#faction-app .neo26-tier:first-of-type .neo26-person img{height:310px}#faction-app .neo26-heading h5{font-size:.85rem}}

/* Update 27 — Reformation Coalition Stories 2 and 3 hierarchy */
#faction-app .coal27-entry button{border:1px solid #80b7df;background:linear-gradient(115deg,#16476a,#2575a9);padding:12px 18px;border-radius:8px;color:white;font-weight:800;letter-spacing:.065em;cursor:pointer}
#faction-app .coal27-hierarchy{padding:clamp(16px,3vw,34px);background:radial-gradient(ellipse at top,rgba(28,91,156,.18),transparent 55%),linear-gradient(140deg,#17243b,#101928);border:1px solid #4b739d;border-radius:15px;color:#f3f8ff}
#faction-app .coal27-banner{display:flex;align-items:center;gap:20px;border-bottom:1px solid #4a7298;padding-bottom:20px;margin-bottom:24px}
#faction-app .coal27-banner img{width:95px;height:95px;object-fit:contain}
#faction-app .coal27-banner span{font-size:.73rem;letter-spacing:.12em;color:#96d4ff}
#faction-app .coal27-banner h4{font-size:clamp(1.4rem,2.6vw,2rem);margin:6px 0;color:white;letter-spacing:.09em}
#faction-app .coal27-banner p{margin:0;color:#b4c7db}
#faction-app .coal27-tier{text-align:center;margin:20px auto 34px}
#faction-app .coal27-tier header{padding:13px 8px 6px;border-top:1px solid #45698a;max-width:1000px;margin:0 auto 10px}
#faction-app .coal27-tier h5{margin:0;letter-spacing:.1em;font-size:1.05rem;color:#a9ddff}
#faction-app .coal27-tier header p{color:#adc2d4;font-size:.84rem;margin:6px 0}
#faction-app .coal27-people{display:flex;justify-content:center;align-items:flex-end;gap:clamp(14px,2.8vw,34px);flex-wrap:wrap}
#faction-app .coal27-person{appearance:none;border:0;background:none;color:inherit;padding:0;display:flex;flex-direction:column;align-items:center;width:clamp(155px,18vw,210px);font:inherit;cursor:default;text-align:center}
#faction-app .coal27-person img{width:100%;height:clamp(220px,25vw,305px);object-fit:contain;object-position:center bottom;filter:drop-shadow(0 10px 14px rgba(0,0,0,.5))}
#faction-app .coal27-label{border-top:2px solid #649fce;display:flex;flex-direction:column;gap:4px;width:100%;min-height:52px;padding:10px 5px 5px;box-sizing:border-box}
#faction-app .coal27-label strong{font-size:.96rem;color:#f8fcff}
#faction-app .coal27-label small{font-size:.68rem;color:#bad6ec;letter-spacing:.04em}
#faction-app .coal27-person em{font-style:normal;color:#a9b9ca;font-size:.75rem;margin-top:4px}
#faction-app button.coal27-clickable{cursor:pointer}
#faction-app button.coal27-clickable:hover{transform:translateY(-5px);filter:brightness(1.15)}
#faction-app button.coal27-clickable:focus-visible{outline:2px solid #9bd9ff;outline-offset:4px}
#faction-app .coal27-tier:first-of-type .coal27-person{width:min(100%,270px)}
#faction-app .coal27-tier:first-of-type .coal27-person img{height:360px}
#faction-app .coal27-stem{height:26px;width:2px;margin:0 auto;background:linear-gradient(#9bd9ff,#3178a5)}
#faction-app .coal27-army{text-align:center;color:#ebf7ff;font-weight:800;letter-spacing:.13em;padding:10px;margin:6px auto}
#faction-app .coal27-army small{display:block;letter-spacing:normal;font-weight:400;color:#a9c4db;margin-top:6px}
#faction-app .coal27-footnote{margin:30px auto 0;max-width:780px;text-align:center;font-size:.79rem;color:#a2b6c6;line-height:1.6}
@media(max-width:620px){#faction-app .coal27-banner img{width:60px;height:60px}#faction-app .coal27-person{width:45%}#faction-app .coal27-person img{height:215px}#faction-app .coal27-tier:first-of-type .coal27-person img{height:300px}}

/* Update 27.1: Darrian maintains his imposing height alongside Tess. */
#faction-app .coal27-person.coal27-darrian{width:clamp(174px,20vw,230px)}
#faction-app .coal27-person.coal27-darrian img{height:clamp(245px,28vw,330px)}
@media(max-width:620px){#faction-app .coal27-person.coal27-darrian{width:48%}#faction-app .coal27-person.coal27-darrian img{height:235px}}

/* Update 28: Story 4 Coalition branching hierarchy */
#faction-app .coal28-hierarchy{padding:clamp(14px,2.3vw,30px);background:radial-gradient(ellipse at top,#204b70 0%,#121e32 56%,#101724 100%);color:#eff8ff;border:1px solid #52769b;border-radius:14px}
#faction-app .coal28-banner{display:flex;gap:18px;align-items:center;border-bottom:1px solid #5a80a5;padding-bottom:20px}
#faction-app .coal28-banner img{width:92px;height:92px;object-fit:contain}
#faction-app .coal28-banner span{font-size:.72rem;letter-spacing:.12em;color:#a2d6f9}
#faction-app .coal28-banner h4{font-size:clamp(1.3rem,2.5vw,2rem);margin:5px 0;color:white}
#faction-app .coal28-banner p{color:#b7c9d9;margin:0}
#faction-app .coal28-tier{text-align:center;margin:20px auto 24px;min-width:0}
#faction-app .coal28-tier header{border-top:1px solid #527ba1;padding:12px 6px 5px}
#faction-app .coal28-tier h5{color:#abdcff;font-size:1.04rem;letter-spacing:.08em;margin:0}
#faction-app .coal28-tier header p{color:#bacbdc;font-size:.82rem;margin:7px 0}
#faction-app .coal28-people{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:clamp(8px,1.2vw,20px)}
#faction-app .coal28-person{appearance:none;border:0;background:transparent;color:inherit;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:0;width:clamp(125px,14vw,180px);cursor:default;font:inherit;text-align:center}
#faction-app .coal28-person img{width:100%;height:clamp(180px,20vw,260px);object-fit:contain;object-position:center bottom;filter:drop-shadow(0 10px 12px rgba(0,0,0,.5))}
#faction-app .coal28-label{border-top:2px solid #71add9;display:flex;flex-direction:column;gap:5px;padding:10px 3px;width:100%;box-sizing:border-box;min-height:55px}
#faction-app .coal28-label strong{font-size:.89rem;color:#fff}
#faction-app .coal28-label small{font-size:.64rem;color:#b9d8ed;letter-spacing:.02em}
#faction-app .coal28-person em{font-size:.72rem;color:#9cbdd8;font-style:normal}
#faction-app button.coal28-clickable{cursor:pointer}
#faction-app button.coal28-clickable:hover{transform:translateY(-5px);filter:brightness(1.14)}
#faction-app button.coal28-clickable:focus-visible{outline:2px solid #afddff;outline-offset:4px}
#faction-app .coal28-government .coal28-person{width:clamp(175px,20vw,235px)}
#faction-app .coal28-government .coal28-person img{height:clamp(255px,29vw,355px)}
#faction-app .coal28-stem{width:2px;height:28px;background:linear-gradient(#b7ddff,#4f86b0);margin:0 auto}
#faction-app .coal28-branch-head{text-align:center;color:#fff;letter-spacing:.08em;font-weight:800;margin:10px auto}
#faction-app .coal28-branch-head small{display:block;font-weight:400;letter-spacing:normal;color:#b1c9dc;margin-top:5px}
#faction-app .coal28-branches{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:start}
#faction-app .coal28-branches .coal28-tier{border:1px solid #426f96;border-radius:12px;padding:8px;margin:10px 0;background:#12263a9c}
#faction-app .coal28-branches .coal28-person{width:clamp(105px,10.7vw,150px)}
#faction-app .coal28-branches .coal28-person img{height:clamp(150px,16vw,215px)}
#faction-app .coal28-honors{border-top:1px solid #527ba1;padding-top:16px;margin-top:24px}
#faction-app .coal28-footnote{font-size:.77rem;color:#a8c4d9;text-align:center;max-width:850px;margin:26px auto 0;line-height:1.6}
@media(max-width:950px){#faction-app .coal28-branches{grid-template-columns:1fr}#faction-app .coal28-branches .coal28-person{width:clamp(135px,24vw,190px)}#faction-app .coal28-branches .coal28-person img{height:245px}}
@media(max-width:530px){#faction-app .coal28-person{width:44%}#faction-app .coal28-banner img{width:60px;height:60px}#faction-app .coal28-branches .coal28-person{width:44%}#faction-app .coal28-branches .coal28-person img{height:205px}}

/* Update 28.1 — Story 4 Coalition: vertical hierarchy, distinct leadership, ceremonial Hero prominence. */
#faction-app .coal28-cyrus .coal28-person{width:clamp(190px,22vw,255px)}
#faction-app .coal28-cyrus .coal28-person img{height:clamp(290px,32vw,390px)}
#faction-app .coal28-tess .coal28-person{width:clamp(165px,19vw,215px)}
#faction-app .coal28-tess .coal28-person img{height:clamp(245px,27vw,335px)}
#faction-app .coal28-face{margin:20px auto 34px}
#faction-app .coal28-face .coal28-person{width:clamp(185px,21vw,245px)}
#faction-app .coal28-face .coal28-person img{height:clamp(275px,31vw,365px)}
#faction-app .coal28-institution-heading{text-align:center;color:#fff;letter-spacing:.08em;font-weight:800;margin:28px auto 8px;border-top:1px solid #527ba1;padding-top:20px}
#faction-app .coal28-institution-heading small{display:block;font-weight:400;letter-spacing:normal;color:#b1c9dc;margin-top:6px}
#faction-app .coal28-hierarchy > .coal28-gods,#faction-app .coal28-hierarchy > .coal28-hackers,#faction-app .coal28-hierarchy > .coal28-military{max-width:1000px;margin:20px auto 27px}
#faction-app .coal28-hierarchy > .coal28-gods .coal28-person,#faction-app .coal28-hierarchy > .coal28-hackers .coal28-person,#faction-app .coal28-hierarchy > .coal28-military .coal28-person{width:clamp(130px,15vw,185px)}
#faction-app .coal28-hierarchy > .coal28-gods .coal28-person img,#faction-app .coal28-hierarchy > .coal28-hackers .coal28-person img,#faction-app .coal28-hierarchy > .coal28-military .coal28-person img{height:clamp(195px,22vw,275px)}
@media(max-width:530px){#faction-app .coal28-hierarchy > .coal28-gods .coal28-person,#faction-app .coal28-hierarchy > .coal28-hackers .coal28-person,#faction-app .coal28-hierarchy > .coal28-military .coal28-person{width:44%}}

/* Update 28.2: formal military hierarchy, Story 2/3/4 hierarchy navigation. */
#faction-app .coal28-military-hierarchy{max-width:1000px;margin:26px auto 0}
#faction-app .coal28-military-heading{text-align:center;color:#d2ebff;letter-spacing:.12em;font-size:1.12rem;font-weight:800;border-top:2px solid #6faad4;padding-top:20px;margin-bottom:16px}
#faction-app .coal28-military-heading small{display:block;font-weight:400;font-size:.79rem;letter-spacing:normal;color:#abc5db;margin:8px auto 0}
#faction-app .coal28-military-hierarchy .coal28-tier{margin:12px auto}
#faction-app .coal28-military-hierarchy .coal28-tier header{border-top:0}
#faction-app .coal28-military-hierarchy .coal28-people{justify-content:center}
#faction-app .coal28-military-hierarchy .coal28-rank-commander .coal28-person{width:clamp(180px,21vw,245px)}
#faction-app .coal28-military-hierarchy .coal28-rank-commander .coal28-person img{height:clamp(270px,30vw,360px)}
#faction-app .coal28-military-hierarchy .coal28-rank-commodore .coal28-person{width:clamp(165px,19vw,225px)}
#faction-app .coal28-military-hierarchy .coal28-rank-commodore .coal28-person img{height:clamp(245px,27vw,325px)}
#faction-app .coal28-military-hierarchy .coal28-rank-officer .coal28-person,#faction-app .coal28-military-hierarchy .coal28-rank-infantry .coal28-person{width:clamp(145px,16vw,200px)}
#faction-app .coal28-military-hierarchy .coal28-rank-officer .coal28-person img,#faction-app .coal28-military-hierarchy .coal28-rank-infantry .coal28-person img{height:clamp(210px,23vw,285px)}
#faction-app .coal-hierarchy-tabs{margin:12px auto 22px;justify-content:center}
@media(max-width:530px){#faction-app .coal28-military-hierarchy .coal28-rank-commander .coal28-person,#faction-app .coal28-military-hierarchy .coal28-rank-commodore .coal28-person{width:70%}}


/* Update 29 · Union 1–2 historic hierarchy; unboxed full-body artwork */
#faction-app .union29-entry button{background:#1b3d2d;color:#e9f9de;border:1px solid #8db78a;border-radius:8px;padding:12px 19px;font-weight:800;cursor:pointer}
#faction-app .union29-dedicated{color:#eaf3e5}
#faction-app .union29-hierarchy{background:linear-gradient(180deg,#111e16,#121c16 45%,#152219);border:1px solid #416349;border-radius:15px;padding:20px clamp(12px,2.5vw,30px) 28px;max-width:1200px;margin:22px auto}
#faction-app .union29-banner{display:flex;align-items:center;justify-content:center;gap:20px;text-align:left;border-bottom:1px solid #4c7651;padding:10px 0 20px;margin-bottom:16px}
#faction-app .union29-banner img{width:100px;height:100px;object-fit:contain}
#faction-app .union29-banner span{font-size:.75rem;letter-spacing:.17em;color:#a6cb9b}
#faction-app .union29-banner h3{font-size:clamp(1.15rem,2.3vw,1.85rem);margin:4px 0;color:#fff}
#faction-app .union29-banner p{font-size:.86rem;color:#c2d7bd;margin:0;max-width:690px}
#faction-app .union29-tier{margin:16px auto 26px;text-align:center}
#faction-app .union29-tier header{margin-bottom:12px}
#faction-app .union29-tier h4{font-size:1.14rem;letter-spacing:.11em;color:#c4e4af;margin:0 0 8px}
#faction-app .union29-tier header p{margin:0;color:#aec6aa;font-size:.84rem}
#faction-app .union29-grid{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:16px 30px}
#faction-app .union29-person{display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch;width:clamp(145px,18vw,210px);background:transparent!important;border:0!important;padding:0;color:inherit;text-align:center;font:inherit;min-width:0;position:relative}
#faction-app button.union29-person{cursor:pointer}
#faction-app button.union29-person:hover .union29-art img,#faction-app button.union29-person:focus-visible .union29-art img{transform:scale(1.035);filter:drop-shadow(0 0 10px #93d48e)}
#faction-app button.union29-person:focus-visible{outline:2px solid #a4d889;outline-offset:3px}
#faction-app .union29-art{height:clamp(210px,27vw,335px);display:flex;align-items:flex-end;justify-content:center;overflow:visible}
#faction-app .union29-art img{display:block;max-width:100%;width:100%;height:100%;object-fit:contain;object-position:bottom center;transition:transform .18s,filter .18s}
#faction-app .union29-label{border-top:2px solid #80aa79;padding-top:9px;margin-top:7px;display:flex;flex-direction:column;align-items:center;gap:4px;min-height:66px}
#faction-app .union29-label strong{font-size:clamp(.85rem,1.4vw,1.05rem);line-height:1.15;color:#fff}
#faction-app .union29-label small{color:#bdd9ad;font-size:.72rem;letter-spacing:.025em}
#faction-app .union29-label em{font-size:.71rem;font-style:normal;color:#95af9a}
#faction-app .union29-council .union29-person{width:min(100%,850px)}
#faction-app .union29-council .union29-art{height:auto;aspect-ratio:2.6}
#faction-app .union29-council .union29-art img{object-fit:contain;max-width:100%}
#faction-app .union29-council .union29-label{margin:0 auto;max-width:480px}
#faction-app .union29-oversight .union29-person,#faction-app .union29-high .union29-person{width:clamp(175px,20vw,235px)}
#faction-app .union29-oversight .union29-art,#faction-app .union29-high .union29-art{height:clamp(260px,31vw,375px)}
#faction-app .union29-squad .union29-person{width:clamp(130px,15vw,190px)}
#faction-app .union29-squad .union29-art{height:clamp(190px,23vw,285px)}
#faction-app .union29-line{height:26px;width:2px;background:#5e865e;margin:0 auto 10px}
#faction-app .union29-branch-note{font-size:1rem;letter-spacing:.1em;font-weight:800;color:#dceccb;border-top:1px solid #537553;max-width:1000px;padding:18px 0 2px;text-align:center;margin:18px auto 8px}
#faction-app .union29-marcy{border-bottom:1px solid #385541;max-width:650px;padding-bottom:12px}
#faction-app .union29-footnote{color:#a7c5a3;text-align:center;font-size:.76rem;line-height:1.6;max-width:850px;margin:24px auto 0}
@media(max-width:600px){#faction-app .union29-banner{flex-direction:column;text-align:center}#faction-app .union29-grid{gap:18px 12px}#faction-app .union29-person{width:43%}#faction-app .union29-high .union29-person{width:44%}#faction-app .union29-council .union29-person{width:100%}#faction-app .union29-art{height:225px}#faction-app .union29-high .union29-art{height:285px}#faction-app .union29-squad .union29-art{height:200px}}

/* Update 29.1: Keep Generals together; give Jacob the larger physical presence his art warrants. */
#faction-app .union29-generals .union29-grid{gap:20px 28px;flex-wrap:nowrap}
#faction-app .union29-generals .union29-person{width:clamp(160px,19vw,230px)}
#faction-app .union29-squad .union29-grid{gap:16px 14px}
#faction-app .union29-squad .union29-person.union29-jacob-lead{width:clamp(195px,22vw,250px)}
#faction-app .union29-squad .union29-jacob-lead .union29-art{height:clamp(295px,33vw,355px)}
@media(max-width:720px){#faction-app .union29-generals .union29-grid{flex-wrap:wrap}#faction-app .union29-generals .union29-person{width:45%}#faction-app .union29-squad .union29-person.union29-jacob-lead{width:48%}#faction-app .union29-squad .union29-jacob-lead .union29-art{height:270px}}

/* Update 30: rival Union commands (Story 3), following the existing unboxed portrait convention. */
#faction-app .union30-split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:stretch;margin:22px auto 12px;max-width:1200px}
#faction-app .union30-side{min-width:0;border:1px solid #47704e;border-radius:12px;background:linear-gradient(180deg,rgba(38,64,43,.30),rgba(11,27,21,.16));padding:22px 14px 28px;text-align:center}
#faction-app .union30-red{border-color:#90524e;background:linear-gradient(180deg,rgba(85,33,32,.26),rgba(27,16,16,.10))}
#faction-app .union30-side>header h4{font-size:clamp(1.18rem,2vw,1.65rem);letter-spacing:.09em;color:#d5ebc6;margin:0}
#faction-app .union30-red>header h4{color:#f2c3bf}
#faction-app .union30-side>header p{font-size:.88rem;color:#b9cbbc;margin:8px 0 22px}
#faction-app .union30-rank{display:flex;justify-content:center;gap:16px;align-items:flex-end;margin:10px auto 18px}
#faction-app .union30-rank+.union30-rank{padding-top:15px;border-top:1px solid rgba(170,195,161,.16)}
#faction-app .union30-rank .union29-person{width:min(65%,230px)}
#faction-app .union30-rank .union29-art{height:clamp(215px,27vw,320px)}
#faction-app .union30-pair .union29-person,#faction-app .union30-force .union29-person{width:46%}
#faction-app .union30-pair .union29-art,#faction-app .union30-force .union29-art{height:clamp(165px,22vw,250px)}
#faction-app .union30-council .union29-person{width:100%;max-width:510px}
#faction-app .union30-council .union29-art{height:auto;aspect-ratio:2.5}
#faction-app .union30-red .union29-label{border-color:#b26b62}
#faction-app .union30-vlad{border-top:1px solid #5b745c;text-align:center;margin:32px auto 0;padding:23px 0 10px;max-width:1040px}
#faction-app .union30-vlad h4{margin:0;font-size:1.35rem;letter-spacing:.08em;color:#e7ecdc}
#faction-app .union30-vlad>p{color:#adbfac;font-size:.9rem;margin:9px auto 18px;line-height:1.5}
#faction-app .union30-transfer{display:flex;justify-content:center;align-items:center;gap:clamp(9px,2vw,22px)}
#faction-app .union30-transfer .union29-person{width:clamp(185px,25vw,275px)}
#faction-app .union30-transfer .union29-art{height:clamp(280px,36vw,405px)}
#faction-app .union30-from{color:#8fc48d;font-weight:800;font-size:.84rem}
#faction-app .union30-to{color:#e69a92;font-weight:800;font-size:.84rem}
#faction-app .union30-arrow{font-size:clamp(1.6rem,4vw,3.2rem);line-height:1}
#faction-app .union30-in{color:#83b982}
#faction-app .union30-out{color:#e67d73}
@media(max-width:700px){#faction-app .union30-split{grid-template-columns:1fr;gap:20px}#faction-app .union30-side{padding:16px 10px}#faction-app .union30-rank .union29-art{height:270px}#faction-app .union30-transfer{flex-wrap:wrap;gap:8px}#faction-app .union30-transfer .union29-person{order:0;width:60%}#faction-app .union30-from{order:1}#faction-app .union30-in{order:2}#faction-app .union30-out{order:3}#faction-app .union30-to{order:4}}

/* Update 31 — independent successor faction dossiers, no redundant hierarchy views. */
#faction-app .union31-hero{position:relative;overflow:hidden;min-height:330px;padding-right:min(35%,290px)}
#faction-app .union31-hero .faction-title{position:relative;z-index:1}
#faction-app .union31-hero-person{position:absolute;right:2%;bottom:0;width:min(34%,255px);height:320px;object-fit:contain;object-position:center bottom;pointer-events:none;filter:drop-shadow(0 6px 15px rgba(0,0,0,.32))}
#faction-app .union31-fsu .union31-hero{background:linear-gradient(115deg,rgba(41,27,27,.92),rgba(69,37,39,.55))}
#faction-app .union31-ura .union31-hero{background:linear-gradient(115deg,rgba(21,45,33,.92),rgba(34,66,47,.52))}
#faction-app .union31-people{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:17px;margin-top:18px}
#faction-app .union31-person{text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0}
#faction-app .union31-person img{max-width:100%;height:260px;object-fit:contain;object-position:center bottom}
#faction-app .union31-person div{border-top:2px solid #89a88e;width:100%;padding-top:9px;display:grid;gap:5px}
#faction-app .union31-fsu .union31-person div{border-color:#b8716d}
#faction-app .union31-person strong{font-size:1.05rem;color:#f1f1e8}
#faction-app .union31-person small{font-size:.81rem;color:#bccab9}
#faction-app .union31-switch{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}
#faction-app .union31-switch button{border:1px solid #739976;background:rgba(45,75,50,.25);border-radius:6px;padding:11px 15px;color:#deeddb;font-weight:750;cursor:pointer;letter-spacing:.025em}
#faction-app .union31-switch button:hover{background:rgba(82,121,86,.38)}
#faction-app .union31-accord{width:100%;max-height:430px;object-fit:contain;margin-top:15px}
@media(max-width:700px){#faction-app .union31-hero{padding-right:15px;padding-bottom:195px;min-height:0}#faction-app .union31-hero-person{height:190px;width:220px;max-width:70%;right:5%}#faction-app .union31-person img{height:220px}}

/* Update 31.1: URA official imagery, existing troops and Vanguard reference plates */
#faction-app .union31-ura .union31-hero-person{height:330px;width:min(35%,275px)}
#faction-app .union31-military-portraits{display:flex;justify-content:center;gap:clamp(24px,7%,90px);align-items:flex-end;flex-wrap:wrap;margin:20px 0 27px}
#faction-app .union31-military-portraits figure{margin:0;flex:0 1 240px;text-align:center;min-width:140px}
#faction-app .union31-military-portraits img{width:100%;height:270px;object-fit:contain;object-position:center bottom}
#faction-app .union31-fleet{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:20px}
#faction-app .union31-fleet figure{margin:0;min-width:0}
#faction-app .union31-fleet img{display:block;width:100%;height:auto;object-fit:contain;border:1px solid rgba(149,174,132,.4);border-radius:4px;background:#d1d0ca}
#faction-app .union31-military figcaption{padding-top:8px;font-size:.72rem;letter-spacing:.07em;font-weight:700;color:#bcd7b8;text-align:center}
@media(max-width:700px){#faction-app .union31-ura .union31-hero-person{height:190px;width:220px}#faction-app .union31-fleet{grid-template-columns:1fr}#faction-app .union31-military-portraits img{height:220px}}

/* Update 31.2: Official FSU successor nation artwork */
#faction-app .union31-fsu .union31-hero-person{width:min(35%,275px);height:330px}
#faction-app .union31-fsu .union31-fleet{grid-template-columns:minmax(0,1fr)}
#faction-app .union31-fsu .union31-fleet figure{max-width:920px;margin-inline:auto}
#faction-app .union31-fsu .union31-fleet img{border-color:rgba(184,85,75,.50)}
#faction-app .union31-fsu .union31-military figcaption{color:#e8aba2}
@media(max-width:700px){#faction-app .union31-fsu .union31-hero-person{height:190px;width:220px}}

/* Update 32: The FSU directory emblem uses a purpose-cropped square thumbnail. */
.faction-world-choice[data-faction="fsu"]>img{object-fit:contain;object-position:center;background:#210c12}

/* Update 33 — Kinryū-kai */
#faction-app .faction-world-choice[data-faction="kinryu"]>img{object-fit:cover;background:#0f0906}
#faction-app .kin33-page{--kin-gold:#e2b65d;--kin-red:#9e2729}
#faction-app .kin33-dossier{background:linear-gradient(150deg,#19110f,#0a1119 70%);border-color:#76572b}
#faction-app .kin33-header{background:linear-gradient(110deg,#241511,#0c1014);border-color:#795d30}
#faction-app .kin33-header .faction-emblem{background:#100a08}
#faction-app .kin33-header .faction-emblem img{object-fit:contain}
#faction-app .kin33-tabs{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
#faction-app .kin33-later{font-size:.7rem;letter-spacing:.09em;color:#a89a87;padding:9px 12px;opacity:.75}
#faction-app .kin33-launch{padding:13px 22px;border:1px solid #bf9251;background:#23160e;color:#f4d8a0;font-weight:800;letter-spacing:.09em;cursor:pointer;border-radius:8px}
#faction-app .kin33-launch:hover{background:#40301e}
#faction-app .kin33-hierarchy{padding:24px 18px 38px;border:1px solid #654622;background:linear-gradient(135deg,#1d1410,#111717 45%,#160e10);border-radius:18px;color:#f3f1e9}
#faction-app .kin33-hierarchy-banner{display:flex;align-items:center;gap:20px;padding:12px 8px 25px;border-bottom:1px solid #765124}
#faction-app .kin33-hierarchy-banner img{width:110px;height:110px;object-fit:contain;border-radius:100%}
#faction-app .kin33-hierarchy-banner span{font-size:.76rem;color:#ddb772;letter-spacing:.16em}
#faction-app .kin33-hierarchy-banner h3{margin:7px 0;color:#f5d28e;font-size:clamp(1.5rem,3vw,2.4rem)}
#faction-app .kin33-hierarchy-banner p{margin:0;color:#c4b9ad;max-width:850px}
#faction-app .kin33-rank{padding:26px 0 15px;border-bottom:1px solid #4e3425}
#faction-app .kin33-rank h4{font-size:1rem;letter-spacing:.15em;color:#e3c083;text-align:center;margin:0 0 12px}
#faction-app .kin33-rank>p{max-width:800px;margin:0 auto 15px;text-align:center;color:#b9a99a}
#faction-app .kin33-members{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:24px 30px}
#faction-app .kin33-member{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:5px;width:clamp(155px,20vw,218px);min-width:0;padding:0 0 12px;border:none;background:transparent;color:#fff;text-align:center;font:inherit}
#faction-app button.kin33-member{cursor:pointer}
#faction-app .kin33-member.kin33-linked:hover img{transform:scale(1.025)}
#faction-app .kin33-member.kin33-linked:focus-visible{outline:2px solid #e7c079;outline-offset:5px;border-radius:5px}
#faction-app .kin33-portrait{width:100%;height:310px;display:flex;align-items:flex-end;justify-content:center;border-bottom:3px solid #b38b55;overflow:hidden}
#faction-app .kin33-portrait img{width:100%;height:100%;object-fit:contain;object-position:center bottom;transition:transform .2s}
#faction-app .kin33-member strong{font-size:1.13rem;margin-top:7px}
#faction-app .kin33-member small{font-size:.70rem;letter-spacing:.09em;color:#d9b981}
#faction-app .kin33-person-note{font-size:.74rem;color:#cbb9a5}
#faction-app .kin33-matriarch{max-width:750px;margin:25px auto 0;padding:18px;border:1px dashed #896c46;border-radius:11px;display:flex;flex-direction:column;gap:7px;text-align:center;background:#30221750}
#faction-app .kin33-matriarch strong{color:#f2c992;letter-spacing:.09em}
#faction-app .kin33-matriarch span{color:#c6b8a9}
#faction-app .kin33-footnote{text-align:center;color:#c1a98b;font-size:.82rem;margin:20px auto 0;max-width:850px}
@media(max-width:640px){#faction-app .kin33-hierarchy{padding:14px 10px}#faction-app .kin33-hierarchy-banner{flex-direction:column;text-align:center}#faction-app .kin33-hierarchy-banner img{width:80px;height:80px}#faction-app .kin33-members{gap:20px 9px}#faction-app .kin33-member{width:46%}#faction-app .kin33-portrait{height:240px}}

/* Update 34 — Kinryū-kai faction dossier expansion (hierarchies unchanged). */
#faction-app .kin34-representative{display:flex;align-items:flex-end;justify-content:center;overflow:hidden;background:radial-gradient(ellipse at bottom,#32271a 0%,#110e0d 75%);min-height:205px}
#faction-app .kin34-representative img{width:100%;height:100%;max-height:240px;object-fit:contain;object-position:center bottom}
#faction-app .kin34-ancestry{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:20px 0 8px}
#faction-app .kin34-ancestry figure{margin:0;display:flex;flex-direction:column;align-items:center;justify-content:end;padding:12px;border:1px solid #74532e;border-radius:14px;background:linear-gradient(155deg,#261b12,#0d1015)}
#faction-app .kin34-ancestry figure img{width:100%;max-height:360px;object-fit:contain;object-position:bottom;min-height:0}
#faction-app .kin34-ancestry figcaption{color:#e2bd77;text-align:center;font-size:.8rem;letter-spacing:.05em;padding:13px 2px 3px}
#faction-app .kin34-mark{display:flex;align-items:center;gap:18px;padding:15px;border:1px solid #644a2c;border-radius:12px;background:#21170f}
#faction-app .kin34-mark img{width:100px;height:100px;object-fit:contain;flex:none}
#faction-app .kin34-mark span{color:#e1c395;font-weight:700}
#faction-app .kin34-pending{border-left:3px solid #bb9150;padding:12px 14px;background:#2d231a;color:#e3cb9b}
@media(max-width:640px){#faction-app .kin34-ancestry{grid-template-columns:1fr}#faction-app .kin34-ancestry figure img{max-height:290px}#faction-app .kin34-mark img{width:70px;height:70px}#faction-app .kin34-representative{min-height:150px}}

/* Update 35 — Kinryū-kai canonical three-part faction hero */
#faction-app .kin33-dossier .kin33-header{position:relative;display:grid;grid-template-columns:minmax(155px,26%) minmax(0,1fr);gap:clamp(18px,3vw,38px);align-items:center;min-height:clamp(330px,38vw,455px);padding:clamp(19px,2.5vw,32px);padding-right:clamp(165px,25vw,335px);overflow:hidden;isolation:isolate;background:radial-gradient(ellipse at 17% 56%,#35231c 0%,#171017 50%,#0c111c 100%);border-color:#72502d}
#faction-app .kin33-header .kin35-crest{width:100%;min-height:0;aspect-ratio:1/1;height:auto;background:#070606;align-self:center;border:1px solid #795737;border-radius:18px;overflow:hidden;z-index:2}
#faction-app .kin33-header .kin35-crest img{display:block;width:100%;height:100%;object-fit:contain;aspect-ratio:1/1}
#faction-app .kin33-header .faction-title{position:relative;z-index:2;min-width:0}
#faction-app .kin33-header .faction-title h3{font-size:clamp(29px,4.5vw,65px);letter-spacing:.035em;line-height:1.05;margin:15px 0 21px;overflow-wrap:anywhere}
#faction-app .kin33-header .faction-title p{max-width:37ch;margin:0 0 20px}
#faction-app .kin35-eyebrow{display:block;color:#d4b48b;letter-spacing:.2em;font:700 13px Rajdhani,sans-serif}
#faction-app .kin35-header-grunt{position:absolute;right:clamp(0px,1vw,20px);bottom:0;display:block;width:clamp(160px,26%,315px);max-height:98%;height:auto;object-fit:contain;object-position:center bottom;pointer-events:none;user-select:none;filter:drop-shadow(0 12px 12px #0007);z-index:1}
@media(max-width:830px){#faction-app .kin33-dossier .kin33-header{grid-template-columns:minmax(115px,30%) minmax(0,1fr);padding-right:clamp(115px,23vw,185px);min-height:310px;gap:14px}#faction-app .kin35-header-grunt{width:clamp(115px,23%,195px)}#faction-app .kin33-header .faction-title h3{font-size:clamp(26px,5.3vw,45px)}}
@media(max-width:540px){#faction-app .kin33-dossier .kin33-header{grid-template-columns:1fr;align-content:center;padding:16px clamp(98px,27vw,145px) 16px 16px;gap:12px;min-height:290px}#faction-app .kin33-header .kin35-crest{width:min(125px,100%)}#faction-app .kin35-header-grunt{width:clamp(100px,27%,152px);right:0}#faction-app .kin33-header .faction-title h3{font-size:clamp(24px,6vw,38px);margin:6px 0 10px}#faction-app .kin33-header .faction-title p{font-size:13px;line-height:1.35;margin-bottom:10px}#faction-app .kin35-eyebrow{font-size:10px;letter-spacing:.12em}}


/* Update 37: Story 4 Kinryū-kai and hierarchy hover headroom. */
#faction-app .kin33-portrait{overflow:visible;position:relative;isolation:isolate}
#faction-app .kin33-member.kin33-linked:hover .kin33-portrait img,
#faction-app .kin33-member.kin33-linked:focus-visible .kin33-portrait img{transform:scale(1.025);transform-origin:center bottom}
#faction-app .kin33-rank{overflow:visible}
/* Preserve breathing room for animated portraits on other existing hierarchy pages. */
#faction-app .union29-art,
#faction-app .crossbone25-dedicated .crossbone25-art,
#faction-app .imperial24-person,
#faction-app .neo26-person,
#faction-app .coal27-person,
#faction-app .coal28-person{overflow:visible}
#faction-app .union29-art img{transform-origin:center bottom}

/* Update 38: HOME Round Table navigation. No additional images or costly animation. */
.home38-launch-section{text-align:center}
.home38-launch,.home38-kin-link{padding:13px 22px;border:1px solid #c79f61;border-radius:10px;color:#f1c889;background:linear-gradient(125deg,#242033,#121d2a);font:inherit;font-weight:800;letter-spacing:.07em;cursor:pointer}
.home38-launch:hover,.home38-kin-link:hover{background:#2e3444;border-color:#f5d69c}
.home38-page{color:#f2e9db}
.home38-council-section{margin:20px auto 32px;padding:22px 14px 28px;max-width:980px;border:1px solid #6c644e;border-radius:18px;background:radial-gradient(circle at center,#283649 0%,#182133 55%,#131821 100%);text-align:center}
.home38-council-section>h4{font-size:25px;letter-spacing:.15em;color:#e5c48d}
.home38-council{position:relative;max-width:800px;aspect-ratio:1.45;margin:10px auto;isolation:isolate}
.home38-ring{position:absolute;inset:13% 22%;border:2px solid #bb956b77;border-radius:50%;background:radial-gradient(ellipse at center,#27384a88,#17233300 68%);box-shadow:0 0 0 10px #bb956b0b, inset 0 0 30px #0008;pointer-events:none}
.home38-center{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:26%;height:22%;display:flex;align-items:center;justify-content:center;flex-direction:column;border:1px solid #dfba7a;border-radius:50%;background:#152230;z-index:1;box-shadow:0 8px 30px #000a}
.home38-center strong{font-size:clamp(18px,3vw,32px);letter-spacing:.12em}.home38-center span{font-size:11px;color:#d9ba82;letter-spacing:.13em}
.home38-seat{position:absolute;z-index:2;width:23%;min-height:74px;padding:10px 6px;transform:translate(-50%,-50%);border-radius:12px;border:1px solid #70829a;background:#172537;box-shadow:0 4px 15px #0008;cursor:pointer;color:#f6f3ee;font:inherit;transition:border-color .18s,background .18s}
.home38-seat:hover,.home38-seat:focus-visible{border-color:#f4c77c;background:#293d51;outline-offset:3px}
.home38-seat strong,.home38-seat span{display:block}.home38-seat strong{font-size:clamp(12px,1.3vw,17px);line-height:1.2}.home38-seat span{font-size:clamp(10px,1vw,12px);color:#e0b981;line-height:1.3;margin-top:5px}
.home38-seat-0{left:50%;top:11%}.home38-seat-1{left:77%;top:22%}.home38-seat-2{left:90%;top:51%}.home38-seat-3{left:77%;top:80%}.home38-seat-4{left:50%;top:91%}.home38-seat-5{left:23%;top:80%}.home38-seat-6{left:10%;top:51%}.home38-seat-7{left:23%;top:22%}
.home38-intro{max-width:700px;margin:auto;color:#c6cbd7;font-size:14px}
.home38-details{max-width:1000px;margin:auto}.home38-details>h3{text-align:center;color:#e9c792;letter-spacing:.13em;margin:24px}
.home38-department{scroll-margin-top:28px;margin:18px 0;padding:20px 24px;border:1px solid #485367;border-radius:12px;background:#131c2a}
.home38-dept-heading span{color:#d9b77d;letter-spacing:.11em;font-size:12px}.home38-dept-heading h4{font-size:24px;margin:5px 0 10px}
.home38-department p{color:#d0d5df;line-height:1.6}.home38-subunit{border-left:3px solid #b88e52;background:#1c2835;padding:14px 18px;margin:15px 0}.home38-subunit h5{color:#f1d39f;font-size:17px;letter-spacing:.07em}.home38-pending{font-size:11px;letter-spacing:.08em;color:#a4b4c2!important}
.home38-top{padding:8px 0;border:0;background:none;color:#e3b981;cursor:pointer;font:inherit;font-size:12px;font-weight:800;letter-spacing:.05em}
@media(max-width:650px){.home38-council{aspect-ratio:auto;display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px 0}.home38-ring,.home38-center{display:none}.home38-seat{position:static;transform:none;width:auto;min-height:82px}.home38-department{padding:16px}}

/* Update 38.1: Round Table entries open dedicated hierarchies, not in-page sections. */
.home38-seat-pending{cursor:default;opacity:.78}
.home38-seat-pending:hover{border-color:#70829a;background:#172537}
.home38-seat-linked{cursor:pointer}
.home38-seat-linked em{display:block;margin-top:5px;font-size:10px;font-style:normal;letter-spacing:.03em;color:#f6d593}

/* Update 39: Portraits for the HOME Round Table. Existing dossier assets are reused. */
.home38-council{max-width:960px;aspect-ratio:1.5}
.home39-seat{display:flex;align-items:center;justify-content:flex-start;gap:9px;text-align:left;width:26%;min-height:100px;padding:8px;overflow:visible}
.home39-seat .home39-seat-portrait{display:flex;flex:0 0 38%;height:84px;align-items:flex-end;justify-content:center;overflow:hidden;border-radius:8px;background:linear-gradient(135deg,#51617655,#142137aa)}
.home39-seat .home39-seat-portrait img{height:100%;width:100%;object-fit:contain;object-position:bottom center}
.home39-seat .home39-seat-label{display:flex;flex:1 1 0;flex-direction:column;align-items:flex-start;min-width:0}
.home39-seat .home39-seat-label strong{font-size:clamp(11px,1.15vw,15px);overflow-wrap:anywhere}
.home39-seat .home39-seat-label span{font-size:clamp(9px,.9vw,11px)}
.home39-seat .home39-seat-label em{font-size:9px}
@media(max-width:650px){.home38-council{aspect-ratio:auto}.home39-seat{width:auto;min-height:94px}.home39-seat .home39-seat-portrait{height:72px;flex-basis:33%}}

/* Update 40: HOME's larger, unboxed, era-switchable circular Round Table. */
.home40-launch-under-preview{display:flex;justify-content:center;padding:24px 0 6px}
.home40-era-tabs{margin:15px 0 18px}
.home38-council-section{max-width:1200px;overflow:visible;padding:24px 16px 32px}
.home38-council{max-width:1120px;height:800px;aspect-ratio:auto;margin:10px auto 28px;overflow:visible}
.home38-ring{inset:23% 28% 17% 28%;border-radius:50%;}
.home38-center{width:22%;height:20%;}
.home39-seat.home38-seat{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:3px;text-align:center;width:21%;min-height:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:#f6f3ee;overflow:visible;}
.home39-seat .home39-seat-portrait{display:flex;flex:0 0 auto;width:100%;height:158px;overflow:visible;align-items:flex-end;justify-content:center;border-radius:0;background:none;}
.home39-seat .home39-seat-portrait img{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 8px 11px #0009);transition:transform .2s ease,filter .2s ease;transform-origin:center bottom}
.home39-seat.home38-seat-linked:hover,.home39-seat.home38-seat-linked:focus-visible{border:0;background:none;}
.home39-seat.home38-seat-linked:hover img,.home39-seat.home38-seat-linked:focus-visible img{transform:scale(1.04);filter:drop-shadow(0 8px 13px #000a) drop-shadow(0 0 7px #d9b57188)}
.home39-seat.home38-seat-pending:hover{border:0;background:none}
.home39-seat .home39-seat-label{display:flex;flex:0 0 auto;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;padding-top:6px;min-width:0;min-height:42px;border-top:2px solid #ae986e;background:none}
.home39-seat .home39-seat-label strong{font-size:clamp(12px,1.27vw,17px);line-height:1.3;overflow-wrap:anywhere}
.home39-seat .home39-seat-label span{font-size:clamp(10px,1vw,12px);color:#d6b582;line-height:1.3;margin-top:3px}
.home39-seat .home39-seat-label em{font-size:10px}
.home38-seat-0{left:50%;top:16%}.home38-seat-1{left:79%;top:28%}.home38-seat-2{left:89%;top:52%}.home38-seat-3{left:79%;top:79%}.home38-seat-4{left:50%;top:89%}.home38-seat-5{left:21%;top:79%}.home38-seat-6{left:11%;top:52%}.home38-seat-7{left:21%;top:28%}
.home38-seat-0 .home39-seat-portrait{height:148px}
.home38-seat-4 .home39-seat-portrait{height:148px}
.home38-seat-5 .home39-seat-portrait{height:146px}
.home38-seat-6 .home39-seat-portrait{height:148px}
.home38-seat-7 .home39-seat-portrait{height:150px}
.home38-seat-2 .home39-seat-portrait,.home38-seat-3 .home39-seat-portrait{height:152px}
@media(max-width:850px){.home38-council{max-width:760px;height:660px}.home39-seat .home39-seat-portrait{height:122px}.home39-seat.home38-seat{width:23%}.home38-center{width:23%;height:19%}.home38-seat-5 .home39-seat-portrait,.home38-seat-6 .home39-seat-portrait,.home38-seat-7 .home39-seat-portrait,.home38-seat-2 .home39-seat-portrait,.home38-seat-3 .home39-seat-portrait,.home38-seat-0 .home39-seat-portrait,.home38-seat-4 .home39-seat-portrait{height:118px}}
@media(max-width:650px){.home38-council{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));height:auto;gap:18px 10px;padding:14px 4px;max-width:100%;margin:12px auto;}.home38-center,.home38-ring{display:none}.home39-seat.home38-seat{position:static;transform:none;width:100%;max-width:260px;justify-self:center}.home39-seat .home39-seat-portrait{height:165px}.home39-seat .home39-seat-label{min-height:55px}.home38-council-section{padding:20px 10px}}
@media(prefers-reduced-motion:reduce){.home39-seat .home39-seat-portrait img{transition:none}}

/* Update 41: Rookline Commandos — unboxed portraits and two distinct eras */
.home41-page{color:#e7edf4;max-width:1150px;margin:0 auto}.home41-banner{display:flex;align-items:center;gap:24px;padding:25px;margin:18px auto 30px;border:1px solid #657587;border-radius:14px;background:linear-gradient(120deg,#233245,#101927)}
.home41-banner img{width:125px;max-height:140px;object-fit:contain}.home41-banner span{font-size:12px;letter-spacing:.13em;color:#adbcd1}.home41-banner h3{font-size:clamp(25px,3vw,40px);margin:8px 0}.home41-banner p{color:#c4cddb;line-height:1.5}
.home41-tier{padding:26px 12px 34px;margin:12px 0 24px;text-align:center;border-bottom:1px solid #7c8a9840}.home41-tier h4{color:#c5d1df;letter-spacing:.16em;font-size:22px}.home41-tier>p{color:#aab9c9;margin:8px auto 22px;max-width:750px}.home41-grid{display:flex;align-items:flex-end;justify-content:center;gap:28px 22px;flex-wrap:wrap}
.home41-person{display:flex;align-items:center;flex-direction:column;justify-content:flex-end;width:200px;max-width:100%;padding:7px 6px;border:0;background:none;color:inherit;font:inherit;cursor:default}.home41-person-link{cursor:pointer}.home41-art{width:100%;height:260px;display:flex;align-items:flex-end;justify-content:center;overflow:visible}.home41-art img{width:100%;height:100%;object-fit:contain;object-position:center bottom;transform-origin:bottom center;filter:drop-shadow(0 8px 9px #0008);transition:transform .18s ease}.home41-person-link:hover img,.home41-person-link:focus-visible img{transform:scale(1.035)}.home41-person strong{display:block;width:100%;padding-top:9px;border-top:2px solid #8498a9;font-size:20px}.home41-person small{display:block;color:#a8c1d5;font-size:11px;letter-spacing:.05em;margin-top:5px;line-height:1.4}.home41-person-link:hover strong{color:#f6dbab;border-color:#efc78b}.home41-command .home41-art{height:345px}.home41-command .home41-person{width:265px}.home41-leaders .home41-art{height:290px}.home41-leaders .home41-person{width:225px}.home41-specialists .home41-person{width:168px}.home41-specialists .home41-art{height:215px}.home41-forces .home41-art{height:260px}.home41-footnote{text-align:center;color:#91a0b3;font-size:12px;line-height:1.5;margin:15px 0 35px}
@media(max-width:650px){.home41-banner{gap:12px;padding:14px}.home41-banner img{width:75px}.home41-grid{gap:18px 8px}.home41-person,.home41-leaders .home41-person,.home41-specialists .home41-person{width:calc(50% - 10px)}.home41-art,.home41-leaders .home41-art,.home41-specialists .home41-art{height:210px}.home41-command .home41-person{width:230px}}
@media(prefers-reduced-motion:reduce){.home41-art img{transition:none}}

/* Update 42 — HOME Culture & Events portrait roster. No unnecessary character cards. */
.home42-loki-page .home41-banner img{height:140px;width:110px;object-fit:contain;object-position:center bottom}
.home42-loki-page .home41-art{overflow:visible}
.home42-loki-leader .home41-person{width:250px}
.home42-loki-leader .home41-art{height:320px}
.home42-loki-team .home41-grid{gap:25px 18px}
.home42-loki-team .home41-person{width:205px}
.home42-loki-team .home41-art{height:278px}
.home42-loki-team .home41-person strong{font-size:16px;letter-spacing:.06em}
.home42-loki-team .home41-person small{font-size:10px}
@media(max-width:650px){.home42-loki-team .home41-person{width:calc(50% - 12px)}.home42-loki-team .home41-art{height:215px}}

/* Update 43: HOME department hierarchies and Health's nearby return navigation. */
.home43-page{max-width:1200px}
.home43-banner{padding:23px 26px;margin:20px 0 15px;background:linear-gradient(120deg,#213247,#101a2a);border:1px solid #6a829a;border-radius:14px;text-align:left}
.home43-banner span{display:block;letter-spacing:.13em;font-size:12px;color:#b8c9d8}
.home43-banner h3{font-size:clamp(27px,3.1vw,43px);margin:7px 0;color:#f1f4f8}
.home43-banner p{max-width:880px;line-height:1.6;color:#c5d1de}
.home43-person.home43-head{width:265px}
.home43-lead .home43-head .home41-art{height:340px}
.home43-crew .home41-grid{gap:22px 18px}
.home43-crew .home43-worker{width:205px}
.home43-crew .home43-worker .home41-art{height:275px}
.home43-crew .home43-worker strong{font-size:16px;letter-spacing:.04em}
.home43-team .home43-research-core{width:235px}
.home43-team .home43-research-core .home41-art{height:320px}
.home43-team .home43-research-team{width:240px}
.home43-team .home43-research-team .home41-art{height:315px}
.home43-note{font-size:13px;line-height:1.6;max-width:700px;margin:0 auto 35px;text-align:center;color:#abbcd0}
.home43-health-return{display:flex;justify-content:center;margin:14px auto 20px!important;max-width:max-content}
.home43-health-return button{border:1px solid #b5a27c;border-radius:9px;padding:11px 18px;background:#23354c;color:#f6d99c;font:inherit;font-weight:700;cursor:pointer}
.home43-health-return button:hover{background:#3b4b65}
@media(max-width:650px){.home43-banner{padding:17px}.home43-crew .home43-worker{width:calc(50% - 12px)}.home43-crew .home43-worker .home41-art{height:220px}.home43-lead .home43-head .home41-art{height:275px}.home43-team .home43-research-core{width:calc(50% - 12px)}.home43-team .home43-research-core .home41-art{height:225px}}

/* Update 46: role navigation keeps the destination heading visible. */
.home38-department{scroll-margin-top:24px}
.home38-seat-0.home38-seat-linked,.home38-seat-1.home38-seat-linked{cursor:pointer}

/* Update 47 — Multiverse Church (Story 1 / TATP) */
#faction-app .church47-page{--church47-gold:#e6bd64;max-width:1250px;margin:auto;color:#e9eff9}
#faction-app .church47-heading{display:flex;align-items:center;gap:24px;border:1px solid #7d6748;border-radius:18px;padding:20px 26px;margin-bottom:18px;background:radial-gradient(circle at 5% 40%,#755d2b36,transparent 65%),linear-gradient(130deg,#18263c,#101b2b)}
#faction-app .church47-heading>img{width:112px;height:112px;object-fit:contain;flex-shrink:0}
#faction-app .church47-heading span,#faction-app .church47-intro span,#faction-app .church47-hero-overlay>span{color:#e4c586;letter-spacing:.15em;font:700 12px Rajdhani,sans-serif}
#faction-app .church47-heading h3{font:700 clamp(30px,4vw,53px) Rajdhani,sans-serif;margin:3px 0}
#faction-app .church47-heading p{letter-spacing:.15em;color:#b6cadc;margin:0;font-size:12px}
#faction-app .church47-tabs{margin:0 0 20px}
#faction-app .church47-tabs button.active{background:#e8c576;color:#1d1b19;border-color:#f6dda3}
#faction-app .church47-hero{position:relative;overflow:hidden;border:1px solid #7a6680;border-radius:16px;background:#101929;aspect-ratio:16/8;max-height:580px}
#faction-app .church47-hero>img{width:100%;height:100%;object-fit:cover;display:block}
#faction-app .church47-hero-overlay{position:absolute;left:0;right:0;bottom:0;background:linear-gradient(transparent,#071120dc);padding:58px 28px 22px;display:flex;flex-direction:column;gap:4px}
#faction-app .church47-hero-overlay strong{font:700 clamp(18px,3vw,36px) Rajdhani,sans-serif;color:#fff}
#faction-app .church47-intro{display:grid;grid-template-columns:minmax(0,1fr) 210px;gap:25px;padding:25px;margin-top:22px;border:1px solid #465977;border-radius:15px;background:#111f31}
#faction-app .church47-intro h3,#faction-app .church47-page section h3,#faction-app .church47-structure h3{font:700 clamp(24px,3vw,33px) Rajdhani,sans-serif;color:#f5e3b2;margin:8px 0 12px}
#faction-app .church47-intro p,#faction-app .church47-page section>p,#faction-app .church47-structure>p{line-height:1.7;color:#d5e0eb;margin:0 0 12px}
#faction-app .church47-intro aside{display:flex;align-items:center;flex-direction:column;justify-content:flex-end;min-width:0}
#faction-app .church47-intro aside img{width:100%;height:260px;object-fit:contain;object-position:bottom;filter:drop-shadow(0 10px 15px #0008)}
#faction-app .church47-intro aside small{font:700 11px Rajdhani,sans-serif;letter-spacing:.1em;color:#d9c898;text-align:center}
#faction-app .church47-doctrine,#faction-app .church47-purpose{margin-top:22px;background:linear-gradient(135deg,#15253c,#0c1524);border:1px solid #4d6280;border-radius:15px;padding:25px}
#faction-app .church47-pillars{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:20px 0}
#faction-app .church47-pillars>div{padding:20px 10px;border:1px solid #806c4f;border-radius:11px;background:#d6ac6430;display:flex;align-items:center;flex-direction:column;gap:6px;text-align:center}
#faction-app .church47-pillars strong{font:700 19px Rajdhani,sans-serif;color:#fbe3a6}
#faction-app .church47-pillars span{font-size:12px;color:#c8d7e8}
#faction-app .church47-footnote{color:#a9bacd!important;font-size:13px;line-height:1.65}
#faction-app .church47-actions{display:flex;justify-content:center;margin:24px auto}
#faction-app .church47-actions button{background:#e5bf76;color:#171b24;border:1px solid #ffe5b2;border-radius:9px;padding:14px 23px;font:700 17px Rajdhani,sans-serif;cursor:pointer}
#faction-app .church47-actions button:hover{background:#f7d89d}
#faction-app .church47-structure{padding:25px;border:1px solid #665c54;border-radius:16px;background:linear-gradient(160deg,#16263d,#0b1423)}
#faction-app .church47-structure>h3{text-align:center}
#faction-app .church47-structure>p{text-align:center;max-width:850px;margin:0 auto 25px}
#faction-app .church47-rank{margin-top:18px;padding:20px;border:1px solid #755f414f;border-radius:14px;background:#1d2d4280}
#faction-app .church47-rank h4{text-align:center;font:700 21px Rajdhani,sans-serif;letter-spacing:.12em;color:#f2d28d;margin:0 0 14px}
#faction-app .church47-rank-note{text-align:center;font-size:13px;max-width:820px;margin:0 auto 18px!important;color:#b6c9da!important}
#faction-app .church47-roster{display:flex;justify-content:center;align-items:flex-end;flex-wrap:wrap;gap:26px}
#faction-app .church47-member{border:0;background:transparent;color:#f6f4ef;display:flex;flex-direction:column;align-items:center;text-align:center;gap:5px;padding:0 8px 8px;max-width:280px;width:240px;font-family:inherit}
#faction-app button.church47-member-linked{cursor:pointer;border-radius:12px}
#faction-app button.church47-member-linked:hover{background:transparent;box-shadow:none}#faction-app button.church47-member-linked:focus-visible{outline:2px solid #88b8da;outline-offset:5px}
#faction-app .church47-portrait{height:260px;width:240px;display:flex;align-items:flex-end;justify-content:center;overflow:visible}
#faction-app .church47-portrait img{width:100%;height:100%;object-fit:contain;object-position:bottom;filter:drop-shadow(0 7px 16px #000a);transition:transform .2s ease}
#faction-app button.church47-member-linked:hover .church47-portrait img{transform:translateY(-5px) scale(1.03)}
#faction-app .church47-member strong{font:700 20px Rajdhani,sans-serif}
#faction-app .church47-member small{font:700 12px Rajdhani,sans-serif;letter-spacing:.06em;color:#dcbf81}
#faction-app .church47-member p{margin:0;color:#b5c7d9;font-size:12px;line-height:1.4}
#faction-app .church47-hierarchy-page>.church47-footnote{text-align:center;margin:20px auto}
@media(max-width:700px){#faction-app .church47-heading{padding:12px;gap:10px}#faction-app .church47-heading>img{width:75px;height:75px}#faction-app .church47-intro{grid-template-columns:1fr}#faction-app .church47-intro aside{display:none}#faction-app .church47-pillars{grid-template-columns:1fr}#faction-app .church47-structure{padding:12px}#faction-app .church47-member{width:170px}#faction-app .church47-portrait{width:170px;height:220px}}

/* Update 48 — Story 4 Church hierarchy and Path of the Lion doctrine */
#faction-app .church48-story4 .church47-doctrine strong{color:#ffe6ab}
#faction-app .church48-story4 .church47-purpose p{max-width:1050px}
#faction-app .church48-story4 .church47-pillars>div{background:#d6ac6420}

/* UPDATE 49 · MULTIVERSAL HIGH */
#faction-app .school49-page{max-width:1160px;margin:0 auto;color:#d8e4f4}
#faction-app .school49-heading{display:flex;align-items:center;gap:22px;padding:16px 20px 24px}
#faction-app .school49-heading>img{width:112px;height:112px;object-fit:contain;filter:drop-shadow(0 5px 18px #c99e5d35)}
#faction-app .school49-heading span,#faction-app .school49-eyebrow{font:700 12px Rajdhani,sans-serif;letter-spacing:.17em;color:#d3b77c}
#faction-app .school49-heading h3{font:700 clamp(28px,4vw,49px) Rajdhani,sans-serif;letter-spacing:.06em;margin:2px 0;color:#f4e9ca}
#faction-app .school49-heading p{margin:0;color:#aabbd1;letter-spacing:.12em}
#faction-app .school49-hero{position:relative;margin:4px 0 25px;border:1px solid #bca27577;border-radius:15px;overflow:hidden;background:#0c1725}
#faction-app .school49-hero>img{display:block;width:100%;aspect-ratio:16/8;object-fit:cover}
#faction-app .school49-hero figcaption{position:absolute;bottom:0;left:0;right:0;padding:45px 26px 22px;background:linear-gradient(transparent,#06101fe8);display:flex;flex-direction:column;gap:4px}
#faction-app .school49-hero figcaption span{font:700 13px Rajdhani,sans-serif;letter-spacing:.16em;color:#e1c993}
#faction-app .school49-hero figcaption strong{font:700 clamp(22px,3vw,38px) Rajdhani,sans-serif;letter-spacing:.07em;color:#fff2d4}
#faction-app .school49-intro{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:24px;padding:20px 22px;background:#0b1a2b;border:1px solid #647b974c;border-radius:13px;margin-bottom:18px}
#faction-app .school49-intro h3,#faction-app .school49-section>h3{font:700 26px Rajdhani,sans-serif;color:#f2e3bf;margin:7px 0 13px}
#faction-app .school49-intro p,#faction-app .school49-section>p{line-height:1.72;color:#c6d1e1}
#faction-app .school49-intro aside{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;background:#101d30;border-radius:10px;overflow:hidden}
#faction-app .school49-intro aside img{width:100%;height:225px;object-fit:contain;object-position:bottom}
#faction-app .school49-intro aside small{padding:8px;color:#d8bc83;font-weight:700;text-align:center}
#faction-app .school49-section{margin:15px 0;padding:23px 22px;background:linear-gradient(145deg,#0c1b2de8,#111b30e8);border:1px solid #647b974c;border-radius:13px}
#faction-app .school49-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:16px}
#faction-app .school49-facts>div{border:1px solid #586d8d66;background:#0a1220;padding:14px;border-radius:9px}
#faction-app .school49-facts small{display:block;color:#d2b982;letter-spacing:.07em;margin-bottom:6px}
#faction-app .school49-facts strong{font:700 15px Rajdhani,sans-serif;color:#f4f1e8}
#faction-app .school49-actions{text-align:center;padding:16px}
#faction-app .school49-actions button,#faction-app .school49-back{border:1px solid #c7a96e;background:#1c2a44;color:#ffe9b6;border-radius:9px;padding:13px 20px;font:700 16px Rajdhani,sans-serif;letter-spacing:.08em;cursor:pointer}
#faction-app .school49-back{margin:5px 0 12px}
#faction-app .school49-rank{border-top:1px solid #566b865f;margin:22px 0;padding:17px 0 0}
#faction-app .school49-rank h4{font:700 19px Rajdhani,sans-serif;letter-spacing:.12em;color:#e1c58e;margin:0 0 16px}
#faction-app .school49-roster{display:flex;flex-wrap:wrap;gap:15px;justify-content:center}
#faction-app .school49-person{width:176px;min-width:0;display:flex;flex-direction:column;align-items:center;gap:5px;appearance:none;border:1px solid #4c668767;border-radius:12px;background:#0b1627;padding:10px 9px 14px;color:#e7eef7;text-align:center;font-family:inherit;cursor:default}
#faction-app button.school49-person-link{cursor:pointer}
#faction-app button.school49-person-link:hover{border-color:#c2aa79;background:#14243a}
#faction-app .school49-person-image{width:100%;height:192px;display:flex;align-items:flex-end;justify-content:center;overflow:hidden}
#faction-app .school49-person-image img{width:100%;height:100%;object-fit:contain;object-position:bottom;transition:transform .2s ease}
#faction-app button.school49-person-link:hover img{transform:translateY(-4px) scale(1.04)}
#faction-app .school49-person strong{font:700 17px Rajdhani,sans-serif;color:#f2e5c9}
#faction-app .school49-person small{font:700 11px Rajdhani,sans-serif;color:#d4b678;letter-spacing:.04em}
#faction-app .school49-person p{font-size:12px;line-height:1.38;color:#aabed3;margin:4px 0 0}
@media(max-width:700px){#faction-app .school49-heading>img{width:80px;height:80px}#faction-app .school49-heading{gap:12px}#faction-app .school49-hero>img{aspect-ratio:16/10}#faction-app .school49-intro{grid-template-columns:1fr}#faction-app .school49-intro aside{display:none}#faction-app .school49-facts{grid-template-columns:repeat(2,minmax(0,1fr))}#faction-app .school49-person{width:calc(50% - 9px);max-width:180px}}

/* Update 49.1: School hierarchy - free-standing, uncropped portraits. */
#faction-app .school49-hierarchy .school49-section{background:transparent;border:0;box-shadow:none;padding:12px 0 24px}
#faction-app .school49-hierarchy .school49-roster{align-items:flex-start;gap:24px 18px}
#faction-app .school49-hierarchy .school49-person,
#faction-app .school49-hierarchy button.school49-person-link{width:210px;max-width:100%;min-width:0;display:flex;flex-direction:column;align-items:center;gap:5px;padding:0 6px 12px;border:0!important;border-radius:0;background:transparent!important;box-shadow:none!important;overflow:visible;color:#e7eef7;text-align:center}
#faction-app .school49-hierarchy button.school49-person-link:hover{background:transparent!important;border:0!important;box-shadow:none!important}
#faction-app .school49-hierarchy button.school49-person-link:focus-visible{outline:2px solid #85add5;outline-offset:5px;border-radius:8px}
#faction-app .school49-hierarchy .school49-person-image{width:100%;height:280px;display:flex;align-items:flex-end;justify-content:center;overflow:visible!important;flex-shrink:0}
#faction-app .school49-hierarchy .school49-person-image img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center bottom;overflow:visible;filter:drop-shadow(0 8px 16px #0009);transform-origin:bottom center}
#faction-app .school49-hierarchy button.school49-person-link:hover .school49-person-image img{transform:translateY(-5px) scale(1.025)}
#faction-app .school49-hierarchy .school49-rank{padding-top:23px}
@media(max-width:700px){#faction-app .school49-hierarchy .school49-person,#faction-app .school49-hierarchy button.school49-person-link{width:calc(50% - 12px);max-width:210px}#faction-app .school49-hierarchy .school49-person-image{height:230px}#faction-app .school49-hierarchy .school49-roster{gap:20px 12px}}

/* Update 50 — early MITM Port Authority records reuse the established Port design. */
#faction-app .port22-landing{max-width:1200px;margin-inline:auto}
#faction-app .port22-faction-header{position:relative;min-height:390px;overflow:hidden;padding-right:350px}
#faction-app .port22-faction-header .faction-title{position:relative;z-index:1}
#faction-app .port22-banner-figure{position:absolute;right:0;bottom:0;height:385px;max-width:345px;object-fit:contain;object-position:bottom center}
#faction-app .port22-landing .location-facts{margin:.5rem 0 0}
#faction-app .port22-landing .char-sub{margin:1.6rem 0}
#faction-app .port22-landing h4{letter-spacing:.04em}
#faction-app .port22-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;margin-top:1rem}
#faction-app .port22-columns>div{padding:1rem;border:1px solid #667990;border-radius:12px;background:#17263a}
#faction-app .port22-columns strong,#faction-app .port22-columns small{display:block}
#faction-app .port22-columns small{opacity:.78;margin-top:.3rem}
@media(max-width:680px){#faction-app .port22-faction-header{padding-right:0;padding-bottom:260px;min-height:0}#faction-app .port22-banner-figure{height:255px;right:50%;transform:translateX(50%)}#faction-app .port22-columns{grid-template-columns:1fr}}

/* Update 51 — Gaslight Ascendancy; shared imperial dossier layout */
#faction-app .gaslight51-header{background:radial-gradient(ellipse at 18% 32%,#334c3870,transparent 68%),#0b1716;min-height:440px;padding-right:clamp(185px,25vw,330px)}
#faction-app .gaslight51-header .faction-emblem{background:#0c1110;border-color:#6b6348}
#faction-app .gaslight51-header .faction-status{border-color:#99895d;color:#d8c89b}
#faction-app .gaslight51-grunt{position:absolute;right:12px;bottom:0;max-height:430px;max-width:clamp(170px,25vw,310px);width:auto;height:auto;object-fit:contain;object-position:bottom center;pointer-events:none;z-index:0}
#faction-app .gaslight51-header .faction-title,#faction-app .gaslight51-header .faction-emblem{position:relative;z-index:1}
#faction-app .gaslight51-dossier .char-sub h4{color:#dfcb98}
#faction-app .gaslight51-ranks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:20px}
#faction-app .gaslight51-ranks>div{border-top:2px solid #857751;background:linear-gradient(180deg,#182b2b,#111d26);padding:20px;min-width:0;border-radius:5px;display:flex;flex-direction:column;gap:10px;align-items:flex-start}
#faction-app .gaslight51-ranks strong{font:700 19px Rajdhani,sans-serif;color:#f1e0b5;letter-spacing:.05em}
#faction-app .gaslight51-ranks small{color:#b7c5c4;line-height:1.5}
#faction-app .gaslight51-ranks img{height:210px;max-width:100%;object-fit:contain;align-self:center;margin-top:auto}
#faction-app .gaslight51-gallery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
#faction-app .gaslight51-gallery figure{margin:0;background:#101b22;border:1px solid #4b564d;border-radius:8px;overflow:hidden}
#faction-app .gaslight51-gallery img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover}
#faction-app .gaslight51-gallery figcaption{padding:12px 15px;font:700 14px Rajdhani,sans-serif;letter-spacing:.09em;color:#ddca99}
@media(max-width:760px){#faction-app .gaslight51-header{min-height:310px;padding-right:160px}#faction-app .gaslight51-grunt{max-width:160px;max-height:300px}#faction-app .gaslight51-ranks{grid-template-columns:1fr}}
@media(max-width:480px){#faction-app .gaslight51-header{min-height:255px;padding-right:105px}#faction-app .gaslight51-grunt{max-width:108px;max-height:248px}#faction-app .gaslight51-gallery-grid{grid-template-columns:1fr}}

/* Update 51.1 — Gaslight historical illustrations embedded at their events. */
#faction-app .gaslight52-history-figure{margin:22px auto 24px;max-width:960px;border:1px solid #4b564d;border-radius:8px;overflow:hidden;background:#101b22}
#faction-app .gaslight52-history-figure img{display:block;width:100%;height:auto;object-fit:contain}
#faction-app .gaslight52-history-figure figcaption{padding:11px 15px;font:700 14px Rajdhani,sans-serif;letter-spacing:.09em;color:#ddca99}
#faction-app .gaslight52-fleet .fleet-ship{max-width:580px}
#faction-app .gaslight52-fleet .fleet-ship img{object-fit:contain}

/* Update 52: Gaslight reference image fills its own card without a gray letterbox. */
#faction-app .gaslight52-fleet .fleet-ship-grid{display:grid;grid-template-columns:minmax(0,1fr);max-width:850px;margin-inline:auto}
#faction-app .gaslight52-fleet .fleet-ship{width:100%;max-width:850px;min-width:0;text-align:left}
#faction-app .gaslight52-fleet .fleet-ship img{display:block;width:100%;height:auto;max-height:none;aspect-ratio:auto;object-fit:contain;background:transparent}
#faction-app .gaslight52-fleet .fleet-ship-grid .fleet-ship{background:#142539}

/* Update 52 — Criminal factions with free-standing member illustrations. */
#faction-app .crime52-header{min-height:400px;padding-right:clamp(145px,23vw,310px);background:radial-gradient(circle at 24% 18%,#4c2a28,#101c27 65%);position:relative}
#faction-app .crime52-vultures .crime52-header{background:radial-gradient(circle at 22% 20%,#454228,#101923 68%)}
#faction-app .crime52-header .faction-emblem{position:relative;z-index:2}
#faction-app .crime52-header .faction-title{position:relative;z-index:2}
#faction-app .crime52-grunt{position:absolute;right:12px;bottom:0;width:auto;max-width:clamp(145px,23vw,310px);height:auto;max-height:390px;object-fit:contain;object-position:bottom center;pointer-events:none}
#faction-app .crime52-hierarchy{display:flex;flex-direction:column;align-items:center;gap:14px}
#faction-app .crime52-hierarchy>h4,#faction-app .crime52-hierarchy>p{align-self:stretch}
#faction-app .crime52-member{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 24px;border:1px solid #64758c;background:#162739;color:#edf2f9;border-radius:10px;min-width:185px;text-align:center;font:inherit}
#faction-app .crime52-person-link{cursor:pointer}
#faction-app .crime52-person-link:hover{border-color:#d6b37c;background:#26364a}
#faction-app .crime52-member strong{font:700 23px Rajdhani,sans-serif;letter-spacing:.04em}
#faction-app .crime52-member small{font:600 12px Rajdhani,sans-serif;color:#c3d0df;letter-spacing:.12em}
#faction-app .crime52-member span{font:700 12px Rajdhani,sans-serif;color:#a3dff7}
#faction-app .crime52-row{display:flex;gap:18px;justify-content:center;flex-wrap:wrap;width:100%}
#faction-app .crime52-hierarchy h5{margin:16px 0 4px;font:700 19px Rajdhani,sans-serif;color:#c6d0dd}
#faction-app .crime52-people{display:flex;flex-wrap:wrap;justify-content:center;gap:20px;width:100%}
#faction-app .crime52-figure{min-width:150px;max-width:220px;display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center}
#faction-app .crime52-figure img{display:block;max-width:100%;height:260px;object-fit:contain;object-position:center bottom}
#faction-app .crime52-figure strong{font:700 19px Rajdhani,sans-serif;color:#eef4fa}
#faction-app .crime52-figure small{color:#abbac9;font:600 12px Rajdhani,sans-serif}
#faction-app .crime52-group figure,#faction-app .crime52-kinryu-group figure{margin:18px auto;max-width:950px;border:1px solid #617187;border-radius:9px;overflow:hidden;background:#0e1623}
#faction-app .crime52-group figure img,#faction-app .crime52-kinryu-group figure img{display:block;width:100%;height:auto}
#faction-app .crime52-group figcaption,#faction-app .crime52-kinryu-group figcaption{padding:12px 15px;color:#cad7e5;font:700 14px Rajdhani,sans-serif;letter-spacing:.06em}
#faction-app .crime52-links{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}
#faction-app .crime52-links button{border:1px solid #66829b;border-radius:7px;padding:12px 18px;background:#182a3b;color:#d8e9f6;font:700 15px Rajdhani,sans-serif;cursor:pointer}
#faction-app .crime52-links button:hover{border-color:#b7d4ec}
@media(max-width:660px){#faction-app .crime52-header{min-height:310px;padding-right:145px}#faction-app .crime52-grunt{max-width:150px;max-height:300px}}
@media(max-width:420px){#faction-app .crime52-header{min-height:250px;padding-right:105px}#faction-app .crime52-grunt{max-width:110px;max-height:242px}#faction-app .crime52-figure img{height:205px}}

/* Update 53: dedicated Crime Sector hierarchy pages and unframed portraits. */
#faction-app .crime53-hierarchy-page{max-width:1120px;margin:0 auto}
#faction-app .crime53-hierarchy-content{padding:20px 14px 42px}
#faction-app .crime53-tier{margin:14px 0 38px;text-align:center}
#faction-app .crime53-tier>h4{margin:0 0 22px;font:700 clamp(22px,3vw,31px) Rajdhani,sans-serif;letter-spacing:.07em;color:#d8e5ef}
#faction-app .crime53-roster{display:flex;flex-wrap:wrap;justify-content:center;align-items:end;gap:clamp(18px,3vw,58px)}
#faction-app .crime53-person{display:flex;flex-direction:column;align-items:center;justify-content:end;gap:7px;width:clamp(155px,22vw,244px);min-width:0;padding:6px 3px;border:0;background:transparent;color:#ecf3f9;text-align:center;font:inherit}
#faction-app button.crime53-person{cursor:pointer}
#faction-app button.crime53-person:hover .crime53-portrait img{filter:drop-shadow(0 0 13px #b7def6)}
#faction-app .crime53-portrait{display:flex;align-items:end;justify-content:center;width:100%;height:clamp(230px,31vw,360px);background:transparent}
#faction-app .crime53-portrait img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;object-position:bottom center;filter:drop-shadow(0 12px 10px rgba(0,0,0,.2))}
#faction-app .crime53-person strong{font:700 23px Rajdhani,sans-serif;line-height:1.1}
#faction-app .crime53-person small{color:#c0d0e0;font:600 14px Rajdhani,sans-serif;letter-spacing:.04em}
#faction-app .crime53-person em{font:700 12px Rajdhani,sans-serif;color:#a3dff7;font-style:normal;letter-spacing:.04em}
#faction-app .crime53-connector{height:34px;width:2px;background:linear-gradient(#7a91a9,transparent);margin:14px auto}
#faction-app .crime53-founder-tier{padding-top:22px;border-top:1px solid #516377}
#faction-app .crime53-founder-tier p{color:#b9c9d8}
#faction-app .crime53-hierarchy-entry button{margin-top:14px;border:1px solid #698ca7;border-radius:8px;background:#20384c;color:#e0f2fb;padding:12px 20px;font:700 16px Rajdhani,sans-serif;cursor:pointer}
#faction-app .crime53-hierarchy-entry button:hover{border-color:#b8d9f5;background:#2a4a64}
#faction-app .crime53-history-founder{display:grid;grid-template-columns:minmax(0,1fr) minmax(140px,245px);gap:22px;align-items:center}
#faction-app .crime53-history-founder figure{margin:0;text-align:center}
#faction-app .crime53-history-founder img{display:block;width:100%;max-height:320px;object-fit:contain;object-position:center bottom}
#faction-app .crime53-history-founder figcaption{font:700 13px Rajdhani,sans-serif;color:#b7c7d8;letter-spacing:.07em}
@media(max-width:620px){#faction-app .crime53-history-founder{grid-template-columns:1fr}#faction-app .crime53-history-founder figure{max-width:210px;margin:auto}#faction-app .crime53-person{width:43%}#faction-app .crime53-portrait{height:240px}}

/* Update 54 — compact historical founder portrait; match dossier return navigation. */
#faction-app .crime53-history-founder{display:flow-root;min-height:0}
#faction-app .crime53-history-founder figure{float:right;width:clamp(118px,17%,178px);max-width:178px;margin:0 0 10px 24px;text-align:center}
#faction-app .crime53-history-founder img{width:100%;height:auto;max-height:225px;object-fit:contain;object-position:center bottom}
#faction-app .crime53-history-founder p{margin-top:0}
#faction-app .crime53-history-founder figcaption{margin-top:3px}
@media(max-width:620px){#faction-app .crime53-history-founder figure{width:120px;margin:0 0 8px 13px;float:right}}

/* UPDATE 55: Marrow Collective and Vincent section correction */
#faction-app .marrow55-page,#faction-app .marrow55-hierarchy-page{max-width:1200px;margin:0 auto}
#faction-app .marrow55-header{min-height:310px;padding-right:clamp(170px,28%,290px)}
#faction-app .marrow55-header-portrait{position:absolute;right:20px;bottom:0;max-height:310px;max-width:28%;object-fit:contain;object-position:center bottom}
#faction-app .marrow55-open{margin:14px 0 0;border:1px solid #986b74;border-radius:8px;padding:12px 21px;background:#2c2435;color:#f3e6e9;font:700 17px Rajdhani,sans-serif;cursor:pointer}
#faction-app .marrow55-hierarchy-page{padding:0 8px 48px}
#faction-app .marrow55-orbit{position:relative;padding:30px 8px 12px;text-align:center}
#faction-app .marrow55-center{position:relative;z-index:2;display:flex;justify-content:center}
#faction-app .marrow55-center .marrow55-person{width:min(250px,90%)}
#faction-app .marrow55-orbit-ring{max-width:1050px;margin:24px auto 8px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:end;border-top:1px solid #725b66;padding-top:23px}
#faction-app .marrow55-orbit-ring>div{min-width:0;display:flex;justify-content:center}
#faction-app .marrow55-person{display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center;min-width:0;width:100%;border:0;background:none;color:#e9edf3;font:inherit;cursor:pointer;padding:4px 5px 10px}
#faction-app .marrow55-person .marrow55-image{display:flex;justify-content:center;align-items:end;height:270px;width:100%}
#faction-app .marrow55-person img{display:block;max-height:100%;max-width:100%;width:auto;object-fit:contain;object-position:bottom center}
#faction-app .marrow55-person strong{font:700 24px Rajdhani,sans-serif}
#faction-app .marrow55-person small{font:600 13px Rajdhani,sans-serif;color:#b8c2d1;letter-spacing:.06em}
#faction-app .marrow55-person em{font:700 12px Rajdhani,sans-serif;color:#afdff2;font-style:normal}
#faction-app .marrow55-person:hover img{filter:drop-shadow(0 0 12px #bd6d7e)}
#faction-app .marrow55-affiliates{text-align:center;margin-top:25px}
#faction-app .marrow55-partner-row{max-width:670px;margin:16px auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:34px}
#faction-app .marrow55-disclaimer{text-align:center;color:#bac3d0;font-size:14px;max-width:850px;margin:20px auto}
/* Vincent was imposing a float-height gap on the subsequent history paragraph. */
#faction-app .crime53-history-founder{display:grid;grid-template-columns:minmax(0,1fr) 138px;gap:12px 24px;align-items:start}
#faction-app .crime53-history-founder figure{float:none;grid-column:2;grid-row:1 / span 2;width:138px;max-width:138px;margin:0}
#faction-app .crime53-history-founder p{grid-column:1;margin:0}
#faction-app .crime53-history-founder img{max-height:180px}
@media(max-width:700px){#faction-app .marrow55-orbit-ring{grid-template-columns:repeat(2,minmax(0,1fr))}#faction-app .marrow55-partner-row{gap:10px}#faction-app .marrow55-person .marrow55-image{height:230px}#faction-app .marrow55-header{padding-right:120px}#faction-app .marrow55-header-portrait{max-width:130px;max-height:245px}}
@media(max-width:430px){#faction-app .crime53-history-founder{grid-template-columns:1fr}#faction-app .crime53-history-founder figure{grid-column:1;grid-row:auto;margin:0 auto}#faction-app .marrow55-orbit-ring{gap:7px}#faction-app .marrow55-person .marrow55-image{height:185px}#faction-app .marrow55-person strong{font-size:19px}}

/* Update 56 — Genuine radial Marrow hierarchy, history picture, and archival notes. */
#faction-app .marrow56-wheel{position:relative;width:min(100%,1080px);height:790px;margin:12px auto 0;isolation:isolate}
#faction-app .marrow56-spokes{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none}
#faction-app .marrow56-core,#faction-app .marrow56-node{position:absolute;z-index:1;width:170px;transform:translate(-50%,-50%);display:flex;justify-content:center}
#faction-app .marrow56-core{left:50%;top:50%;width:220px;z-index:3;padding:12px 4px;border-radius:50%;background:radial-gradient(ellipse,#3e2029 10%,#2a1b25 65%,transparent 74%)}
#faction-app .marrow56-n1{left:50%;top:14%}
#faction-app .marrow56-n2{left:78.5%;top:29%}
#faction-app .marrow56-n3{left:78.5%;top:71%}
#faction-app .marrow56-n4{left:50%;top:87%}
#faction-app .marrow56-n5{left:21.5%;top:71%}
#faction-app .marrow56-n6{left:21.5%;top:29%}
#faction-app .marrow56-wheel .marrow55-person{width:100%;padding:3px;gap:3px}
#faction-app .marrow56-wheel .marrow55-person .marrow55-image{height:167px}
#faction-app .marrow56-core .marrow55-person .marrow55-image{height:222px}
#faction-app .marrow56-wheel .marrow55-person strong{font-size:20px;line-height:1.06}
#faction-app .marrow56-wheel .marrow55-person small{font-size:11px;letter-spacing:.035em;line-height:1.15}
#faction-app .marrow56-wheel .marrow55-person em{font-size:10px;line-height:1.2}
#faction-app .marrow55-affiliates{margin-top:0}
#faction-app .marrow56-history-figure{max-width:850px;margin:22px auto;text-align:center}
#faction-app .marrow56-history-figure img{width:100%;height:auto;display:block;object-fit:contain;border-radius:10px}
#faction-app .marrow56-history-figure figcaption{margin-top:8px;color:#becbd7;font:700 13px Rajdhani,sans-serif;letter-spacing:.08em}
@media(max-width:760px){#faction-app .marrow56-wheel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 8px;height:auto;padding:14px 0}#faction-app .marrow56-spokes{display:none}#faction-app .marrow56-core,#faction-app .marrow56-node{position:static;transform:none;width:100%;padding:0;background:none}#faction-app .marrow56-core{grid-column:1/-1;justify-self:center;width:min(230px,85%);padding:0;border-radius:0}#faction-app .marrow56-wheel .marrow55-person .marrow55-image{height:190px}#faction-app .marrow56-core .marrow55-person .marrow55-image{height:230px}}

/* Update 57 — Marrow subhierarchies and seven-node radial arrangement. */
#faction-app .marrow57-wheel .marrow56-n1{left:50%;top:12%}
#faction-app .marrow57-wheel .marrow56-n2{left:75.4%;top:26%}
#faction-app .marrow57-wheel .marrow56-n3{left:83.1%;top:59%}
#faction-app .marrow57-wheel .marrow56-n4{left:64.8%;top:84%}
#faction-app .marrow57-wheel .marrow56-n5{left:35.2%;top:84%}
#faction-app .marrow57-wheel .marrow56-n6{left:16.9%;top:59%}
#faction-app .marrow57-wheel .marrow56-n7{left:23.6%;top:26%}
#faction-app .marrow57-branch-page .crime53-roster{max-width:340px;margin:0 auto}
#faction-app .marrow57-branch-page .crime53-roster .marrow55-person{max-width:300px}
#faction-app .marrow57-branch-page .marrow55-person .marrow55-image{height:300px}
#faction-app .marrow57-branch-page>.marrow55-open{margin:22px 0}
#faction-app .marrow57-affiliate-return{border-color:#a78995}
@media(max-width:760px){#faction-app .marrow57-wheel .marrow56-node{left:auto;top:auto}}

/* Update 58: Marrow contingents – figures sit on the background without card frames. */
#faction-app .marrow58-group-section{margin-top:22px}
#faction-app .marrow58-troops{display:flex;justify-content:center;align-items:end;gap:clamp(12px,3vw,52px);flex-wrap:wrap;margin:18px 0 10px}
#faction-app .marrow58-troop{margin:0;min-width:0;flex:0 1 210px;display:flex;flex-direction:column;align-items:center;justify-content:end;gap:7px;text-align:center}
#faction-app .marrow58-troop img{display:block;max-height:285px;max-width:100%;width:auto;height:auto;object-fit:contain;object-position:center bottom;background:transparent;border:0;box-shadow:none}
#faction-app .marrow58-troop figcaption{font:700 16px Rajdhani,sans-serif;letter-spacing:.06em;color:#cbd6e2}
#faction-app .marrow58-troop-note{text-align:center;font-size:.91em;color:#aebdcc;margin:3px auto 12px;max-width:720px}
#faction-app .marrow58-imperial .marrow58-troop{flex-basis:190px}
#faction-app .marrow58-single .marrow58-troop{flex-basis:255px}
#faction-app .marrow58-single .marrow58-troop img{max-height:335px}
#faction-app .marrow58-group-section>.marrow55-open{display:block;margin:18px auto 0}
@media(max-width:620px){#faction-app .marrow58-troop{flex-basis:29%;gap:3px}#faction-app .marrow58-troop img{max-height:190px}#faction-app .marrow58-troop figcaption{font-size:12px}#faction-app .marrow58-single .marrow58-troop{flex-basis:70%}}

/* Update 59 — embossed Marrow crest behind the wheel; no interference with interactive portraits. */
#faction-app .marrow57-wheel::before{content:"";position:absolute;top:50%;left:50%;width:min(75%,700px);aspect-ratio:1;transform:translate(-50%,-50%);background:url("assets/marrow55-emblem.webp") center / contain no-repeat;opacity:.19;pointer-events:none;z-index:0;filter:grayscale(.2)}
#faction-app .marrow57-wheel .marrow56-spokes{z-index:1}
#faction-app .marrow57-wheel .marrow56-node{z-index:2}
#faction-app .marrow57-wheel .marrow56-core{z-index:3}
#faction-app .marrow58-group-section>.marrow58-troops:has(.marrow58-troop:only-child){justify-content:center}
#faction-app .marrow58-group-section>.marrow58-troops:has(.marrow58-troop:only-child) .marrow58-troop{flex-basis:min(260px,100%)}
@media(max-width:760px){#faction-app .marrow57-wheel::before{width:min(90%,480px);top:260px;opacity:.12}}

/* Update 60 — circular Marrow crest, unobstructed central figure, Anarchy Man navigation. */
#faction-app .marrow57-wheel::before{
  width:min(96%,950px);
  aspect-ratio:1;
  background-image:url("assets/marrow60-wheel.webp");
  background-size:contain;
  opacity:.43;
  filter:none;
  border-radius:50%;
}
#faction-app .marrow57-wheel .marrow56-core{
  background:none;
  border-radius:0;
  padding:0;
}
#faction-app .marrow60-troop-link{
  appearance:none;
  background:none;
  color:inherit;
  border:0;
  cursor:pointer;
  font:inherit;
  padding:0;
}
#faction-app .marrow60-troop-link:hover figcaption,
#faction-app .marrow60-troop-link:focus-visible figcaption{
  color:#a6e5f5;
}
#faction-app .marrow60-troop-link:focus-visible{
  outline:2px solid #a6e5f5;
  outline-offset:7px;
  border-radius:5px;
}
@media(max-width:760px){
  #faction-app .marrow57-wheel::before{
    width:min(96%,640px);
    top:260px;
    opacity:.21;
  }
}

/* Update 61 — user-supplied transparent Marrow wheel, no recropping */
#faction-app .marrow57-wheel::before{
  background-image:url("assets/marrow61-wheel.webp");
  background-size:contain;
  border-radius:0;
  opacity:.56;
}
@media(max-width:760px){#faction-app .marrow57-wheel::before{opacity:.32}}

/* Update 62: Marrow wheel should clear the lower-row nameplates. */
#faction-app .marrow57-wheel{padding-bottom:95px;box-sizing:content-box}
#faction-app .marrow57-wheel::before{width:min(115%,1100px);top:43%;opacity:.52}
@media(max-width:760px){#faction-app .marrow57-wheel{padding-bottom:20px}#faction-app .marrow57-wheel::before{width:min(102%,650px);top:255px;opacity:.22}}
/* Mercantile Court / Purrmont branch */
#faction-app .court62-header{align-items:center;min-height:250px}
#faction-app .court62-gallery figure{margin:16px 0 0;max-width:1050px}
#faction-app .court62-gallery img{display:block;width:100%;height:auto;border-radius:14px;object-fit:contain}
#faction-app .court62-gallery figcaption{text-align:center;color:#a9bac8;padding-top:9px;font-size:12px;letter-spacing:.08em}
#faction-app .court62-tier{margin:22px 0;padding:23px 10px;border-top:1px solid rgba(185,173,148,.24);text-align:center}
#faction-app .court62-roster{display:flex;flex-wrap:wrap;justify-content:center;align-items:end;gap:28px;margin:20px auto}
#faction-app .court62-person{background:none;border:0;color:inherit;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:7px;width:min(220px,95%);font:inherit;text-align:center;padding:8px}
#faction-app .court62-person:hover strong,#faction-app .court62-person:focus-visible strong{color:#a9e3f4}
#faction-app .court62-person:focus-visible{outline:2px solid #a9e3f4;border-radius:9px}
#faction-app .court62-portrait{display:flex;width:100%;height:280px;align-items:end;justify-content:center}
#faction-app .court62-portrait img{max-width:100%;max-height:100%;object-fit:contain;object-position:center bottom}
#faction-app .court62-person strong{font-size:21px;line-height:1.2}
#faction-app .court62-person small{font-size:11px;letter-spacing:.07em;color:#b4becd}
#faction-app .court62-person em{font-size:11px;color:#95d7e8;font-style:normal}
#faction-app .court62-family-links{display:flex;gap:16px;justify-content:center;flex-wrap:wrap;margin:18px auto}
#faction-app .court62-family-links>button,#faction-app .court62-family-links>div{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:9px;padding:14px;border:1px solid #596b80;background:#16283c;color:#e7edf5;border-radius:12px;width:min(240px,100%);font:inherit}
#faction-app .court62-family-links>button{cursor:pointer}
#faction-app .court62-family-links img{width:100px;max-height:100px;object-fit:contain}
#faction-app .court62-family-links small{font-size:12px;color:#afc1ce}
#faction-app .court62-history{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:26px;align-items:start}
#faction-app .court62-history figure{margin:0;text-align:center}
#faction-app .court62-history figure img{width:100%;height:auto;border-radius:12px}
#faction-app .court62-history figcaption{font-size:11px;color:#acbdce}
@media(max-width:720px){#faction-app .court62-history{grid-template-columns:1fr}#faction-app .court62-history figure{max-width:220px;margin:auto}#faction-app .court62-roster{gap:12px}#faction-app .court62-person{width:44%;min-width:130px}#faction-app .court62-portrait{height:210px}}

/* Update 63: House Purrmont has an independent main faction record and hierarchy. */
#faction-app .purrmont63-page .court62-person{min-width:180px}

/* Update 64: Court and Purrmont hierarchy affordances */
#faction-app .court62-person .court62-portrait img{transition:transform .23s ease,filter .23s ease;transform-origin:center bottom;will-change:transform}
#faction-app .court62-person:hover .court62-portrait img,#faction-app .court62-person:focus-visible .court62-portrait img{transform:scale(1.085);filter:drop-shadow(0 9px 12px rgba(0,0,0,.34))}
#faction-app .purrmont63-page .court62-connector{width:2px;height:38px;margin:-8px auto 12px;background:linear-gradient(transparent,#a6bccd,transparent)}
#faction-app .purrmont64-history{max-width:1020px;margin:23px auto 6px;text-align:center}
#faction-app .purrmont64-history img{display:block;width:100%;height:auto;object-fit:contain;border-radius:12px}
#faction-app .purrmont64-history figcaption{padding-top:10px;font-size:11px;color:#afbeca;letter-spacing:.07em}
@media(prefers-reduced-motion:reduce){#faction-app .court62-person .court62-portrait img{transition:none}}

/* Update 65: Court/Purrmont portrait resilience and featured family guard */
#faction-app .court65-photo-fallback{display:flex;justify-content:center;align-items:center;align-self:center;width:150px;height:220px;border:1px solid #8b7963;border-radius:13px;background:linear-gradient(150deg,#263349,#101c2e);color:#d7c29b;font-family:serif;font-size:48px;letter-spacing:.05em}
#faction-app .court65-photo-fallback[hidden]{display:none}
#faction-app .purrmont65-feature{margin:20px auto 8px;max-width:250px;text-align:center}
#faction-app .purrmont65-feature img{display:block;width:100%;max-height:380px;object-fit:contain}
#faction-app .purrmont65-feature figcaption{margin-top:8px;font-size:11px;letter-spacing:.08em;color:#a9bdcb}

/* Update 69: House Dogenridge family dossier. No hierarchy. */
#faction-app .dogenridge69-header{min-height:255px;align-items:center}
#faction-app .dogenridge69-header .faction-emblem{background:#0c0b0c}
#faction-app .dogenridge69-history-image{margin:22px auto 0;max-width:1100px;border:1px solid rgba(194,160,95,.38);border-radius:12px;overflow:hidden;background:#161719}
#faction-app .dogenridge69-history-image img{display:block;width:100%;height:auto}
#faction-app .dogenridge69-history-image figcaption{text-align:center;padding:12px 14px;color:#d9c49d;letter-spacing:.09em;font-size:12px}
#faction-app .dogenridge69-feature{text-align:center}
#faction-app .dogenridge69-feature>p{text-align:left;max-width:960px;margin:0 auto 12px}
#faction-app .dogenridge69-members{display:flex;justify-content:center;gap:26px;align-items:flex-end;flex-wrap:wrap;margin:16px auto 4px}
#faction-app .dogenridge69-member{border:0;background:transparent;color:inherit;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:8px;width:min(260px,100%);padding:9px 12px;font:inherit;text-align:center}
#faction-app .dogenridge69-member-photo{height:345px;width:100%;display:flex;align-items:flex-end;justify-content:center}
#faction-app .dogenridge69-member-photo img{max-width:100%;max-height:100%;object-fit:contain;object-position:center bottom;transition:transform .22s ease,filter .22s ease;transform-origin:center bottom}
#faction-app .dogenridge69-member:hover img,#faction-app .dogenridge69-member:focus-visible img{transform:scale(1.07);filter:drop-shadow(0 10px 14px rgba(0,0,0,.4))}
#faction-app .dogenridge69-member strong{font-size:23px}
#faction-app .dogenridge69-member small{color:#b5becd;font-size:12px;letter-spacing:.065em}
#faction-app .dogenridge69-member em{font-size:12px;color:#9bdceb;font-style:normal}
#faction-app .dogenridge69-member:focus-visible{outline:2px solid #9bdceb;border-radius:10px}
#faction-app .dogenridge69-member-placeholder{height:270px;aspect-ratio:3/4;display:grid;place-items:center;background:#1a2b3f;border:1px solid #826f4c;border-radius:13px;color:#d8c397;font-size:68px}
#faction-app .dogenridge69-member-placeholder[hidden]{display:none}
@media(max-width:700px){#faction-app .dogenridge69-member{width:min(205px,45%)}#faction-app .dogenridge69-member-photo{height:245px}#faction-app .dogenridge69-member strong{font-size:19px}}
@media(prefers-reduced-motion:reduce){#faction-app .dogenridge69-member-photo img{transition:none}}

/* HOME LOCATIONS · PATCH 002 */

.home-loc-page{color:#e5e7ee}.home-loc-breadcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:10px 0 20px;color:#b8a9be;font-size:11px;letter-spacing:1px}.home-loc-breadcrumb button{border:0;background:none;color:#dfa3a8;cursor:pointer;font-weight:700;letter-spacing:.7px}.home-loc-breadcrumb button:hover{text-decoration:underline}.home-loc-hero{position:relative;min-height:310px;overflow:hidden;border:1px solid #875963;border-radius:13px;display:flex;align-items:end;background:#111521}.home-loc-hero>img{position:absolute;width:100%;height:100%;object-fit:cover;inset:0}.home-loc-hero:after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#0d1020f5 1%,transparent 93%)}.home-loc-hero>div{position:relative;z-index:1;padding:28px}.home-loc-hero h2{font:clamp(36px,6vw,68px) Georgia,serif;margin:3px 0 7px;letter-spacing:2px;color:#fff1ee}.home-loc-hero p{font-size:16px;color:#f0d7dc;line-height:1.4;margin:0}.home-loc-intro{margin-top:16px!important}.home-loc-intro p{line-height:1.85}.home-loc-section{margin:30px 0 12px}.home-loc-section-title>span{color:#e6a4aa;font-size:11px;letter-spacing:2px;font-weight:bold}.home-loc-section-title h3{font:32px Georgia,serif;color:#f2e3e1;margin:8px 0}.home-loc-section-title p{color:#bac2d2;margin:0 0 18px;max-width:760px;line-height:1.7}.home-loc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(245px,1fr));gap:14px}.home-loc-card{display:flex;text-align:left;gap:12px;padding:17px;background:linear-gradient(135deg,#252334,#141e2b);border:1px solid #725164;border-radius:10px;cursor:pointer;color:#eee8f1;min-height:162px}.home-loc-card:hover,.home-loc-room-card:hover{border-color:#e6aaa0;background:#2e2939;transform:translateY(-1px)}.home-loc-card-art{width:45px;height:45px;flex-shrink:0;display:grid;place-items:center;font-size:25px;background:#4a3041;border:1px solid #a46b75;border-radius:9px}.home-loc-card small{display:block;color:#d59eaa;font-size:10px;letter-spacing:1px}.home-loc-card strong{display:block;font:20px Georgia,serif;margin:5px 0 7px}.home-loc-card em{display:block;font-size:12px;line-height:1.5;font-style:normal;color:#bac4d2}.home-loc-card b{display:block;color:#f0b2b9;font-size:10px;letter-spacing:1px;margin-top:10px}.home-loc-timeline{margin-top:54px;padding-top:23px;border-top:2px solid #865766}.home-loc-stage{border:1px solid #8b6371;background:#111721;padding:14px;border-radius:12px}.home-loc-stage-display{height:auto;aspect-ratio:16/9;background:#202338;overflow:hidden;display:grid;place-items:center;border-radius:8px}.home-loc-stage-display img{height:100%;width:100%;object-fit:contain}.home-loc-stage-caption{display:flex;justify-content:space-between;padding:13px 2px;color:#ebd6de}.home-loc-stage-caption span{font-size:11px;letter-spacing:1px;color:#d7a6ac}.home-loc-stage-controls{display:flex;gap:10px;align-items:center}.home-loc-stage-controls input{flex:1;accent-color:#c86f7c}.home-loc-stage-controls button,.home-loc-return{padding:10px 13px;background:#543447;color:white;border:1px solid #a96d7d;border-radius:6px;cursor:pointer}.home-loc-stage-controls button:disabled{opacity:.35;cursor:not-allowed}.home-loc-subhead{border-bottom:1px solid #6e5666;padding-bottom:18px}.home-loc-subhead h3{font:34px Georgia,serif;margin:6px 0}.home-loc-subhead p{color:#c7c7d0;line-height:1.7}.home-loc-image-pending{padding:32px;background:repeating-linear-gradient(135deg,#1b2230,#1b2230 18px,#202737 18px,#202737 36px);border:1px dashed #9c7181;border-radius:9px;margin:20px 0;text-align:center}.home-loc-image-pending span{font-size:11px;letter-spacing:2px;color:#e2a6af;font-weight:700}.home-loc-image-pending p{color:#acb5c7;font-size:13px}.home-loc-rooms{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.home-loc-room-card{padding:16px;background:#222334;border:1px solid #6d526a;border-radius:9px;color:#f2e6e9;text-align:left;cursor:pointer}.home-loc-room-card span{display:block;font-size:10px;color:#d499a6;letter-spacing:1px}.home-loc-room-card strong{display:block;font:20px Georgia,serif;margin:7px 0}.home-loc-room-card p{font-size:12px;line-height:1.6;color:#c1bfd0}.home-loc-room-card b{font-size:10px;color:#e9aab4}.home-loc-pending{padding:16px;border:1px dashed #72586d;color:#c6bac8;border-radius:7px}.home-loc-return{margin-top:20px}@media(max-width:600px){.home-loc-hero{min-height:250px}.home-loc-hero>div{padding:18px}.home-loc-stage-controls{flex-wrap:wrap}.home-loc-stage-controls input{order:-1;flex-basis:100%}.home-loc-grid{grid-template-columns:1fr}}


/* HOME LOCATIONS · PATCH 003 — full uncropped development maps */
/* The original six development illustrations are 4:3, not 16:9.
   Let the actual source dimensions determine the gallery height. */
#location-app .home-loc-stage-display{
  display:block;
  width:100%;
  height:auto!important;
  min-height:0;
  max-height:none;
  aspect-ratio:auto!important;
  overflow:visible;
  background:#111721;
}
#location-app .home-loc-stage-display>img{
  display:block;
  width:100%!important;
  max-width:100%;
  height:auto!important;
  min-height:0;
  max-height:none!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  object-position:center center;
  margin:0 auto;
}

/* HOME Kinryū-kai location asset integration · PATCH 004 */
.home-loc-feature-image{margin:20px 0 26px;border:1px solid #875d69;border-radius:9px;overflow:hidden;background:#121622}
.home-loc-feature-image img{display:block;width:100%;height:auto;object-fit:contain;max-height:760px}
.home-loc-feature-image figcaption{font-size:11px;padding:10px 14px;color:#d6abb7;letter-spacing:.8px;background:#1b1d2b}
.home-loc-card-thumb{width:92px;height:112px;flex-shrink:0;object-fit:cover;border-radius:6px;border:1px solid #795568}
.home-loc-room-thumb{width:100%;height:150px;display:block;object-fit:cover;border-radius:5px;margin-bottom:12px}
@media(max-width:600px){.home-loc-card-thumb{width:75px;height:94px}.home-loc-feature-image img{max-height:none}}


/* PATCH 005: final-level HOME interiors display inline, never as extra pages. */
.home-loc-room-gallery-card{margin:0;min-width:0;background:rgba(12,14,25,.65);border:1px solid rgba(194,147,112,.35);border-radius:8px;overflow:hidden}
.home-loc-room-gallery-card figcaption{padding:13px 15px 15px}
.home-loc-room-gallery-card figcaption strong{display:block;color:#f3dfca;font-size:1.05rem;line-height:1.4}
.home-loc-room-gallery-card figcaption p{color:#c9bdba;margin:7px 0 0;line-height:1.55;font-size:.92rem}
.home-loc-gallery-zoom,.home-loc-feature-zoom{position:relative;display:block;padding:0;width:100%;cursor:zoom-in;background:#0d1019;border:0;color:inherit;overflow:hidden}
.home-loc-room-gallery-image{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:contain}
.home-loc-zoom-hint{position:absolute;right:8px;bottom:8px;background:rgba(9,9,15,.82);color:#eed4b7;font-size:10px;letter-spacing:1px;padding:6px 8px;border:1px solid #8b6d54}
.home-loc-feature-zoom img{display:block;width:100%;height:auto;object-fit:contain}
.home-loc-room-noimage{min-height:95px;display:grid;place-items:center;background:linear-gradient(130deg,#282535,#171a24);color:#bba9a1;font-size:11px;letter-spacing:1.2px}
.home-loc-lightbox{position:fixed;inset:0;z-index:99999;background:rgba(2,3,9,.93);display:flex;align-items:center;justify-content:center;padding:24px}
.home-loc-lightbox-panel{position:relative;display:flex;flex-direction:column;align-items:center;max-width:98vw;max-height:95vh;gap:10px}
.home-loc-lightbox-panel img{display:block;max-width:94vw;max-height:calc(95vh - 82px);width:auto;height:auto;object-fit:contain}
.home-loc-lightbox-panel p{margin:0;color:#e1d3c7}
.home-loc-lightbox-close{align-self:flex-end;border:1px solid #bb8768;background:#191b27;color:#f5e6d4;padding:8px 15px;cursor:pointer}
@media(max-width:700px){.home-loc-lightbox{padding:9px}.home-loc-lightbox-panel img{max-width:97vw}}


/* PATCH 006 — true inline illustrated room entries, not a four-column card directory. */
.home-loc-page .home-loc-rooms{display:flex!important;flex-direction:column!important;gap:24px!important;width:100%}
.home-loc-page .home-loc-room-gallery-card{display:grid!important;grid-template-columns:minmax(0, 1.75fr) minmax(190px, .8fr)!important;align-items:center;gap:0;width:100%;max-width:none;margin:0;padding:0;background:transparent;border:0;border-bottom:1px solid rgba(198,151,124,.38);border-radius:0;overflow:visible;box-shadow:none}
.home-loc-page .home-loc-room-gallery-card:last-child{border-bottom:0}
.home-loc-page .home-loc-room-gallery-card figcaption{padding:22px 24px;align-self:center}
.home-loc-page .home-loc-room-gallery-card figcaption strong{font:600 clamp(20px,2vw,28px) Georgia,serif;color:#f5dfcd;line-height:1.3}
.home-loc-page .home-loc-room-gallery-card figcaption p{font-size:clamp(13px,1.2vw,16px);line-height:1.65;color:#d2c8c5;margin:10px 0 0}
.home-loc-page .home-loc-gallery-zoom{border:1px solid rgba(185,135,103,.36);border-radius:5px;overflow:hidden;background:#0b101b}
.home-loc-page .home-loc-room-gallery-image{display:block;width:100%;height:auto;aspect-ratio:auto;object-fit:contain}
.home-loc-page .home-loc-zoom-hint{opacity:0;transition:opacity .2s}
.home-loc-page .home-loc-gallery-zoom:hover .home-loc-zoom-hint,.home-loc-page .home-loc-gallery-zoom:focus-visible .home-loc-zoom-hint{opacity:1}
@media(max-width:800px){.home-loc-page .home-loc-room-gallery-card{grid-template-columns:minmax(0,1fr)!important}.home-loc-page .home-loc-room-gallery-card figcaption{padding:13px 3px 20px}}

/* PATCH 008: HOME-only back control, using existing data-home-to navigation. */
.home-loc-safe-back{display:flex;margin:0 0 14px;justify-content:flex-start}
.home-loc-safe-back-btn{cursor:pointer;border:1px solid rgba(188,127,126,.65);background:#382834;color:#f4e6e4;border-radius:5px;padding:10px 16px;font:700 14px Rajdhani,system-ui,sans-serif;letter-spacing:.045em;max-width:100%;text-align:left}
.home-loc-safe-back-btn:hover,.home-loc-safe-back-btn:focus-visible{background:#583340;border-color:#e0aaa9;outline-offset:2px}
@media(max-width:600px){.home-loc-safe-back-btn{width:100%;text-align:center}}


/* PATCH 021 — HOME location landing page: image-led exterior gallery cards.
   Scoped to the HOME listing, leaving district child cards and the room galleries intact. */
#location-app .home-loc-page > .home-loc-section:not(.home-loc-timeline) > .home-loc-grid {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;
}
#location-app .home-loc-page > .home-loc-section:not(.home-loc-timeline) > .home-loc-grid > .home-loc-card {
  display:flex;flex-direction:column;gap:0;padding:0;min-width:0;min-height:0;
  overflow:hidden;border-radius:14px;text-align:left;
  background:linear-gradient(155deg,#242135,#131b29);border:1px solid #7e5669;
  box-shadow:0 10px 25px rgba(0,0,0,.2);transition:border-color .18s, box-shadow .18s,transform .18s;
}
#location-app .home-loc-page > .home-loc-section:not(.home-loc-timeline) > .home-loc-grid > .home-loc-card > .home-loc-card-thumb {
  display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;flex-shrink:0;
  border:0;border-radius:0;border-bottom:1px solid rgba(197,146,125,.5);
  transition:filter .2s,transform .2s;
}
#location-app .home-loc-page > .home-loc-section:not(.home-loc-timeline) > .home-loc-grid > .home-loc-card > span:not(.home-loc-card-art) {
  display:block;padding:18px 20px 20px;min-width:0;
}
#location-app .home-loc-page > .home-loc-section:not(.home-loc-timeline) > .home-loc-grid > .home-loc-card small {
  font-size:11px;letter-spacing:1.5px;text-transform:uppercase;color:#e6b4ba;
}
#location-app .home-loc-page > .home-loc-section:not(.home-loc-timeline) > .home-loc-grid > .home-loc-card strong {
  font:600 clamp(22px,2.1vw,29px) Georgia,serif;color:#f8e5dd;margin:7px 0 10px;
}
#location-app .home-loc-page > .home-loc-section:not(.home-loc-timeline) > .home-loc-grid > .home-loc-card em {
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;
  font-size:13px;line-height:1.65;color:#c9c4d1;
}
#location-app .home-loc-page > .home-loc-section:not(.home-loc-timeline) > .home-loc-grid > .home-loc-card b {
  font-size:11px;letter-spacing:1.3px;margin-top:15px;color:#f1b1bd;
}
#location-app .home-loc-page > .home-loc-section:not(.home-loc-timeline) > .home-loc-grid > .home-loc-card:hover,
#location-app .home-loc-page > .home-loc-section:not(.home-loc-timeline) > .home-loc-grid > .home-loc-card:focus-visible {
  border-color:#efb7b0;box-shadow:0 16px 32px rgba(0,0,0,.35);transform:translateY(-3px);outline-offset:3px;
}
#location-app .home-loc-page > .home-loc-section:not(.home-loc-timeline) > .home-loc-grid > .home-loc-card:hover > img,
#location-app .home-loc-page > .home-loc-section:not(.home-loc-timeline) > .home-loc-grid > .home-loc-card:focus-visible > img {filter:brightness(1.08)}
@media(max-width:760px) {
  #location-app .home-loc-page > .home-loc-section:not(.home-loc-timeline) > .home-loc-grid {grid-template-columns:minmax(0,1fr);gap:16px}
  #location-app .home-loc-page > .home-loc-section:not(.home-loc-timeline) > .home-loc-grid > .home-loc-card > span:not(.home-loc-card-art) {padding:15px 17px 17px}
}


/* PATCH 025 — HOME location landing only: scenic hero and editorial wayfinding. */
#location-app .home-loc-page > .home-loc-hero{min-height:clamp(340px,43vw,600px);border-color:rgba(220,150,180,.53);box-shadow:0 16px 40px rgba(4,6,14,.36)}
#location-app .home-loc-page > .home-loc-hero > img{object-fit:cover;object-position:50% 53%}
#location-app .home-loc-page > .home-loc-hero:after{background:linear-gradient(0deg,rgba(9,12,27,.91),rgba(9,12,27,.23) 53%,rgba(9,12,27,.04))}
#location-app .home-loc-page > .home-loc-hero > div{padding:clamp(24px,5vw,58px)}
#location-app .home-loc-page > .home-loc-hero h2{font-size:clamp(64px,10vw,120px);line-height:1;letter-spacing:.06em;text-shadow:0 6px 30px rgba(0,0,0,.5)}
#location-app .home-loc-page > .home-loc-hero p{font-size:clamp(16px,2vw,22px);max-width:590px}
#location-app .home-loc-hero-marks{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}
#location-app .home-loc-hero-marks span{display:inline-block;padding:7px 10px;background:rgba(13,15,28,.64);border:1px solid rgba(250,194,200,.47);border-radius:2px;font:700 10px Rajdhani,system-ui,sans-serif;letter-spacing:1.4px;color:#f7d7e0}
#location-app .home-loc-welcome{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(230px,.75fr);gap:clamp(18px,3vw,44px);align-items:center;margin:19px 0 17px;padding:clamp(22px,3.2vw,38px);border:1px solid rgba(202,140,165,.39);border-radius:13px;background:radial-gradient(ellipse at 96% 0%,rgba(125,65,118,.24),transparent 58%),linear-gradient(125deg,#1c1b2c,#131d2c)}
#location-app .home-loc-welcome-kicker{font-size:11px;letter-spacing:2.1px;color:#efaebf;font-weight:700}
#location-app .home-loc-welcome h3{margin:9px 0 13px;font:clamp(25px,3.1vw,39px)/1.2 Georgia,serif;color:#f6e5df}
#location-app .home-loc-welcome-copy p{margin:0;color:#c9cbd4;line-height:1.75;font-size:14px;max-width:680px}
#location-app .home-loc-welcome-aside{display:flex;flex-direction:column;gap:9px;padding-left:22px;border-left:1px solid rgba(220,163,176,.32)}
#location-app .home-loc-welcome-aside > span{font-size:10px;font-weight:700;letter-spacing:2px;color:#efaebf}
#location-app .home-loc-welcome-aside a{display:flex;justify-content:space-between;gap:12px;align-items:center;color:#f8e6e4;text-decoration:none;font:600 16px Georgia,serif;border:1px solid rgba(214,151,166,.45);border-radius:7px;padding:12px;background:rgba(23,24,39,.7)}
#location-app .home-loc-welcome-aside a:hover,#location-app .home-loc-welcome-aside a:focus-visible{border-color:#f4b2c7;background:rgba(80,43,69,.56)}
#location-app .home-loc-welcome-aside a span{color:#eeb3c8}
#location-app .home-loc-welcome-aside p{font-size:11px;color:#aeb7c9;line-height:1.6;margin:2px 0 0}
#location-app #home-places,#location-app #home-development{scroll-margin-top:24px}
@media(max-width:760px){#location-app .home-loc-welcome{grid-template-columns:1fr}#location-app .home-loc-welcome-aside{padding-left:0;padding-top:15px;border-left:0;border-top:1px solid rgba(220,163,176,.32)}#location-app .home-loc-page > .home-loc-hero{min-height:370px}}

/* Patch 026: HOME dossier facts before its supplementary introduction, matching other world dossiers. */
#location-app .home-loc-page > .home-loc-intro{margin-top:18px}
#location-app .home-loc-page > .home-loc-welcome{margin-top:17px}

/* PATCH 028 — PORTA NEXUS archive (all rules scoped to this archive) */
#location-app .porta-loc-intro{padding:12px 0 20px}#location-app .porta-loc-intro h3{font:700 clamp(24px,3vw,34px) Georgia,serif;margin:8px 0}#location-app .porta-loc-intro p{max-width:790px;color:var(--muted,#bcb7b6);line-height:1.7}
#location-app .porta-loc-group{border:1px solid #534b48;border-radius:7px;margin:14px 0;background:rgba(15,15,19,.25);overflow:hidden}
#location-app .porta-loc-group>summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:19px 21px;color:#eee2d6;font-weight:800;letter-spacing:.07em;list-style:none}#location-app .porta-loc-group>summary::-webkit-details-marker{display:none}#location-app .porta-loc-group>summary:before{content:'▸';color:#bd7968;margin-right:8px}#location-app .porta-loc-group[open]>summary:before{content:'▾'}#location-app .porta-loc-group>summary span{font-size:11px;letter-spacing:.09em;color:#b6a5a0;font-weight:600;margin-left:auto}
#location-app .porta-loc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;padding:0 18px 20px}
#location-app .porta-loc-card{display:flex;flex-direction:column;align-items:stretch;text-align:left;cursor:pointer;padding:0;border:1px solid #514947;background:#1a1b20;border-radius:7px;overflow:hidden;min-width:0;color:#f3ece8}#location-app .porta-loc-card:hover,#location-app .porta-loc-card:focus-visible{border-color:#c18a78;transform:translateY(-2px)}
#location-app .porta-loc-card-mark{height:140px;display:grid;place-items:center;background:linear-gradient(135deg,#25272d,#1a1b20 65%,#332522);font-size:52px;color:#64575a}#location-app .porta-loc-card-body{display:flex;flex-direction:column;padding:16px;gap:9px;flex:1}#location-app .porta-loc-card-body strong{font-size:17px;line-height:1.3}#location-app .porta-loc-card-body small{font-size:12px;color:#b9a9a8;line-height:1.5}#location-app .porta-loc-card-body em{font-style:normal;font-size:10px;font-weight:800;letter-spacing:.1em;color:#d49a80;margin-top:auto}
@media(max-width:660px){#location-app .porta-loc-grid{grid-template-columns:minmax(0,1fr)}}

/* Patch 034: City Hall era gallery — scoped to its location record. */
#location-app .porta-loc-card-exterior{display:block;width:100%;height:190px;object-fit:cover}
#location-app .porta-city-era-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0 22px}
#location-app .porta-city-era-tabs button{cursor:pointer;border:1px solid #6a5552;border-radius:5px;background:#202027;color:#e4dad5;padding:12px 18px;font-weight:800;letter-spacing:.08em}
#location-app .porta-city-era-tabs button.active,#location-app .porta-city-era-tabs button:focus-visible{background:#743c42;border-color:#d2a38f;color:#fff}
#location-app .porta-city-era-heading{padding:6px 0 12px}
#location-app .porta-city-era-heading h4{margin:8px 0;font:700 clamp(24px,3vw,32px) Georgia,serif;color:#f1dfd3}
#location-app .porta-city-era-heading p{line-height:1.7;color:#c5b8b6}
#location-app .porta-city-photo{margin:0 0 16px;min-width:0}
#location-app .porta-city-photo-btn{position:relative;display:block;cursor:zoom-in;width:100%;padding:0;border:1px solid #67514d;border-radius:7px;background:#17191d;overflow:hidden}
#location-app .porta-city-photo-btn img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}
#location-app .porta-city-photo-btn>span{position:absolute;bottom:10px;right:10px;padding:8px 12px;background:#19171acb;color:#f2e0d7;letter-spacing:.08em;font-size:10px;font-weight:800}
#location-app .porta-city-photo figcaption{padding:12px 1px;color:#f4e3db;line-height:1.45}
#location-app .porta-city-photo figcaption p{margin:4px 0 0;color:#baadab;font-size:13px}
#location-app .porta-city-interiors-label{margin:26px 0 15px}
#location-app .porta-city-room-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:22px;row-gap:12px}
@media(max-width:700px){#location-app .porta-city-room-grid{grid-template-columns:1fr}#location-app .porta-city-era-tabs button{flex:1}}


/* NST character uniformity: preserve Clyde's compact side-by-side link cards. */
#character-app .char-panel .nst-uniform-original-source { display:none !important; }
#character-app .char-panel .nst-uniform-link-row {
 display:flex !important;flex-flow:row wrap !important;align-items:stretch !important;
 justify-content:flex-start !important;gap:10px !important;
}
#character-app .char-panel .nst-uniform-link-row > .char-link {
 flex:0 1 320px !important;max-width:100% !important;width:auto !important;
 min-width:min(100%,220px) !important;box-sizing:border-box !important;
}
@media(max-width:520px){
 #character-app .char-panel .nst-uniform-link-row > .char-link {flex-basis:100% !important;}
}

/* NST mobile-only archivist: scroll long speeches inside the existing bubble.
   Preserve portrait framing, minimize button and desktop behavior. */
@media (max-width: 600px) {
  .dossier-archivist { right: 0; }
  .dossier-archivist .floating-speech p {
    max-height: min(36dvh, 210px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 5px;
  }
  .dossier-archivist.collapsed .floating-speech p { display: none; }
}

/* Mobile-only directory portrait framing experiment (reversible).
   Reduce the forced zoom and preserve each source image’s aspect ratio.
   Explicit individual portrait rules remain higher-priority inline styles.
   Does not affect full dossiers, faction rosters, or desktop. */
@media (max-width: 600px) {
  .char-directory-card .char-directory-portrait > img:not([style]) {
    height: 130%;
    width: 100%;
    object-fit: contain;
    object-position: center top;
  }
}

/* Mobile directory cards: eliminate the empty strip below shorter portraits.
   Stretch the portrait viewport to the card's real content height and anchor
   regular artwork to its bottom. Keep explicit per-character image styles. */
@media (max-width: 600px) {
  .char-directory-card .char-directory-portrait {
    height: auto;
    min-height: 170px;
    align-self: stretch;
  }
  .char-directory-card .char-directory-portrait > img:not([style]) {
    position: absolute;
    inset: auto 0 0;
    height: 100%;
    width: 100%;
    object-fit: contain;
    object-position: center bottom;
  }
}
