/* MOV-20260910-003: one final, scoped palette. No layout/input flow changes. */
.vocation-tree { --tree-color:#eeba50; margin-top:26px; }
.vocation-tree.theme-herbologist { --tree-color:#92d89b; }
.vocation-tree.theme-comensal { --tree-color:#e97fb5; }
.vocation-tree.theme-shapeshifter { --tree-color:#8ed8ef; }
.vocation-tree.theme-guardian { --tree-color:#f1d586; }
.tree-postures { display:flex; gap:8px; flex-wrap:wrap; }
.tree-postures button,.tree-spell { display:flex; align-items:center; gap:8px; background:#29183b; color:#f2eaf6; border:1px solid #90729f; padding:10px; border-radius:8px; cursor:pointer; text-align:left; font:inherit; }
.tree-postures [aria-pressed=true] { outline:2px solid #f2eaf6; background:#593474; }
.tree-posture-description { padding:14px 0; }
.tree-legend { font-size:13px; }
.tree-explorer { display:grid; grid-template-columns:minmax(0,1fr) minmax(210px,.8fr); gap:18px; align-items:start; }
.tree-timeline { border-left:3px solid var(--tree-color); margin-left:8px; padding-left:18px; }
.tree-level { position:relative; padding-bottom:22px; }
.tree-level:before { content:''; position:absolute; left:-21px; top:15px; width:18px; height:2px; background:var(--tree-color); box-shadow:0 0 7px var(--tree-color); }
.tree-nodes { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:9px; }
.tree-spell { font-size:12px; min-width:0; position:relative; }
.tree-spell.is-boosted { border:2px solid #fbf2ff; box-shadow:0 0 0 3px #a955dc,0 0 12px #a955dc; }
.tree-spell[aria-pressed=true] { background:#573568; }
.tree-detail { position:sticky; top:14px; padding:16px; border:1px solid #896ca0; background:#1b1128; border-radius:10px; max-height:calc(100vh - 40px); overflow-y:auto; }
.tree-detail h3 { margin-top:0; }
.tree-detail p { font-size:14px; }
.vocation-tree .portal-spell-icon { background-image:url('/portal/assets/spells/spell-icons-32x32.png'); background-position:var(--spell-x) 0; }
@media(max-width:650px) { .tree-explorer { display:flex; flex-direction:column-reverse; } .tree-detail { position:sticky; top:8px; z-index:5; width:100%; box-sizing:border-box; max-height:44vh; } .tree-timeline { width:calc(100% - 32px); } }
:root { --a-text:#f2eaf6; --a-muted:#c9bad5; --portal-ink:#f2eaf6; --portal-text:#f2eaf6; --portal-muted:#c9bad5; --portal-gold:#ffdc79; }
body { padding-top:0; }
.BoxContent .portal-affinity__skill :is(strong,span) { color:#f2eaf6; }
@media(max-width:760px) {
 .alchemia-sidebar-open .alchemia-topbar__toggle { position:fixed; right:12px; top:12px; z-index:1200; }
 .alchemia-sidebar-backdrop { inset:0; height:100vh; }
 #MenuColumn { top:0 !important; padding-top:56px !important; height:100vh !important; max-height:100dvh !important; min-height:0 !important; box-sizing:border-box; }
}
.alchemia-topbar { position:relative; height:auto; min-height:0; padding:12px max(16px,calc((100vw - 1240px)/2)); gap:28px; background:#100a19; }
.alchemia-topbar__brand { flex:1; max-width:880px; width:auto; height:auto; min-width:0; overflow:visible; }
.alchemia-topbar__brand img { display:block; width:100%; max-width:none; height:auto; object-fit:contain; filter:none; border-radius:12px; }
.alchemia-topbar__tools { flex:0 1 210px; flex-direction:column; align-items:center; gap:22px; }
.alchemia-topbar__motto { line-height:1.8; text-align:center; color:#e4ceeF; }
body #top { padding-top:0; margin-top:0; }
body .Content .BoxContent { color:#f2eaf6 !important; }
.BoxContent :is(.portal-card,.portal-detail-grid > div,.portal-entry,.portal-note,.portal-skill-card,.portal-affinity,.portal-affinity__skill,.portal-vocation-fact) { background:#201329; color:#f2eaf6; border-color:#79568d; }
.BoxContent :is(p,li,dd,dt,label,small,.portal-lead,.portal-empty) { color:inherit; }
.BoxContent :is(.portal-card,.portal-entry,.portal-detail-grid,.portal-note,.portal-section) :is(p,li,dd,dt) { color:#e6ddec; line-height:1.6; }
.BoxContent :is(h1,h2,h3,h4,.portal-skill-card h3,.portal-affinity h3) { color:#ffdc79; }
.BoxContent :is(.portal-kicker,.portal-card__eyebrow) { color:#d7a9ed; }
.BoxContent a:not(.portal-button):not(.portal-card):not(.portal-vocation) { color:#e0b7fa; }
.BoxContent a:hover { text-decoration:underline; }
.BoxContent :is(.portal-table,.portal-data-table) { background:#190f23; color:#f2eaf6; }
.BoxContent :is(.portal-table,.portal-data-table) :is(td,th) { background:#21142d !important; color:#f2eaf6 !important; border-color:#725881; }
.BoxContent :is(.portal-table,.portal-data-table) th { background:#3b2450 !important; color:#ffe7a0 !important; }
.BoxContent :is(.portal-table,.portal-data-table) tr:nth-child(even) td { background:#2a1b37 !important; }
.BoxContent .portal-tag { background:#382344; color:#f2eaf6; border-color:#967447; }
.BoxContent :is(input,select,textarea) { color:#f2eaf6; background-color:#1a1124; border-color:#9675a9; }
.BoxContent .portal-button { color:#241335; }
.BoxContent .portal-button--ghost { color:#f2eaf6; }
.BoxContent .portal-vocation-showcase .portal-button { color:#f2eaf6 !important; background:#382344; border-color:var(--vocation-accent-2,#ffdc79); }
.BoxContent .portal-vocation-showcase .portal-button:hover { color:#fff !important; background:#593474; }
.BoxContent :is(a,button,input,select,summary):focus-visible { outline:3px solid #ffe082; outline-offset:3px; }
.BoxContent .is-online { color:#81ebbe !important; }
.BoxContent .is-offline { color:#cebed8 !important; }
.BoxContent .is-error { color:#ffacb8 !important; }
.BoxContent .alch-creatures { color:#f2eaf6; }
.BoxContent .alch-creatures :is(.card,.badge,td,th) { background:#21142d; color:#f2eaf6; }
.BoxContent .alch-creatures th { background:#3b2450; color:#ffe7a0; }
.page-commands .BoxContent table :is(td,th),.page-ots-info .BoxContent table :is(td,th) { color:#f2eaf6 !important; background:#21142d !important; border-color:#715882; }
.page-commands .BoxContent table th,.page-ots-info .BoxContent table th { background:#3b2450 !important; color:#ffe7a0 !important; }
.BoxContent .portal-cycle-grid .portal-card :is(strong,span,small,p) { color:#e6ddec; }
.BoxContent .portal-cycle-grid .portal-card h3 { color:#ffdc79; }
.alchemia-world-box__body { font-size:13px; line-height:1.5; }
.alchemia-world-box__body small { font-size:12px; color:#ded1e9; }
.world-bonus { display:grid; grid-template-columns:28px minmax(0,1fr); gap:8px; align-items:center; margin:10px 0; padding-top:8px; border-top:1px solid #674577; text-align:left; }
.world-bonus img { width:28px; height:28px; object-fit:contain; }
.world-bonus-icon { display:block; width:28px; height:28px; background-image:url('/portal/assets/ui/world-influence-icons.png'); background-size:168px 112px; border-radius:5px; }
.world-bonus strong { display:block; font-size:12px; color:#ffdc79; }
.world-bonus span { color:#f2eaf6; }
.alchemia-world-box summary { color:#e0b7fa; cursor:pointer; }
.portal-calendar-nav { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:22px 0; }
.portal-calendar-grid,.portal-calendar-weekdays { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:7px; }
.portal-calendar-weekdays { text-align:center; color:#ffdc79; margin-bottom:8px; }
.portal-calendar-day__weekday { display:none; }
.portal-calendar-day.is-empty { visibility:hidden; }
.portal-calendar-day { background:#21142d; color:#f2eaf6; border:1px solid #755987; padding:9px; min-width:0; }
.portal-calendar-day.is-today { border:2px solid #ffdc79; }
.portal-calendar-day__influence { display:flex; flex-wrap:wrap; align-items:center; gap:5px; font-size:12px; overflow-wrap:anywhere; }
.portal-calendar-day__influence img { width:26px; height:26px; object-fit:contain; }
.portal-calendar-day__number { color:#ffdc79; }
.portal-calendar-event { color:#ffedb6 !important; }
.portal-system-directory { margin-top:22px; }
.portal-system-directory summary { cursor:pointer; color:#e0b7fa; padding:12px 0; }
.portal-social-status { display:inline-block; padding:8px 12px; color:#e0cede; border:1px dashed #896798; border-radius:6px; }
@media(max-width:900px) {
 .alchemia-topbar { flex-wrap:wrap; gap:10px; }
 .alchemia-topbar__brand { flex:1 0 100%; max-width:none; height:auto; }
 .alchemia-topbar__tools { flex:1; flex-direction:row; justify-content:space-between; }
 .alchemia-topbar__motto { display:none; }
 .portal-calendar-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .portal-calendar-weekdays,.portal-calendar-day.is-empty { display:none; }
 .portal-calendar-day__weekday { display:inline; }
}
.alchemia-sidebar-close { display:none; }
@media(max-width:760px) {
 .alchemia-topbar__toggle { display:block; }
 .alchemia-sidebar-close { display:block; position:absolute; top:10px; right:12px; padding:8px 12px; background:#382344; color:#f2eaf6; border:1px solid #9675a9; border-radius:6px; cursor:pointer; z-index:1; }
}
.BoxContent .portal-vocation-showcase { overflow: visible; }
/* Body must not become a non-scrolling ancestor of the sticky spell panel. */
body.page-compendium { overflow-x: clip; overflow-y: visible; }
.page-compendium .Content .Box.alchemia-content-shell { overflow: clip; }
