﻿/* rnl-build:1.8.103 */
/*
 * Roll and Lore Screen - "Bestiary" skin.
 * Loaded last (after DMSstyle.css, the inline tracker rules and DMSmode.css).
 * It keeps the obsidian and amber palette and adds what a hunter's journal has:
 * old print type, inked frames, grain, candle light and aged pages.
 * Removing the <link> to this file returns the plain obsidian look.
 *
 * Fonts are served from this site (assets/fonts, SIL Open Font License).
 * IM Fell has old-style figures (1 reads as I, 0 as o), so digits are left out of
 * its unicode-range and fall through to the next face in each stack.
 */
@font-face{font-family:"IM Fell English";src:url("assets/fonts/im-fell-english-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap;unicode-range:U+0000-002F,U+003A-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"IM Fell English";src:url("assets/fonts/im-fell-english-400-italic.woff2") format("woff2");font-weight:400;font-style:italic;font-display:swap;unicode-range:U+0000-002F,U+003A-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"IM Fell English SC";src:url("assets/fonts/im-fell-english-sc-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap;unicode-range:U+0000-002F,U+003A-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Cinzel";src:url("assets/fonts/cinzel-600.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"Cinzel";src:url("assets/fonts/cinzel-700.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}

:root{
    --rail-width:88px;
    --bone:#f0eee7;
    --bone-muted:#b9c3bb;
    --brass:#bda267;
    --brass-line:rgba(196,165,116,.42);
    --brass-faint:rgba(196,165,116,.22);
    --rubric:#8A2A20;
    --sepia:#7a4e2a;
    --vellum:#E7D8B1;
    --font-title:"IM Fell English SC","Cinzel",Georgia,"Times New Roman",serif;
    --font-data:Georgia,"Times New Roman",serif;
    --font-old:"IM Fell English",Georgia,"Times New Roman",serif;
    --font-caps:"Cinzel",Georgia,"Times New Roman",serif;

    /* Fine grain for dark surfaces. */
    --grain:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .84 0 0 0 .075 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
    /* Paper fibre and old stains for the aged pages. */
    --fibre:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .04 0 0 0 0 .10 0 0 0 0 .20 0 0 0 .35 0'/></filter><rect width='300' height='300' filter='url(%23n)'/></svg>");
    --stain:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='640' height='640'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.006' numOctaves='3' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .02 0 0 0 0 .07 0 0 0 0 .16 0 0 0 .5 0'/></filter><rect width='640' height='640' filter='url(%23n)'/></svg>");

    /* Inked frame with scooped corners: brass on dark, lit on hover, sepia on pages. */
    --frame:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90' fill='none' stroke='%23C2924A'><g id='c'><path d='M30 2.5H14A11.5 11.5 0 0 1 2.5 14V30' stroke-opacity='.75'/><path d='M30 7.5H18.2A16.5 16.5 0 0 1 7.5 18.2V30' stroke-opacity='.38'/><path d='M5.2 2.2l3 3-3 3-3-3z' fill='%23C2924A' fill-opacity='.85' stroke='none'/></g><use href='%23c' transform='matrix(-1 0 0 1 90 0)'/><use href='%23c' transform='matrix(1 0 0 -1 0 90)'/><use href='%23c' transform='matrix(-1 0 0 -1 90 90)'/><path d='M30 2.5H60M30 87.5H60M2.5 30V60M87.5 30V60' stroke-opacity='.75'/><path d='M30 7.5H60M30 82.5H60M7.5 30V60M82.5 30V60' stroke-opacity='.38'/></svg>");
    --frame-lit:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90' fill='none' stroke='%23E9B865'><g id='c'><path d='M30 2.5H14A11.5 11.5 0 0 1 2.5 14V30'/><path d='M30 7.5H18.2A16.5 16.5 0 0 1 7.5 18.2V30' stroke-opacity='.6'/><path d='M5.2 2.2l3 3-3 3-3-3z' fill='%23E9B865' stroke='none'/></g><use href='%23c' transform='matrix(-1 0 0 1 90 0)'/><use href='%23c' transform='matrix(1 0 0 -1 0 90)'/><use href='%23c' transform='matrix(-1 0 0 -1 90 90)'/><path d='M30 2.5H60M30 87.5H60M2.5 30V60M87.5 30V60'/><path d='M30 7.5H60M30 82.5H60M7.5 30V60M82.5 30V60' stroke-opacity='.6'/></svg>");
    --frame-ink:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90' fill='none' stroke='%234A2F17'><g id='c'><path d='M30 2.5H14A11.5 11.5 0 0 1 2.5 14V30' stroke-opacity='.8'/><path d='M30 7.5H18.2A16.5 16.5 0 0 1 7.5 18.2V30' stroke-opacity='.45'/><path d='M5.2 2.2l3 3-3 3-3-3z' fill='%238A2A20' stroke='none'/></g><use href='%23c' transform='matrix(-1 0 0 1 90 0)'/><use href='%23c' transform='matrix(1 0 0 -1 0 90)'/><use href='%23c' transform='matrix(-1 0 0 -1 90 90)'/><path d='M30 2.5H60M30 87.5H60M2.5 30V60M87.5 30V60' stroke-opacity='.8'/><path d='M30 7.5H60M30 82.5H60M7.5 30V60M82.5 30V60' stroke-opacity='.45'/></svg>");

    /* Short rule with three lozenges, used under titles and on the header edge. */
    --rule:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='11' viewBox='0 0 180 11' fill='none' stroke='%23C2924A'><path d='M0 5.5H74M106 5.5H180' stroke-opacity='.7'/><path d='M90 1l4.5 4.5L90 10l-4.5-4.5z' fill='%23D99B38' stroke='none'/><path d='M78 5.5l3-3 3 3-3 3zM96 5.5l3-3 3 3-3 3z' fill='%230B0C10'/></svg>");
    --rule-ink:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='11' viewBox='0 0 180 11' fill='none' stroke='%234A2F17'><path d='M0 5.5H74M106 5.5H180' stroke-opacity='.7'/><path d='M90 1l4.5 4.5L90 10l-4.5-4.5z' fill='%238A2A20' stroke='none'/><path d='M78 5.5l3-3 3 3-3 3zM96 5.5l3-3 3 3-3 3z' fill='%23E3D2A6'/></svg>");

    /* Pen sketches, used as masks: the colour comes from the element. */
    --sketch-note:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M18 10h20l8 8v36H18V10Z'/><path d='M38 10v8h8'/><path d='M24 28h16M24 36h16M24 44h10'/></svg>");
    --sketch-npc:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><circle cx='32' cy='22' r='9'/><path d='M16 52c2-11 8-17 16-17s14 6 16 17'/><path d='M14 28c2-12 8-18 18-18s16 6 18 18'/><path d='M22 30l-6 10m26-10 6 10'/></svg>");
    --sketch-monster:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M20 18 12 6c7 2 12 6 15 12M44 18l8-12c-7 2-12 6-15 12'/><path d='M16 26c0-8 7-14 16-14s16 6 16 14c0 11-6 20-16 24-10-4-16-13-16-24Z'/><path d='M24 28h4M36 28h4M26 40c2 3 5 4 6 4s4-1 6-4'/><path d='M28 34h8'/></svg>");
    --sketch-initiative:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M18 10 34 34l-6 16-4-12-12-4 16-6Z'/><path d='M46 10 30 34l6 16 4-12 12-4-16-6Z'/><circle cx='32' cy='34' r='4'/></svg>");
    --sketch-map:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='m10 14 14-6 16 6 14-6v40l-14 6-16-6-14 6V14Z'/><path d='M24 8v40m16-34v40'/><path d='M16 36c7-9 12 2 20-7 4-5 7-5 12-2'/><circle cx='16' cy='36' r='2'/></svg>");
    --sketch-loot:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M12 26h40v26H12V26Zm4-12h32l4 12H12l4-12Z'/><path d='M10 30h44M28 26h8v14h-8z'/><circle cx='32' cy='35' r='1.6'/></svg>");
    --sketch-character:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M32 6 50 14v12c0 14-8 24-18 30-10-6-18-16-18-30V14L32 6Z'/><circle cx='32' cy='24' r='7'/><path d='M22 42c2-7 6-11 10-11s8 4 10 11'/></svg>");
    --sketch-book:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M32 17c-6-5-14-6-23-4v37c9-2 17-1 23 4 6-5 14-6 23-4V13c-9-2-17-1-23 4Z'/><path d='M32 17v37M16 23c4 0 8 1 11 3M16 31c4 0 8 1 11 3M16 39c4 0 8 1 11 3M48 23c-4 0-8 1-11 3M48 31c-4 0-8 1-11 3M48 39c-4 0-8 1-11 3'/></svg>");

    /* Modal surfaces: ink + brass + parchment, green only as quiet accent. */
    --modal-ink:#121916;
    --modal-ink-2:#1a221d;
    --modal-panel:#161e19;
    --modal-line:rgba(196,165,116,.38);
    --modal-bone:#f3efe6;
    --modal-bone-ink:#1c1915;
    --modal-muted:#9aa79d;
    --modal-accent-note:#c5a561;
    --modal-accent-npc:#7f9bb0;
    --modal-accent-monster:#b5523a;
    --modal-accent-initiative:#d4a04a;
    --modal-accent-character:#c0844a;
}


/* ------------------------------------------------------------- the table */
html{background:#0d1511 !important}
body{
    background:
        radial-gradient(circle at 50% -15%,rgba(75,117,86,.28),transparent 46%),
        linear-gradient(180deg,#101a15,#0d1511) !important;
    background-attachment:fixed !important;
}

/* ---------------------------------------------------------------- header */
header{
    border-bottom:1px solid rgba(189,162,103,.72) !important;
    background:linear-gradient(180deg,#17251d,#0e1712) !important;
    box-shadow:none !important;
}
header::after{
    content:"" !important;
    display:block !important;
    position:absolute;
    left:0;
    right:0;
    bottom:-6px;
    height:11px;
    background:var(--rule) center / 180px 11px no-repeat;
    pointer-events:none;
}
#logo{
    color:var(--bone) !important;
    font:400 27px/1 var(--font-title) !important;
    letter-spacing:.14em !important;
    text-shadow:0 1px 0 #18251e,0 0 22px rgba(196,165,116,.28) !important;
}
header .mainToolbar button{
    border-color:var(--brass-line) !important;
    border-radius:3px !important;
    background:linear-gradient(180deg,#18251e,#18251e) !important;
    color:var(--bone) !important;
    font:600 12px/1 var(--font-caps) !important;
    letter-spacing:.09em !important;
    text-transform:uppercase !important;
}
header .mainToolbar button:hover{border-color:var(--amber) !important;color:var(--gold-light,#e8c56a) !important}
header #globalSearchBtn{
    background:#18251e !important;
    box-shadow:inset 0 1px 6px rgba(28,27,24,.7) !important;
    color:var(--bone-muted) !important;
    font:italic 400 16px/1 var(--font-old) !important;
    letter-spacing:.01em !important;
    text-transform:none !important;
}
header #openPlayerViewBtn{background:linear-gradient(180deg,rgba(47,93,70,.16),rgba(47,93,70,.05)) !important}
#playerViewStatus{max-width:18ch;overflow:hidden;text-overflow:ellipsis;border-radius:3px !important;font:600 11px/1 var(--font-caps) !important;letter-spacing:.08em;text-transform:uppercase;cursor:pointer}
header .mainToolbar{min-width:0;flex:1 1 auto}
header .mainToolbar #playerShowInitiativeBtn,
header .mainToolbar #playerShowCastBtn{display:none !important}

/* ------------------------------------------------------------------ rail */
#rnlRail{
    border-right:1px solid rgba(189,162,103,.35);
    background:transparent;
    box-shadow:none;
}
.rnlRailFoot{border-top:1px solid var(--brass-faint)}
#rnlRail button{
    border-radius:2px !important;
    color:#b9c3bb !important;
    font:600 10px/1.25 var(--font-caps) !important;
    letter-spacing:.06em !important;
}
#rnlRail button svg{stroke-width:1.5}
#rnlRail button:hover{background:rgba(28,27,24,.06) !important;color:var(--bone) !important}
#rnlRail button.isActive{
    border-color:transparent !important;
    background:linear-gradient(90deg,rgba(47,93,70,.22),rgba(47,93,70,0) 85%) !important;
    box-shadow:inset 2px 0 0 var(--amber) !important;
    color:var(--amber) !important;
}
#rnlFlyout{
    border:1px solid var(--brass-line);
    border-radius:3px;
    background:#18251e;
    box-shadow:0 22px 50px rgba(28,27,24,.7),inset 0 0 0 3px #18251e,inset 0 0 0 4px var(--brass-faint);
    padding:12px 10px;
}
#rnlFlyout strong{color:var(--brass);font:700 11px var(--font-caps);letter-spacing:.16em}
#rnlFlyout button{border-radius:2px !important;font:400 18px/1.1 var(--font-old) !important}

/* --------------------------------------------------------- campaign board */
.campaignBanner{
    position:relative;
    border:1px solid rgba(189,162,103,.72) !important;
    border-radius:2px !important;
    background:linear-gradient(180deg,rgba(18,46,33,.96),rgba(8,22,16,.98)) !important;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.04),0 10px 24px rgba(0,0,0,.3) !important;
    padding:16px 26px !important;
}
.campaignBanner::after,
#homeGrid .panel::after{
    content:"" !important;
    display:block !important;
    position:absolute;
    inset:5px !important;
    z-index:2 !important;
    width:auto !important;
    height:auto !important;
    box-sizing:border-box !important;
    border:30px solid transparent !important;
    border-radius:0 !important;
    border-image:var(--frame) 30 / 30px / 0 stretch !important;
    background:none !important;
    box-shadow:none !important;
    opacity:1 !important;
    transform:none !important;
    pointer-events:none;
}
.campaignBannerEyebrow{color:var(--brass) !important;font:700 11px/1 var(--font-caps) !important;letter-spacing:.2em !important}
.campaignBanner h2{color:var(--bone) !important;font:400 32px/1.1 var(--font-title) !important;letter-spacing:.03em}
.campaignBannerIcon{
    display:inline-block;
    width:30px;
    height:30px;
    margin-right:12px;
    overflow:hidden;
    background:var(--amber);
    color:transparent !important;
    font-size:0 !important;
    -webkit-mask:var(--sketch-book) center / contain no-repeat;
    mask:var(--sketch-book) center / contain no-repeat;
}
.campaignBannerMeta{color:var(--bone-muted) !important;font:italic 400 15px/1.2 var(--font-old) !important}
.campaignBannerStatus{
    border:1px solid var(--brass-line) !important;
    border-radius:2px !important;
    background:transparent !important;
    color:var(--brass) !important;
    font:700 10px/1 var(--font-caps) !important;
    letter-spacing:.12em;
    text-transform:uppercase;
    font-style:normal !important;
}
.campaignBannerHub{
    border-radius:2px !important;
    background:#1f6b3a !important;
    color:#f4fff6 !important;
    box-shadow:inset 0 0 0 1px rgba(232,197,106,.45),0 2px 0 #14361f !important;
    font:700 13px/1 var(--font-caps) !important;
    letter-spacing:.1em !important;
    text-transform:uppercase !important;
    padding:13px 22px !important;
    margin-right:14px;
}

#homeGrid .panel{
    border:1px solid rgba(189,162,103,.72) !important;
    border-radius:2px !important;
    background:linear-gradient(180deg,rgba(18,46,33,.96),rgba(8,22,16,.98)) !important;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.04),0 10px 24px rgba(0,0,0,.3) !important;
    transition:transform .18s ease,box-shadow .18s ease;
}
#homeGrid .panel:hover,
#homeGrid .panel:focus-within{
    border-color:#4f7d5c !important;
    box-shadow:0 22px 46px rgba(28,27,24,.6),0 0 34px rgba(196,165,116,.1) !important;
}
#homeGrid .panel:hover::after,
#homeGrid .panel:focus-within::after{border-image-source:var(--frame-lit)}

/* A large pen sketch of what the panel is, drawn faintly into its corner. */
#homeGrid .panel::before{
    content:"" !important;
    display:block !important;
    position:absolute;
    inset:auto 22px 16px auto !important;
    z-index:0 !important;
    width:min(42%,200px) !important;
    height:auto !important;
    aspect-ratio:1;
    box-sizing:border-box !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    opacity:1 !important;
    transform:none !important;
    background:rgba(196,165,116,.085) !important;
    -webkit-mask:var(--sketch-character) center / contain no-repeat;
    mask:var(--sketch-character) center / contain no-repeat;
    pointer-events:none;
    transition:background .18s ease;
}
#homeGrid .panel:hover::before{background:rgba(196,165,116,.16) !important}
#homeGrid .panel[data-kind="empty"]::before{-webkit-mask-image:var(--sketch-note);mask-image:var(--sketch-note)}
#homeGrid .panel[data-kind="npc"]::before{-webkit-mask-image:var(--sketch-npc);mask-image:var(--sketch-npc)}
#homeGrid .panel[data-kind="monster"]::before{-webkit-mask-image:var(--sketch-monster);mask-image:var(--sketch-monster)}
#homeGrid .panel[data-kind="initiative"]::before{-webkit-mask-image:var(--sketch-initiative);mask-image:var(--sketch-initiative)}
#homeGrid .panel[data-kind="map"]::before{-webkit-mask-image:var(--sketch-map);mask-image:var(--sketch-map)}
#homeGrid .panel[data-kind="loot"]::before{-webkit-mask-image:var(--sketch-loot);mask-image:var(--sketch-loot)}

/* The inked frame sits inside the card, so the writing stays clear of it,
   and nothing paints past the card edge. */
#homeGrid .panel{overflow:hidden !important}
#homeGrid .panelOpenLink{
    overflow:hidden !important;
    box-sizing:border-box !important;
    min-width:0 !important;
    max-width:100% !important;
    padding:40px 42px 36px !important;
}
#homeGrid .panelText{min-width:0 !important;max-width:100% !important;overflow:hidden !important}
#homeGrid .panelTitle{
    max-width:100% !important;
    overflow:hidden !important;
    display:-webkit-box !important;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow-wrap:anywhere;
}
#homeGrid .panelTitle::after{max-width:min(180px,100%)}
#homeGrid .panelPreview{
    max-width:100% !important;
    overflow:hidden !important;
    display:-webkit-box !important;
    -webkit-line-clamp:3 !important;
    -webkit-box-orient:vertical !important;
    overflow-wrap:anywhere;
}
#homeGrid .characterHomePanelStats{flex-wrap:wrap !important;max-width:100% !important}
#homeGrid .characterHomePanelStats span{min-width:0 !important;flex:0 1 auto}
#homeGrid .characterHomePanelMeta,
#homeGrid .characterCreatorHomePanelMeta{
    max-width:100%;
    overflow:visible;
    line-height:1.35;
}
/* Keep creator subtitle clear of the inked frame (≈35px inset). */
#homeGrid .characterCreatorHomePanel .panelOpenLink{
    padding:36px 42px 56px !important;
}
#homeGrid .characterCreatorHomePanel .panelText{
    overflow:visible !important;
    gap:6px;
}
#homeGrid .characterCreatorHomePanelMeta{
    margin-top:2px !important;
    padding-bottom:2px;
    color:var(--brass,#c5a561) !important;
    font:italic 400 14px/1.35 var(--font-old,Georgia,serif) !important;
    letter-spacing:.02em;
    white-space:normal;
}

#homeGrid .panelVisual{
    border:1px solid var(--brass) !important;
    background:radial-gradient(circle at 50% 35%,#18251e,#18251e) !important;
    box-shadow:0 0 0 3px #18251e,0 0 0 4px var(--brass-faint),0 6px 14px rgba(28,27,24,.5) !important;
}
#homeGrid .dmsNoteIcon{
    display:block;
    width:30px;
    height:30px;
    overflow:hidden;
    background:var(--amber);
    color:transparent !important;
    font-size:0 !important;
    -webkit-mask:var(--sketch-note) center / contain no-repeat;
    mask:var(--sketch-note) center / contain no-repeat;
}
#homeGrid .panelTitle{
    color:var(--bone) !important;
    font:400 27px/1.12 var(--font-title) !important;
    letter-spacing:.03em !important;
}
#homeGrid .panelTitle::after{
    content:"";
    display:block;
    width:180px;
    max-width:100%;
    height:11px;
    margin-top:10px;
    background:var(--rule) left center / 180px 11px no-repeat;
    opacity:.8;
}
#homeGrid .panelPreview{color:var(--bone-muted) !important;font:italic 400 15px/1.4 var(--font-old) !important}
#homeGrid .homeAddPanelTile{
    border:1px dashed var(--brass-line) !important;
    border-radius:3px !important;
    background:rgba(24,37,30,.35) !important;
    color:var(--bone-muted) !important;
}
#homeGrid .homeAddPanelTile strong{font:400 26px/1.1 var(--font-title) !important;letter-spacing:.04em}
#homeGrid .homeAddPanelTile small{font:italic 400 15px/1.3 var(--font-old) !important}

/* ---------------------------------------------------------------- windows */
body > [id$="Window"] > [class$="Box"],
body > [id$="Window"] > [class$="Book"]{border-radius:3px !important}
body > [id$="Window"] > :is([class$="Box"],[class$="Book"]):not(.interactiveCharacterSheetBox,.quickDiceBox,.templateBox,.partyPdfReviewBox,.characterFeatureInfoBox,.lootGeneratorBox,.globalSearchBox,.rnlLobbyBox){
    position:relative;
    border-color:#4f7d5c !important;
    box-shadow:0 34px 90px rgba(28,27,24,.75),0 0 0 1px rgba(196,165,116,.25) !important;
}
body > [id$="Window"] > :is([class$="Box"],[class$="Book"]):not(.interactiveCharacterSheetBox,.quickDiceBox,.templateBox,.partyPdfReviewBox,.characterFeatureInfoBox,.lootGeneratorBox,.globalSearchBox,.rnlLobbyBox)::after{
    content:"";
    position:absolute;
    inset:4px;
    z-index:9999;
    border:22px solid transparent;
    border-image:var(--frame) 30 / 22px / 0 stretch;
    pointer-events:none;
}
body > [id$="Window"] > * > [class*="Header"]{
    border-bottom:1px solid var(--brass-line) !important;
    background:#18251e !important;
}
body > [id$="Window"] > * > [class*="Header"] h2{
    color:#e8c56a !important;
    font:400 30px/1.1 var(--font-title) !important;
    letter-spacing:.04em !important;
    text-shadow:0 1px 0 #18251e !important;
}
body > [id$="Window"] > * > [class*="Header"] p{color:var(--bone-muted) !important;font:italic 400 16px/1.3 var(--font-old) !important}

/* Headings everywhere in the workspace use the old print face. */
body > :not(#welcomeLanding) :is(h1,h2,h3),
body > :not(#welcomeLanding):is(h1,h2,h3){
    font-family:var(--font-title) !important;
    font-weight:400 !important;
    letter-spacing:.03em;
}

/* ------------------------------------------------------------- initiative */
#documentTitle{font:400 28px/1.1 var(--font-title) !important;letter-spacing:.04em !important}
#initiativeTracker .combatantCard{border-radius:2px !important;background:#FCFAF5 !important}
#initiativeTracker .combatantCard.activeTurn{
    background:#EFEAE0 !important;
    box-shadow:inset 4px 0 0 #2F5D46 !important;
}
#initiativeTracker .combatantNowLabel{font:700 11px/1 var(--font-caps) !important;letter-spacing:.16em;text-transform:uppercase}
#initiativeTracker .combatantSummaryRow .combatantPortraitWrap,
#initiativeTracker .combatantSummaryRow .combatantPortrait{width:40px;height:40px;flex:0 0 40px}
#initiativeTracker .combatantCard.isOpen .combatantDetails{
    display:flex !important;
    flex-flow:row wrap;
    align-items:center;
    gap:6px 8px;
    padding-top:2px;
}
#initiativeTracker .combatantDetails .combatantNameCell,
#initiativeTracker .combatantDetails .combatantNameDetails{display:flex;flex-flow:row wrap;align-items:center;gap:6px;width:auto;min-width:0}
#initiativeTracker .combatantDetails .combatantCardStats{display:flex !important;grid-template-columns:none !important;width:auto !important;gap:6px}
#initiativeTracker .combatantDetails .combatantCardStats label{flex-direction:row;align-items:center;width:auto;gap:4px}
#initiativeTracker .combatantDetails .acField{width:52px !important}
#initiativeTracker .combatantDetails .rollModeField{grid-column:auto !important;width:88px !important}
#initiativeTracker .combatantDetails .hpControl{width:auto !important;min-width:0 !important;justify-content:flex-start !important}
#initiativeTracker .combatantDetails .tempHpControl{margin:0}
#initiativeTracker .combatantDetails .combatantActionRail{width:auto;flex-wrap:wrap}
#initiativeTracker .combatantDetails .combatIconBtn{width:28px;height:28px;min-width:28px}
#initiativeTracker .combatantDetails .conditionControl{flex-direction:row;width:auto;gap:0}
#initiativeTracker .combatantDetails .conditionSelect{width:168px}
#initiativeTracker .combatantDetails .notesField{flex:1 1 220px;width:auto !important;min-height:0 !important;height:30px;padding:4px 8px !important;resize:vertical}
#initiativeTracker .combatantDetails .deathSaves{flex:1 1 100%;display:flex;align-items:center;gap:8px}
#initiativeTracker .combatantDetails .deathSaves.hidden{display:none !important}
#initiativeTracker #nextTurnBtn{
    border-radius:2px !important;
    background:#2F5D46 !important;
    color:#fff !important;
    box-shadow:none !important;
    font:700 12px/1.1 system-ui,-apple-system,"Segoe UI",sans-serif !important;
    letter-spacing:.03em !important;
    text-transform:none !important;
}

/* ------------------------------------------------------------ aged pages */
/* The writing surface is a journal page; a sheet is a page laid on the table. */
#editorLeft{background:transparent !important}
#editor{
    background:#0e1712 !important;
    box-shadow:none !important;
    outline:1px solid rgba(189,162,103,.28);
    outline-offset:-13px;
    color:#f0eee7;
}
#editor:has(> .monsterSheet),
#editor:has(> .npcSheet){
    background:#141c18 !important;
    box-shadow:none !important;
    outline:0 !important;
    color:#f3efe6 !important;
}

/* ----------------------------------------------------------- Player mode */
.rnlPlayerHomeBox h1{color:var(--bone);font:400 40px/1.1 var(--font-title);letter-spacing:.03em}
.rnlPlayerHomeBox h1::after{
    content:"";
    display:block;
    width:180px;
    height:11px;
    margin-top:14px;
    background:var(--rule) left center / 180px 11px no-repeat;
}
.rnlPlayerHomeBox p{color:var(--bone-muted);font:italic 400 19px/1.45 var(--font-old)}
.rnlCharacterList .rnlCharacterOpen{border-radius:3px !important;border-color:var(--brass-line) !important;background:#18251e !important}
.rnlCharacterDelete{border-radius:3px !important;font:700 12px/1 var(--font-caps) !important;letter-spacing:.08em;text-transform:uppercase}
.rnlCharacterList strong{font:400 24px var(--font-title);letter-spacing:.03em}
.rnlCharacterList span{font:italic 400 16px var(--font-old)}
.rnlPlayerActions button{border-radius:2px !important;font:700 12px/1 var(--font-caps) !important;letter-spacing:.1em;text-transform:uppercase;padding:14px 20px !important}
.rnlPlayerActions button:first-child{background:#1f6b3a !important;color:#f4fff6 !important;box-shadow:none}

#homeGrid .panelOpenLink{position:relative !important}
#homeGrid .panelKind{
    display:block !important;
    position:absolute !important;
    top:12px !important;
    left:18px !important;
    right:18px !important;
    margin:0 !important;
    opacity:0;
    pointer-events:none;
    z-index:4;
}
#homeGrid .panel:hover .panelKind,
#homeGrid .panel:focus-within .panelKind{display:block !important;opacity:1}

.rnlCharacterCount{
    margin:0 0 8px !important;
    color:var(--brass) !important;
    font:700 13px/1 var(--font-caps) !important;
    font-style:normal !important;
    letter-spacing:.16em;
}

#characterLevelUpWindow .characterLevelUpBox{
    width:min(1080px,96vw);
    max-height:min(860px,92vh);
    background:#18251e;
    color:#f0eee7;
    border:1px solid rgba(180,85,45,.55);
}
#characterLevelUpWindow .characterLevelUpBody{overflow:auto}
.levelUpSteps{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.levelUpSteps button{
    border:1px solid #4f7d5c;
    background:#18251e;
    color:#c8c2b4;
    padding:8px 12px;
    font:700 11px/1 var(--font-caps);
    letter-spacing:.08em;
    text-transform:uppercase;
}
.levelUpSteps button[aria-current="step"]{color:#e8c56a;border-color:rgba(180,85,45,.55)}
.levelUpLayout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px;align-items:start}
#characterLevelUpWindow .characterLevelUpSection{
    display:grid !important;
    grid-template-columns:1fr !important;
    align-items:start !important;
    background:#18251e !important;
    color:#f0eee7 !important;
}
#characterLevelUpWindow .characterLevelUpSection.hidden,
#characterLevelUpWindow #characterLevelUpAsiSection.hidden,
#characterLevelUpWindow #characterLevelUpProficiencySection.hidden,
#characterLevelUpWindow #characterLevelUpClassChoicesSection.hidden,
#characterLevelUpWindow #characterLevelUpSpellChoicesSection.hidden{display:none !important}
#characterLevelUpWindow .characterLevelUpSection h3,
#characterLevelUpWindow .characterLevelUpSection p,
.levelUpMain h3,.levelUpMain p,.levelUpEdition{color:#f0eee7 !important}
#characterLevelUpWindow .characterLevelUpSummary{
    display:grid !important;
    grid-template-columns:1fr !important;
    margin:0 !important;
}
#characterLevelUpWindow .characterLevelUpSummary>div{
    min-height:0 !important;
    display:grid !important;
    grid-template-columns:1fr !important;
    justify-content:start !important;
    text-align:left !important;
    padding:0 0 8px !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
}
#characterLevelUpWindow .characterLevelUpSummary strong{
    color:#e8c56a !important;
    font:400 16px/1.35 Georgia,serif !important;
    overflow-wrap:anywhere;
}
.levelUpFeatureGrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.levelUpFeature{
    text-align:left;
    padding:14px;
    border:1px solid #4f7d5c;
    border-radius:4px;
    background:#18251e;
    color:#f0eee7;
    cursor:pointer;
}
.levelUpFeature strong{display:block;font:400 18px/1.2 var(--font-title);letter-spacing:.03em}
.levelUpFeature small{display:block;margin-top:6px;color:#b7a98a;font:italic 14px/1.35 var(--font-old)}
.levelUpFeature.isSelected{border-color:rgba(180,85,45,.55);box-shadow:inset 0 0 0 1px #c4a574}
.levelUpOptionList{display:grid;gap:2px;margin-top:8px}
.levelUpOption{display:flex;align-items:center;gap:12px;min-height:36px;padding:4px 2px}
.levelUpOption span{color:#e8c56a;font:400 20px/1.15 var(--font-title);letter-spacing:.03em}
.levelUpDot{
    width:18px;height:18px;flex:0 0 18px;padding:0;border-radius:50%;
    border:2px solid #d7c7a2;background:transparent;cursor:pointer;
}
.levelUpOption.isSelected .levelUpDot{background:#c4342a;border-color:#c4342a}
.levelUpTip{
    position:fixed;z-index:2147483646;display:none;max-width:260px;
    padding:8px 10px;border:1px solid rgba(180,85,45,.55);background:#2a2118;color:#e8c56a;
    font:italic 15px/1.35 var(--font-old);pointer-events:none;
}
.levelUpTip.isOn{display:block}
.characterEquipmentResults{display:grid;gap:6px;max-height:220px;overflow:auto;margin-top:8px}
.characterEquipmentResults button{
    display:flex;justify-content:space-between;gap:12px;text-align:left;
    padding:8px 10px;border:1px solid #4f7d5c;background:#18251e;color:#eceae4;cursor:pointer;
}
.characterEquipmentResults button small{color:#b7a98a}
.characterEquipmentResults p{margin:0;color:#b7a98a}
#homeGrid .characterHomePanel .panelOpenLink{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:16px !important;
}
#homeGrid .characterHomePanel .panelVisual{
    width:72px !important;
    height:72px !important;
    min-width:72px !important;
    flex:0 0 72px;
    display:grid !important;
    place-items:center !important;
    overflow:hidden !important;
    border-radius:50% !important;
}
#homeGrid .characterHomePanel .panelCharacterFallback{
    width:72px !important;
    height:72px !important;
    display:grid !important;
    place-items:center !important;
    border-radius:50%;
    background:radial-gradient(circle at 50% 32%,#efe4c2,#18251e 68%,#7a4e2a) !important;
}
#homeGrid .characterHomePanel .panelCharacterFallback .dmsPanelSvg{
    width:40px !important;
    height:40px !important;
    margin:0 !important;
    display:block;
}
#homeGrid .characterHomePanel .panelTitle{
    display:block !important;
    -webkit-line-clamp:unset !important;
    -webkit-box-orient:unset !important;
    white-space:nowrap !important;
    text-overflow:ellipsis;
    color:#e8c56a !important;
}
.levelUpDetail,.levelUpHint,.levelUpQuiet{color:#d9d0bf;font:italic 16px/1.4 var(--font-old)}
.levelUpChoiceValue{
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    opacity:0 !important;
    pointer-events:none !important;
}
.characterLevelUpSummary{
    position:sticky;
    top:0;
    display:grid;
    gap:10px;
    padding:14px;
    border:1px solid rgba(180,85,45,.55);
    background:#18251e;
}
.characterLevelUpSummary div{display:grid;gap:2px}
.characterLevelUpSummary span,.levelUpDeltaKicker{color:#b7a98a;font:700 11px/1 var(--font-caps);letter-spacing:.08em;text-transform:uppercase}
.characterLevelUpSummary strong{color:#e8c56a;font:400 16px/1.3 var(--font-data,Georgia,serif)}
#characterLevelUpWindow select{
    color:#e8c56a !important;
    background:#18251e !important;
    color-scheme:light;
}
#characterLevelUpWindow option{color:#e8c56a !important;background:#18251e !important}
#confirmCharacterLevelUp{
    background:linear-gradient(180deg,#18251e,#7a4e2a) !important;
    color:#e8c56a !important;
    border-color:rgba(180,85,45,.55) !important;
}
#confirmCharacterLevelUp:disabled{opacity:.45;cursor:default}
@media(max-width:860px){
    .levelUpLayout,.levelUpFeatureGrid{grid-template-columns:1fr}
}

@media(max-width:760px){
    #homeGrid .panelOpenLink{padding:20px 20px 18px !important}
    #homeGrid .panelTitle{font-size:23px !important}
    #logo{font-size:20px !important;letter-spacing:.08em !important}
}
@media(prefers-reduced-motion:reduce){
    #homeGrid .panel,#homeGrid .panel::before{transition:none}
}
.sheetProfileUpload:has(.sheetProfileImage){cursor:pointer}
.welcomeAfterDungeon{
    padding:28px clamp(24px,6vw,96px) 8px;
    text-align:center;
    background:#030605;
    border-top:1px solid rgba(197,165,97,.28);
}
.welcomeAfterDungeon .welcomeStartupChoice{margin:0 auto}
.welcomeRole{
    padding:42px clamp(24px,6vw,96px) 18px;
    background:#0e1a14;
}
.welcomeRole .welcomeSectionHeading{margin-bottom:28px}
.welcomeRoleChoice{
    width:min(920px,100%);
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
    margin:0 auto;
}
.welcomeRoleChoice button{
    padding:22px 24px;
    border:1px solid rgba(186,158,96,.4);
    background:linear-gradient(145deg,rgba(34,58,43,.92),rgba(15,28,21,.96));
    color:#ede8d9;
    text-align:left;
    cursor:pointer;
    transition:border-color .15s ease,box-shadow .15s ease,background .15s ease,transform .12s ease;
}
.welcomeRoleChoice button:hover{
    border-color:rgba(232,197,106,.7);
    background:linear-gradient(145deg,rgba(42,72,54,.96),rgba(18,34,26,.98));
}
.welcomeRoleChoice button[aria-pressed="true"]{
    border-color:#e8c56a;
    background:linear-gradient(145deg,rgba(52,88,66,.98),rgba(22,40,30,.98));
    box-shadow:inset 0 0 0 1px rgba(232,197,106,.35),0 0 0 1px rgba(232,197,106,.2);
}
.welcomeRoleChoice button:active{
    transform:translateY(1px);
}
.welcomeRoleChoice small{
    display:block;
    color:#e8c56a;
    font-size:.68rem;
    font-weight:900;
    letter-spacing:.16em;
    text-transform:uppercase;
}
.welcomeRoleChoice strong{
    display:block;
    margin:8px 0;
    color:#f0e3c3;
    font:700 1.45rem/1.2 Georgia,"Times New Roman",serif;
}
.welcomeRoleChoice span{
    display:block;
    color:#b9c3bb;
    font:400 1rem/1.5 Georgia,"Times New Roman",serif;
}
.welcomeGuides{
    position:relative;
    padding:clamp(56px,8vw,100px) clamp(24px,6vw,96px);
    background:
        linear-gradient(180deg,rgba(5,12,8,.35),rgba(5,12,8,.15)),
        #0a120e;
}
.welcomeGuides::before{
    content:"";
    position:absolute;
    top:0;
    left:50%;
    width:min(900px,80%);
    height:1px;
    transform:translateX(-50%);
    background:linear-gradient(90deg,transparent,#c5a561,transparent);
    opacity:.55;
}
.welcomeGuideGrid{
    width:min(1100px,100%);
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
    margin:0 auto;
}
.welcomeGuideGrid a{
    display:block;
    padding:18px 20px;
    border:1px solid rgba(186,158,96,.34);
    background:linear-gradient(145deg,rgba(22,40,30,.96),rgba(8,16,12,.96));
    color:#ede8d9;
    text-decoration:none;
}
.welcomeGuideGrid a[hidden]{display:none}
.welcomeGuideGrid em{
    display:block;
    margin-bottom:6px;
    color:#e8c56a;
    font:700 .68rem/1 "Segoe UI",Tahoma,sans-serif;
    font-style:normal;
    letter-spacing:.14em;
    text-transform:uppercase;
}
.welcomeGuideGrid strong{
    display:block;
    margin-bottom:6px;
    color:#f0e3c3;
    font:700 1.15rem/1.3 Georgia,"Times New Roman",serif;
}
.welcomeGuideGrid span{
    display:block;
    color:#b9c3bb;
    font:400 .95rem/1.5 Georgia,"Times New Roman",serif;
}
.welcomeGuideGrid a:hover{border-color:rgba(180,85,45,.55)}
.welcomeGuideReader{width:min(860px,100%);margin:28px auto 0;color:#e8c56a}
.welcomeGuideReader[hidden]{display:none}
.welcomeGuideReader [data-welcome-guide-back]{
    margin-bottom:18px;
    padding:8px 14px;
    border:1px solid rgba(79,125,92,.85);
    background:#18251e;
    color:#e8c56a;
    cursor:pointer;
}
.welcomeGuideArticle h2,.welcomeGuideArticle h3{margin:1.2em 0 .4em;color:#e8c56a;font-family:Georgia,"Times New Roman",serif}
.welcomeGuideArticle p,.welcomeGuideArticle li{color:#d9d3c4;font:400 1.02rem/1.6 Georgia,"Times New Roman",serif}
.welcomeGuideArticle a{color:#e8c56a}
.welcomeGuideArticle table{width:100%;margin:12px 0 18px;border-collapse:collapse}
.welcomeGuideArticle th,.welcomeGuideArticle td{padding:8px 10px;border:1px solid rgba(79,125,92,.85);text-align:left;vertical-align:top}
@media(max-width:760px){
    .welcomeRoleChoice,.welcomeGuideGrid{grid-template-columns:1fr}
}
.viewSheetPortraitBtn{
    min-height:31px;
    padding:5px 10px;
    border:1px solid #4f7d5c;
    border-radius:4px;
    background:linear-gradient(180deg,#294535,#294535);
    color:#e8c56a;
    font-size:10px;
    font-weight:900;
    letter-spacing:.3px;
    text-transform:uppercase;
    cursor:pointer;
}

#interactiveCharacterSheetWindow,
#characterSheetItemBrowserWindow{
    background:rgba(8,16,12,.72) !important;
    backdrop-filter:none !important;
}
#characterCreatorWindow > .characterCreatorBox::after,
#interactiveCharacterSheetWindow .interactiveCharacterSheetBox::after{content:none !important}
.characterCreatorBox,
.interactiveCharacterSheetBox{
    background:#f6f3ec !important;
    color:#1c1915 !important;
    box-shadow:none !important;
}
.characterCreatorBox{overflow:auto !important}
.characterCreatorBody{
    display:grid !important;
    grid-template-columns:240px minmax(0,1fr) !important;
    align-items:start !important;
}
.characterCreatorSummary,
.characterCreatorSteps{background:#f6f3ec !important;color:#1c1915 !important}
.characterCreatorSteps{max-height:none !important;overflow:visible !important}
.characterCreatorSummary strong,
.characterCreatorSummary span,
.characterStepHeading h3{color:#1c1915 !important}
.characterCreatorProgress button{background:#efe6d4 !important;color:#1c1915 !important}
.characterCreatorProgress button.active,
.characterCreatorProgress button.active span{background:#1f2421 !important;color:#f6f3ec !important}
.characterFormGrid{grid-template-columns:repeat(auto-fit,minmax(200px,1fr)) !important}
.characterFormGrid label{color:#3f3a34 !important}
.characterFormGrid :is(input,select),
.characterCreatorBox :is(input,select,textarea){
    background:#fff !important;
    color:#1c1915 !important;
    border:1px solid #d3cdc2 !important;
    box-shadow:none !important;
}
.characterOriginReferences{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    align-items:start !important;
}
.characterOriginReferenceCard{
    min-height:0 !important;
    background:#fff !important;
    color:#1c1915 !important;
    border:1px solid #d9d1c3 !important;
    box-shadow:none !important;
    overflow:visible !important;
}
.characterOriginReferenceCard :is(h4,p,li,small,span,strong){color:#1c1915 !important}
.interactiveCharacterSheetBox :is(
    .characterSheetAbilityCard,
    .characterSheetHpCard,
    .characterSheetDeathSaves,
    .characterSheetRollHistory,
    .characterSheetSection,
    .characterSheetPanel,
    .characterSheetActionCard,
    .characterSheetEmptyState,
    .characterSheetItemEmpty,
    .characterSheetStatistics,
    .characterSheetMain,
    .characterSheetVitalsBand
){
    background:#fff !important;
    color:#1c1915 !important;
    box-shadow:none !important;
    text-shadow:none !important;
}
.interactiveCharacterSheetBox{
    background:#f3f0e8 !important;
}
.characterSheetHeader{
    background:#1f2421 !important;
    color:#f6f3ec !important;
    box-shadow:none !important;
}
.characterSheetHeader :is(h1,h2,strong,span){color:#f6f3ec !important;text-shadow:none !important}
.characterSheetAbilityCard span,
.characterSheetAbilityCard strong,
.characterSheetAbilityCard small,
.characterSheetHpCard,
.characterSheetHpCard span,
.characterSheetActionCard h3,
.characterSheetActionCard p,
.characterSheetActionCard span,
.characterSheetEmptyState,
.characterSheetEmptyState p,
.characterSheetItemEmpty,
.characterSheetItemEmpty p{
    color:#1c1915 !important;
    text-shadow:none !important;
}
.characterSheetAbilityCard,
.characterSheetActionCard,
.characterSheetActionCard.criticalReady{
    border:1px solid #d9d1c3 !important;
    background:#fff !important;
}
.interactiveCharacterSheetBox :is(input,select,textarea){
    background:#fff !important;
    color:#1c1915 !important;
    border:1px solid #d3cdc2 !important;
    box-shadow:none !important;
}
@media(max-width:900px){
    .characterCreatorBody,
    .characterOriginReferences{grid-template-columns:1fr !important}
}
.characterSheetCombatSummary{
    background:#fff !important;
    border-bottom:1px solid #d9d1c3 !important;
}
.characterSheetCombatSummary>div,
.characterSheetCombatSummary>button,
.characterSheetCombatSummary>button:hover{
    background:#fff !important;
    color:#1c1915 !important;
    box-shadow:none !important;
}
.characterSheetCombatSummary :is(strong,span,small){color:#1c1915 !important;text-shadow:none !important}
.characterSheetAbilityCard small{
    color:#1c1915 !important;
    background:transparent !important;
    border:0 !important;
    font-size:13px !important;
    font-weight:700 !important;
}

html{scroll-padding-top:var(--real-header-height, 76px)}
#homeGrid,
#editorView{
    margin-top:var(--real-header-height, 76px) !important;
    height:calc(100vh - var(--real-header-height, 76px)) !important;
}
body:not([data-mode="player"]) #interactiveCharacterSheetWindow{
    top:var(--real-header-height, 76px) !important;
    right:0 !important;
    bottom:0 !important;
    left:0 !important;
    z-index:90000 !important;
}
#interactiveCharacterSheetContent{
    display:flex !important;
    flex-direction:column !important;
    min-height:0 !important;
    height:100% !important;
}
.characterSheetHeader{
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:wrap !important;
    align-items:center !important;
    gap:8px 12px !important;
    min-height:0 !important;
    height:auto !important;
    padding:8px 12px !important;
    grid-template-columns:none !important;
}
.characterSheetIdentity{flex:1 1 180px; min-width:0; align-self:center}
@media (max-width: 980px){
    .interactiveCharacterSheetBox{overflow:hidden !important}
    #interactiveCharacterSheetContent{height:100% !important; min-height:0 !important}
    .characterSheetHeaderActions{flex:1 1 100%}
}
.characterSheetIdentity h1{margin:0; font-size:22px !important; line-height:1.1}
.characterSheetIdentity p{margin:2px 0 0; font-size:13px}
.characterSheetPortraitButton,
.characterSheetIdentity img,
.characterSheetPortraitFallback{
    width:48px !important;
    height:48px !important;
    flex-basis:48px !important;
}
.characterSheetHeaderActions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:6px;
}
.characterSheetHeaderActions :is(button, select){
    min-height:32px !important;
    padding:4px 10px !important;
    font-size:12px !important;
}
.characterSheetHeaderActions .characterSheetInspiration{
    display:inline-flex !important;
    grid-template-columns:none !important;
    min-height:32px !important;
    color:#1c1915 !important;
    background:#fff !important;
}
.characterSheetHeaderActions .characterSheetInspiration.active{
    color:#1c1915 !important;
    background:#efe6c8 !important;
}
.characterSheetCombatBar{
    display:grid;
    grid-template-columns:repeat(4, minmax(72px, .7fr)) minmax(220px, 1.5fr);
    gap:6px;
    align-items:stretch;
    padding:8px 12px;
    background:#fff;
    border-bottom:1px solid #d9d1c3;
}
.characterSheetCombatBar > div,
.characterSheetCombatBar > button{
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:2px;
    min-height:52px;
    margin:0;
    padding:6px 8px;
    border:1px solid #d9d1c3;
    border-radius:8px;
    background:#fff;
    color:#1c1915;
    text-align:left;
}
.characterSheetCombatBar span{
    font-size:10px;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
    color:#6d675e;
}
.characterSheetCombatBar strong{font-size:20px; line-height:1; color:#1c1915}
.characterSheetCombatBar strong small{font-size:13px; font-weight:700; color:#6d675e}
.characterSheetHpControl{min-width:0}
.characterSheetHpActions{
    display:flex;
    flex-wrap:wrap;
    gap:4px;
    margin-top:4px;
}
.characterSheetHpActions input,
#characterSheetHpAmount{
    width:64px !important;
    flex:0 0 64px !important;
    height:28px !important;
    margin:0 !important;
    padding:2px 6px !important;
    background:#fff !important;
    color:#1c1915 !important;
    border:1px solid #d3cdc2 !important;
}
.characterSheetHpActions button{
    min-height:28px;
    padding:2px 8px;
    border:1px solid #d3cdc2;
    border-radius:6px;
    background:#f6f3ec;
    color:#1c1915;
    font-size:12px;
    font-weight:700;
    cursor:pointer;
}
.characterSheetHeader,
.characterSheetCombatBar,
.characterSheetTabs{flex-shrink:0}
.characterSheetTabs{
    display:flex;
    flex-wrap:wrap;
    gap:4px;
    padding:8px 12px 0;
    background:#f3f0e8;
}
.characterSheetTabs button{
    min-height:32px;
    padding:4px 12px;
    border:1px solid transparent;
    border-bottom:0;
    border-radius:8px 8px 0 0;
    background:transparent;
    color:#3f3a34;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
}
.characterSheetTabs button.active{
    background:#fff;
    border-color:#d9d1c3;
    color:#1c1915;
}
.characterSheetTabContent{
    flex:1 1 auto;
    min-height:0;
    overflow:auto;
    padding:12px;
    background:#f3f0e8;
}
.characterSheetOverviewColumns{
    display:grid;
    grid-template-columns:minmax(200px, 260px) minmax(0, 1fr);
    gap:16px;
    margin-top:12px;
}
.characterSheetOverviewColumns h2{
    margin:0 0 8px;
    font-size:13px;
    letter-spacing:.06em;
    text-transform:uppercase;
}
.characterSheetAbilityBand .characterSheetAbilityGrid{
    grid-template-columns:repeat(6, minmax(0, 1fr)) !important;
    gap:8px !important;
}
.characterSheetAbilityCard{
    min-height:72px !important;
    padding:6px !important;
}
.characterSheetAbilityCard strong{font-size:26px !important}
.characterSheetOverviewVitals .characterSheetVitals{
    display:grid !important;
    grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
    gap:10px;
    margin-top:12px;
}
.characterSheetStackedSections{display:flex; flex-direction:column; gap:18px}
@media (max-width: 1100px){
    .characterSheetAbilityBand .characterSheetAbilityGrid{grid-template-columns:repeat(3, minmax(0, 1fr)) !important}
    .characterSheetCombatBar{grid-template-columns:repeat(2, minmax(0, 1fr))}
    .characterSheetHpControl{grid-column:1 / -1}
}
@media (max-width: 720px){
    .characterSheetOverviewColumns,
    .characterSheetAbilityBand .characterSheetAbilityGrid{grid-template-columns:1fr 1fr !important}
}

/* Character sheet workspace: dark, compact, three columns. */
#interactiveCharacterSheetContent{
    background:#141c18 !important;
    color:#f3efe6 !important;
}
.interactiveCharacterSheetBox{background:#141c18 !important; color:#f3efe6 !important}
#interactiveCharacterSheetContent .characterSheetHeader{
    background:#101714 !important;
    border-bottom:1px solid #8a7344 !important;
    align-items:flex-start !important;
}
#interactiveCharacterSheetContent .characterSheetIdentity h1,
#interactiveCharacterSheetContent .characterSheetIdentity p,
#interactiveCharacterSheetContent .characterSheetHeaderActions,
#interactiveCharacterSheetContent .characterSheetHeaderActions span{
    color:#f3efe6 !important;
}
#interactiveCharacterSheetContent .characterSheetIdentity h1{
    font-family:Georgia,serif !important;
    font-size:22px !important;
    letter-spacing:0 !important;
}
#interactiveCharacterSheetContent .characterSheetXpLine{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:6px;
    margin-top:4px;
}
#interactiveCharacterSheetContent .characterSheetXpAdd{
    display:inline-flex;
    align-items:center;
    gap:4px;
}
#interactiveCharacterSheetContent .characterSheetXpAdd button{
    width:auto !important;
    white-space:nowrap;
}
#interactiveCharacterSheetContent .characterSheetXpLine > span,
#interactiveCharacterSheetContent .characterSheetXpLine small{
    color:#c5a561 !important;
    font-size:11px !important;
    letter-spacing:.04em;
}
#interactiveCharacterSheetContent .characterSheetXpBar{
    flex:1 1 120px;
    height:6px;
    min-width:80px;
    border-radius:99px;
    background:#2a3330;
    overflow:hidden;
}
#interactiveCharacterSheetContent .characterSheetXpBar i{
    display:block;
    height:100%;
    background:#c5a561;
}
#interactiveCharacterSheetContent .characterSheetXpLine input{
    width:64px !important;
    height:26px !important;
    padding:2px 6px !important;
}
#interactiveCharacterSheetContent .characterSheetHeaderActions button,
#interactiveCharacterSheetContent .characterSheetBackBtn,
#interactiveCharacterSheetContent .characterSheetCloseBtn{
    min-height:28px !important;
    padding:3px 8px !important;
    border:1px solid #8a7344 !important;
    border-radius:6px !important;
    background:#1c2621 !important;
    color:#f3efe6 !important;
    box-shadow:none !important;
    font-size:12px !important;
}
#interactiveCharacterSheetContent .characterSheetHeaderActions button:disabled{
    opacity:.45;
    cursor:default;
}
#interactiveCharacterSheetContent .characterSheetRollMode select{
    height:28px !important;
    min-width:108px;
    background:#1c2621 !important;
    color:#f3efe6 !important;
    border:1px solid #8a7344 !important;
}
#interactiveCharacterSheetContent .characterSheetStatRow{
    display:grid;
    grid-template-columns:minmax(360px,1.35fr) minmax(320px,1fr);
    gap:8px;
    align-items:stretch;
    padding:8px 12px;
    background:#141c18;
    border-bottom:1px solid #8a7344;
}
#interactiveCharacterSheetContent .characterSheetStatRow .characterSheetAbilityGrid{
    display:grid !important;
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
    gap:6px !important;
}
#interactiveCharacterSheetContent .characterSheetAbilityCard{
    display:flex !important;
    flex-direction:column !important;
    grid-template:none !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:0 !important;
    height:auto !important;
    padding:6px 4px 7px !important;
    border:1px solid #8a7344 !important;
    border-radius:8px !important;
    background:#1c2621 !important;
    color:#f3efe6 !important;
    box-shadow:none !important;
    transform:none !important;
}
#interactiveCharacterSheetContent .characterSheetAbilityCard span{
    color:#c5a561 !important;
    font-size:10px !important;
    letter-spacing:.08em !important;
}
#interactiveCharacterSheetContent .characterSheetAbilityCard strong{
    color:#f3efe6 !important;
    font-size:22px !important;
    line-height:1 !important;
}
#interactiveCharacterSheetContent .characterSheetAbilityCard small{
    display:grid !important;
    place-items:center !important;
    width:28px !important;
    height:18px !important;
    margin-top:3px !important;
    border:1px solid #8a7344 !important;
    border-radius:9px !important;
    background:transparent !important;
    color:#f3efe6 !important;
    font-size:11px !important;
    font-weight:700 !important;
}
#interactiveCharacterSheetContent .characterSheetAbilityCard :is(.characterAbilityDie,.rnlD20Icon,.npcStatDieViewport){
    display:none !important;
}
#interactiveCharacterSheetContent .characterSheetCombatCluster{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:6px;
    align-items:stretch;
}
#interactiveCharacterSheetContent .characterSheetCombatCluster > div,
#interactiveCharacterSheetContent .characterSheetCombatCluster > button{
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:2px;
    min-height:0;
    margin:0;
    padding:6px;
    border:1px solid #8a7344;
    border-radius:8px;
    background:#1c2621;
    color:#f3efe6;
    text-align:center;
    cursor:default;
}
#interactiveCharacterSheetContent .characterSheetCombatCluster > button{cursor:pointer}
#interactiveCharacterSheetContent .characterSheetCombatCluster span,
#interactiveCharacterSheetContent .characterSheetHpControl > span{
    color:#c5a561 !important;
    font-size:9px !important;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
}
#interactiveCharacterSheetContent .characterSheetCombatCluster strong{
    color:#f3efe6 !important;
    font-size:18px !important;
    line-height:1;
}
#interactiveCharacterSheetContent .characterSheetInspiration.active{
    background:#2a2416 !important;
    box-shadow:inset 0 0 0 1px #e8c56a;
}
#interactiveCharacterSheetContent .characterSheetHpControl{
    grid-column:1 / -1;
    display:grid !important;
    grid-template-columns:auto minmax(0,1fr);
    gap:4px 10px;
    align-items:center;
    text-align:left;
}
#interactiveCharacterSheetContent .characterSheetHpReadout{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
}
#interactiveCharacterSheetContent .characterSheetHpReadout div{
    display:flex;
    flex-direction:column;
}
#interactiveCharacterSheetContent .characterSheetHpReadout small{
    color:#c5a561 !important;
    font-size:9px;
    letter-spacing:.06em;
    text-transform:uppercase;
}
#interactiveCharacterSheetContent .characterSheetHpReadout b{
    color:#f3efe6;
    font-size:20px;
    line-height:1;
}
#interactiveCharacterSheetContent .characterSheetHpActions{grid-column:1 / -1}
#interactiveCharacterSheetContent .characterSheetHpActions button{
    background:#141c18 !important;
    color:#f3efe6 !important;
    border:1px solid #8a7344 !important;
}
#interactiveCharacterSheetContent .characterSheetBoard{
    display:grid;
    grid-template-columns:minmax(210px,250px) minmax(220px,300px) minmax(0,1fr);
    gap:8px;
    min-height:0;
    flex:1 1 auto;
    padding:8px 12px 12px;
    background:#141c18 !important;
    overflow:hidden;
}
#interactiveCharacterSheetContent .characterSheetBoard > *{
    min-width:0;
    min-height:0;
    overflow:auto;
    padding:10px;
    border:1px solid #8a7344;
    border-radius:8px;
    background:#1a2420;
}
#interactiveCharacterSheetContent .characterSheetRailBlock + .characterSheetRailBlock{
    margin-top:12px;
    padding-top:10px;
    border-top:1px solid rgba(138,115,68,.45);
}
#interactiveCharacterSheetContent .characterSheetBoard h2{
    margin:0 0 6px;
    color:#c5a561 !important;
    font-size:11px !important;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
}
#interactiveCharacterSheetContent .characterSheetSaveGrid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:4px;
}
#interactiveCharacterSheetContent .characterSheetSaveChip{
    display:grid !important;
    grid-template-columns:12px 1fr auto !important;
    min-height:26px !important;
    padding:2px 6px !important;
    border:0 !important;
    border-bottom:1px solid rgba(138,115,68,.35) !important;
    background:transparent !important;
    color:#f3efe6 !important;
}
#interactiveCharacterSheetContent .characterSheetSkillList .characterSheetListRoll{
    display:grid !important;
    grid-template-columns:14px 34px minmax(0,1fr) 36px !important;
    min-height:24px !important;
    padding:2px 4px !important;
    border:0 !important;
    border-bottom:1px solid rgba(138,115,68,.28) !important;
    background:transparent !important;
    color:#f3efe6 !important;
}
#interactiveCharacterSheetContent .characterSheetListRoll strong,
#interactiveCharacterSheetContent .characterSheetListRoll span,
#interactiveCharacterSheetContent .characterSheetListRoll small{
    color:#f3efe6 !important;
}
#interactiveCharacterSheetContent .characterSheetListRoll small{color:#c5a561 !important}
#interactiveCharacterSheetContent .characterSheetListRoll:hover{background:rgba(197,165,97,.12) !important}
#interactiveCharacterSheetContent .characterSheetSenseList{display:grid; gap:4px}
#interactiveCharacterSheetContent .characterSheetSenseList div{
    display:grid;
    grid-template-columns:36px minmax(0,1fr);
    gap:8px;
    align-items:center;
}
#interactiveCharacterSheetContent .characterSheetSenseList strong{font-size:16px}
#interactiveCharacterSheetContent .characterSheetSenseNote,
#interactiveCharacterSheetContent .characterSheetRailBlock p{
    margin:6px 0 0;
    color:#f3efe6 !important;
    font-size:12px;
    line-height:1.35;
}
#interactiveCharacterSheetContent .characterSheetRailBlock p span{
    display:block;
    color:#c5a561 !important;
    font-size:10px;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
}
#interactiveCharacterSheetContent .characterSheetDock{
    display:flex;
    flex-direction:column;
    padding:0 !important;
    overflow:hidden;
}
#interactiveCharacterSheetContent .characterSheetDock .characterSheetTabs{
    flex-shrink:0;
    margin:0;
    padding:6px 8px 0 !important;
    background:#1a2420 !important;
    border-bottom:1px solid #8a7344 !important;
}
#interactiveCharacterSheetContent .characterSheetDock .characterSheetTabs button{
    min-height:28px !important;
    padding:4px 8px !important;
    border:0 !important;
    border-bottom:2px solid transparent !important;
    border-radius:0 !important;
    background:transparent !important;
    color:#c5a561 !important;
    font-size:11px !important;
    letter-spacing:.04em;
    text-transform:uppercase;
}
#interactiveCharacterSheetContent .characterSheetDock .characterSheetTabs button.active{
    color:#f3efe6 !important;
    border-bottom-color:#e8c56a !important;
    background:transparent !important;
}
#interactiveCharacterSheetContent .characterSheetDock .characterSheetTabContent{
    flex:1 1 auto;
    min-height:0;
    overflow:auto;
    padding:10px !important;
    background:#1a2420 !important;
    color:#f3efe6 !important;
}
#interactiveCharacterSheetContent .characterSheetActionFilters{
    display:flex;
    flex-wrap:wrap;
    gap:4px;
    margin-bottom:8px;
}
#interactiveCharacterSheetContent .characterSheetActionFilters button{
    min-height:24px;
    padding:2px 8px;
    border:1px solid #8a7344;
    border-radius:99px;
    background:transparent;
    color:#c5a561;
    font-size:11px;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
    cursor:pointer;
}
#interactiveCharacterSheetContent .characterSheetActionFilters button.active{
    background:#e8c56a;
    color:#141c18;
    border-color:#e8c56a;
}
#interactiveCharacterSheetContent :is(
    .characterSheetActionCard,
    .characterSheetSpellCard,
    .characterSheetInventoryItem,
    .characterSheetOfficialFeatureCard,
    .characterSheetEmptyState,
    .characterSheetDeathSaves,
    .characterSheetHitDie,
    .characterSheetResourceTracker,
    .characterSheetRollHistory,
    .characterSheetEditableBlock,
    .characterSheetSpellSlots,
    .characterSheetCarry,
    .characterSheetChosenOptions article
){
    background:#141c18 !important;
    color:#f3efe6 !important;
    border:1px solid #8a7344 !important;
    box-shadow:none !important;
}
#interactiveCharacterSheetContent .characterSheetActionCard{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:8px;
    align-items:center;
    margin-bottom:6px;
    padding:8px !important;
}
#interactiveCharacterSheetContent .characterSheetActionCard h3,
#interactiveCharacterSheetContent .characterSheetActionCard p,
#interactiveCharacterSheetContent .characterSheetActionCard span,
#interactiveCharacterSheetContent .characterSheetSpellCard,
#interactiveCharacterSheetContent .characterSheetSpellCard h3,
#interactiveCharacterSheetContent .characterSheetSpellCard p,
#interactiveCharacterSheetContent .characterSheetInventoryItem,
#interactiveCharacterSheetContent .characterSheetInventoryItem h3,
#interactiveCharacterSheetContent .characterSheetEmptyState,
#interactiveCharacterSheetContent .characterSheetEmptyState p,
#interactiveCharacterSheetContent .characterSheetOfficialFeatureCard,
#interactiveCharacterSheetContent .characterSheetOfficialFeatureCard strong{
    color:#f3efe6 !important;
}
#interactiveCharacterSheetContent .characterSheetActionValues{
    display:flex;
    gap:6px;
}
#interactiveCharacterSheetContent .characterSheetActionValues button,
#interactiveCharacterSheetContent .characterSheetFixedDamage{
    min-width:72px;
    padding:4px 6px;
    border:1px solid #8a7344;
    border-radius:6px;
    background:#1c2621;
    color:#f3efe6;
    text-align:center;
}
#interactiveCharacterSheetContent .characterSheetActionValues strong{color:#f3efe6 !important; font-size:16px}
#interactiveCharacterSheetContent :is(input,select,textarea){
    background:#101714 !important;
    color:#f3efe6 !important;
    border:1px solid #8a7344 !important;
}
#interactiveCharacterSheetContent .characterSheetDeathSaves,
#interactiveCharacterSheetContent .characterSheetHitDie,
#interactiveCharacterSheetContent .characterSheetResourceTracker article{
    margin-top:6px;
    padding:6px;
}
#interactiveCharacterSheetContent .characterSheetRollHistory{max-height:140px; overflow:auto}
@media (max-width: 1100px){
    #interactiveCharacterSheetContent .characterSheetStatRow,
    #interactiveCharacterSheetContent .characterSheetBoard{grid-template-columns:1fr 1fr}
    #interactiveCharacterSheetContent .characterSheetDock{grid-column:1 / -1; min-height:320px}
    #interactiveCharacterSheetContent .characterSheetStatRow .characterSheetAbilityGrid{grid-template-columns:repeat(6,minmax(0,1fr)) !important}
}
@media (max-width: 800px){
    #interactiveCharacterSheetContent .characterSheetBoard,
    #interactiveCharacterSheetContent .characterSheetStatRow{grid-template-columns:1fr}
    #interactiveCharacterSheetContent .characterSheetStatRow .characterSheetAbilityGrid{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
    #interactiveCharacterSheetContent .characterSheetCombatCluster{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Monster and NPC sheets use the same dark, compact sheet language. */
#editor .monsterSheet,
#editor .npcSheet{
    max-width:none !important;
    width:100% !important;
    margin:0 !important;
    padding:8px 4px 28px !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    color:#f3efe6 !important;
}
#editor .monsterSheet::after,
#editor .npcSheet::after{content:none !important}
#editor :is(.monsterSheet,.npcSheet) :is(h1,h2,h3,p,li,span,strong,small,label,div){text-shadow:none !important; color:#f3efe6}
#editor :is(.monsterSheet,.npcSheet) h2,
#editor :is(.monsterSectionHeading,.npcSectionHeading) h2{
    margin:0 0 8px !important;
    color:#c5a561 !important;
    font-size:11px !important;
    font-weight:800 !important;
    letter-spacing:.08em !important;
    text-transform:uppercase !important;
    border-bottom:1px solid rgba(138,115,68,.45) !important;
}
#editor :is(.monsterSheet,.npcSheet) label{
    color:#c5a561 !important;
    font-size:10px !important;
    font-weight:800 !important;
    letter-spacing:.06em !important;
    text-transform:uppercase !important;
}
#editor :is(.monsterSheet,.npcSheet) :is(input,select,textarea):not([type="checkbox"],[type="radio"]){
    border:1px solid #8a7344 !important;
    border-radius:6px !important;
    background:#101714 !important;
    box-shadow:none !important;
    color:#f3efe6 !important;
    font-family:Georgia,"Times New Roman",serif !important;
    font-size:14px !important;
    letter-spacing:0 !important;
    text-transform:none !important;
}
#editor :is(.monsterSheet,.npcSheet) :is(input,select,textarea):focus{
    outline:2px solid #c5a561 !important;
    outline-offset:1px;
    border-color:#c5a561 !important;
    background:#101714 !important;
}
#editor .monsterDivider,
#editor .npcDivider{display:none !important}
#editor .monsterHeader{margin:0 0 6px}
#editor .monsterHeader h1{
    margin:0 !important;
    color:#c5a561 !important;
    font-size:11px !important;
    letter-spacing:.12em !important;
    text-transform:uppercase !important;
}
#editor .monsterMeta,
#editor .monsterImportMeta{margin:2px 0 0 !important; color:#c5a561 !important; font:italic 400 13px/1.3 Georgia,serif !important}
#editor .monsterName,
#editor .npcSheet.npcCard .npcCardName .npcName{
    height:auto !important;
    padding:2px 0 4px !important;
    border:0 !important;
    border-bottom:1px solid #8a7344 !important;
    border-radius:0 !important;
    background:transparent !important;
    color:#f3efe6 !important;
    font-size:28px !important;
    font-family:Georgia,serif !important;
}
#editor .monsterBasicInfo{
    display:grid !important;
    grid-template-columns:minmax(180px,1.4fr) minmax(110px,.5fr) minmax(140px,.7fr) !important;
    gap:8px !important;
    margin-bottom:8px !important;
}
#editor .monsterBasicInfo > .monsterShortFields{grid-column:1 / -1}
#editor .monsterShortFields,
#editor .npcCardVitals{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:6px !important;
}
#editor .monsterShortFields > label,
#editor .npcVital{
    display:flex !important;
    flex-direction:column !important;
    gap:2px !important;
    min-height:0 !important;
    margin:0 !important;
    padding:6px 8px !important;
    border:1px solid #8a7344 !important;
    border-radius:8px !important;
    background:#1c2621 !important;
}
#editor .monsterShortFields input,
#editor .npcVital :is(input){
    width:100% !important;
    height:auto !important;
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
    color:#f3efe6 !important;
    font-size:20px !important;
    font-weight:700 !important;
}
#editor .monsterHpButtons,
#editor .npcHpButtons{display:flex; flex-wrap:wrap; gap:3px; margin-top:4px}
#editor .monsterHpButtons button,
#editor .npcHpButtons button{
    min-height:22px;
    padding:0 6px;
    border:1px solid #8a7344;
    border-radius:5px;
    background:#141c18;
    color:#f3efe6;
    font-size:11px;
    cursor:pointer;
}
#editor .monsterAbilities,
#editor .npcSheet.npcCard .npcAbilities{
    display:grid !important;
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
    gap:6px !important;
    width:auto !important;
    margin:8px 0 !important;
}
#editor .monsterAbility,
#editor .npcSheet.npcCard .npcCardAbility{
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:2px !important;
    width:auto !important;
    max-width:none !important;
    min-height:0 !important;
    margin:0 !important;
    padding:6px 4px 7px !important;
    border:1px solid #8a7344 !important;
    border-radius:8px !important;
    background:#1c2621 !important;
    box-shadow:none !important;
    grid-template:none !important;
}
#editor :is(.monsterAbility,.npcCardAbility) strong{
    color:#c5a561 !important;
    font-size:10px !important;
    font-weight:800 !important;
    letter-spacing:.08em !important;
    text-transform:uppercase !important;
}
#editor .monsterAbilityModifier,
#editor .npcSheet.npcCard .npcAbilityModifier{
    order:1;
    min-width:0 !important;
    padding:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    color:#f3efe6 !important;
    font-size:22px !important;
    font-style:normal !important;
    font-weight:700 !important;
    line-height:1 !important;
}
#editor .monsterAbilityScore,
#editor .npcSheet.npcCard .npcCardScore,
#editor .npcSheet.npcCard .npcCardScore .npcAbilityScore{
    order:2;
    width:36px !important;
    min-width:0 !important;
    height:20px !important;
    padding:0 !important;
    border:1px solid #8a7344 !important;
    border-radius:9px !important;
    background:transparent !important;
    color:#f3efe6 !important;
    font-size:12px !important;
    font-weight:700 !important;
    text-align:center !important;
}
#editor .npcSheet.npcCard .npcCardScore{
    position:static !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    width:auto !important;
    height:auto !important;
    border:0 !important;
}
#editor :is(.monsterAbilityRollBtn,.npcAbilityRollBtn){
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    order:3;
    width:auto !important;
    height:20px !important;
    min-height:0 !important;
    margin:2px 0 0 !important;
    padding:0 7px !important;
    border:1px solid #8a7344 !important;
    border-radius:99px !important;
    background:transparent !important;
    color:#c5a561 !important;
    box-shadow:none !important;
}
#editor :is(.monsterAbilityRollBtn,.npcAbilityRollBtn) :is(.rnlD20Icon,.npcStatDieViewport,.polyDie){display:none !important}
#editor :is(.monsterAbilityRollBtn,.npcAbilityRollBtn)::after{
    content:"Roll";
    font-size:10px;
    font-weight:800;
    letter-spacing:.05em;
    text-transform:uppercase;
}
#editor .npcAbilitySave{
    order:4;
    display:flex !important;
    align-items:center !important;
    gap:4px !important;
    margin:0 !important;
    font-size:10px !important;
}
#editor .npcAbilitySave input{width:34px !important; height:20px !important; padding:0 !important; text-align:center}
#editor .monsterDetails,
#editor .npcCardMoreGrid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
}
#editor .monsterSection,
#editor .npcSection,
#editor .npcCardAttacks,
#editor .npcCardSide,
#editor .open5eSearchPanel,
#editor .npcCardMore{
    margin-top:8px !important;
    padding:10px !important;
    border:1px solid #8a7344 !important;
    border-radius:8px !important;
    background:#1a2420 !important;
    box-shadow:none !important;
    color:#f3efe6 !important;
}
#editor :is(.monsterRichField,.npcRichField,.sheetArea){
    min-height:72px !important;
    border:1px solid #8a7344 !important;
    border-radius:6px !important;
    background:#101714 !important;
    color:#f3efe6 !important;
    font-size:14px !important;
    line-height:1.45 !important;
}
#editor .open5eSearchHeading strong{color:#f3efe6 !important; font:700 14px/1.2 Georgia,serif !important}
#editor .open5eSearchHeading span{color:#c5a561 !important; font-size:11px !important}
#editor .npcCardFrame{
    display:grid !important;
    grid-template-columns:minmax(0,1.35fr) minmax(240px,.8fr) !important;
    gap:8px !important;
    align-items:start !important;
}
#editor .npcCardName,
#editor .npcCardAbilities,
#editor .npcCardMore,
#editor .npcSheetActions{grid-column:1 / -1 !important}
#editor .npcCardAbilities{grid-row:auto !important; width:auto !important}
#editor .npcCardCenter{grid-column:1 !important; grid-row:auto !important; min-width:0 !important; gap:8px !important}
#editor .npcCardSide{grid-column:2 !important; grid-row:auto !important}
#editor .npcCardPortraitImage{
    width:72px !important;
    height:72px !important;
    object-fit:cover;
    border:1px solid #8a7344 !important;
    border-radius:8px !important;
}
#editor :is(.monsterSheetActions,.npcSheetActions){
    display:flex !important;
    flex-wrap:wrap !important;
    gap:6px !important;
    margin-top:8px !important;
}
#editor :is(.monsterSheetActions,.npcSheetActions) button,
#editor .actorInventoryAddBtn,
#editor .open5eMonsterSearchBtn{
    width:auto !important;
    min-height:28px !important;
    margin:0 !important;
    padding:4px 10px !important;
    border:1px solid #8a7344 !important;
    border-radius:6px !important;
    background:#1c2621 !important;
    color:#f3efe6 !important;
    box-shadow:none !important;
    font-size:12px !important;
    font-weight:700 !important;
    letter-spacing:.03em !important;
    cursor:pointer;
}
@media (max-width:900px){
    #editor .monsterBasicInfo,
    #editor .monsterShortFields,
    #editor .npcCardVitals,
    #editor .monsterAbilities,
    #editor .npcSheet.npcCard .npcAbilities,
    #editor .monsterDetails,
    #editor .npcCardMoreGrid,
    #editor .npcCardFrame{grid-template-columns:1fr 1fr !important}
    #editor .npcCardSide,
    #editor .npcCardCenter{grid-column:1 / -1 !important}
}
@media (max-width:640px){
    #editor .monsterAbilities,
    #editor .npcSheet.npcCard .npcAbilities{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
}
/* 1.8.101 cast/portrait/npc-hide */
/* Must beat #editorView:has(.npcSheet) { display:flex !important } when closed */
#editorView.hidden,
#editorView.hidden:has(.monsterSheet),
#editorView.hidden:has(.npcSheet){
    display:none !important;
}
#editorView:has(.monsterSheet),
#editorView:has(.npcSheet){
    display:flex !important;
    flex-direction:column !important;
    height:calc(100vh - var(--real-header-height, 76px)) !important;
    min-height:0 !important;
    overflow:hidden !important;
}
#editorView:has(.monsterSheet) #editorLeft,
#editorView:has(.npcSheet) #editorLeft{
    display:flex !important;
    flex:1 1 auto !important;
    flex-direction:column !important;
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
}
#editorView:has(.monsterSheet) #editor,
#editorView:has(.npcSheet) #editor{
    flex:1 1 auto !important;
    min-height:0 !important;
    height:auto !important;
    overflow:auto !important;
    scroll-padding-top:16px;
    padding:14px 16px 36px !important;
}
#editor .monsterShortFields,
#editor .npcCardVitals,
#editor .monsterDetails,
#editor .npcCardSide{
    position:relative !important;
}
#editor .monsterShortFields,
#editor .npcCardVitals{
    margin-top:8px !important;
    padding:28px 8px 8px !important;
    border:1px solid #8a7344 !important;
    border-radius:8px !important;
    background:#1a2420 !important;
}
#editor .monsterAbilities,
#editor .npcSheet.npcCard .npcAbilities{
    position:relative !important;
    margin-top:22px !important;
    padding-top:22px !important;
}
#editor .monsterDetails,
#editor .npcCardSide{
    margin-top:16px !important;
    padding:28px 10px 10px !important;
    border:1px solid #8a7344 !important;
    border-radius:8px !important;
    background:#1a2420 !important;
}
#editor .monsterShortFields::before,
#editor .npcCardVitals::before,
#editor .monsterAbilities::before,
#editor .npcSheet.npcCard .npcAbilities::before,
#editor .monsterDetails::before,
#editor .npcCardSide::before{
    position:absolute;
    top:8px;
    left:10px;
    color:#c5a561;
    font-size:11px;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
}
#editor .monsterShortFields::before,
#editor .npcCardVitals::before{content:"Combat"}
#editor .monsterAbilities::before,
#editor .npcSheet.npcCard .npcAbilities::before{content:"Ability Scores"}
#editor .monsterDetails::before{content:"Defenses"}
#editor .npcCardSide::before{content:"Profile"}
#editorView:has(.monsterSheet) #editorHeaderButtons > button,
#editorView:has(.npcSheet) #editorHeaderButtons > button{
    min-height:30px;
    padding:4px 10px;
    border:1px solid #8a7344;
    border-radius:6px;
    background:#1c2621;
    color:#f3efe6;
    box-shadow:none;
}
#interactiveCharacterSheetWindow,
#interactiveCharacterSheetContent{overflow:hidden !important}

/* Monster and NPC sheets sit on the dark page as a parchment stat block,
   with separate bands so the sections do not share one color. */
#editor .monsterSheet,
#editor .npcSheet.npcCard{
    background:#f4efe6 !important;
    color:#24170f !important;
    border:1px solid #c4a882 !important;
    border-radius:12px !important;
    box-shadow:none !important;
}
#editor :is(.monsterSheet,.npcSheet.npcCard) :is(h1,h2,h3,p,li,span,strong,small,label,div){color:#24170f}
#editor :is(.monsterSheet,.npcSheet.npcCard) label,
#editor .monsterShortFields::before,
#editor .npcCardVitals::before,
#editor .monsterAbilities::before,
#editor .npcSheet.npcCard .npcAbilities::before,
#editor .monsterDetails::before,
#editor .npcCardSide::before{
    color:#6b3a24 !important;
}
#editor :is(.monsterSheet,.npcSheet.npcCard) :is(input,select,textarea):not([type="checkbox"],[type="radio"]){
    background:#fffdf8 !important;
    color:#24170f !important;
    border:1px solid #c8b89a !important;
}
#editor .monsterName,
#editor .npcSheet.npcCard .npcCardName .npcName{
    background:transparent !important;
    border:0 !important;
    border-bottom:2px solid #8a4b32 !important;
    color:#1c140e !important;
    font-size:34px !important;
}
#editor .monsterHeader h1,
#editor :is(.monsterSheet,.npcSheet.npcCard) h2{
    color:#6b3a24 !important;
    border-bottom-color:#8a4b32 !important;
}
#editor .monsterShortFields,
#editor .npcCardVitals{
    background:#243029 !important;
    border-color:#243029 !important;
    color:#f6f1e6 !important;
}
#editor .monsterShortFields::before,
#editor .npcCardVitals::before{color:#e8c56a !important}
#editor .monsterShortFields > label,
#editor .npcVital{
    background:transparent !important;
    border:0 !important;
    border-right:1px solid rgba(243,239,230,.2) !important;
    border-radius:0 !important;
    color:#e8c56a !important;
}
#editor .monsterShortFields input,
#editor .npcVital input{
    background:transparent !important;
    border:0 !important;
    color:#f6f1e6 !important;
}
#editor .monsterHpButtons button,
#editor .npcHpButtons button{
    background:#1a2420 !important;
    color:#f6f1e6 !important;
    border-color:#8a7344 !important;
}
#editor .monsterAbility,
#editor .npcSheet.npcCard .npcCardAbility{
    background:#fffdf8 !important;
    border:1px solid #c8b89a !important;
    color:#24170f !important;
}
#editor :is(.monsterAbility,.npcCardAbility) strong,
#editor .monsterAbilityModifier,
#editor .npcSheet.npcCard .npcAbilityModifier{
    color:#1c140e !important;
}
#editor .monsterAbilityScore,
#editor .npcSheet.npcCard .npcCardScore .npcAbilityScore{
    background:#f4efe6 !important;
    color:#24170f !important;
    border-color:#c8b89a !important;
}
#editor :is(.monsterAbilityRollBtn,.npcAbilityRollBtn){
    background:#243029 !important;
    color:#f6f1e6 !important;
    border-color:#243029 !important;
}
#editor :is(.monsterAbilityRollBtn,.npcAbilityRollBtn)::after{color:#f6f1e6}
#editor .monsterDetails,
#editor .npcCardSide,
#editor .monsterSection,
#editor .npcCardMore,
#editor .npcCardMore section{
    background:#fffdf8 !important;
    border:1px solid #c8b89a !important;
    color:#24170f !important;
}
#editor .monsterSection:has(.monsterTraits),
#editor .npcSection{
    background:#e9dfd0 !important;
    border-color:#d3c2a6 !important;
    color:#24170f !important;
}
#editor .monsterSection:has(.monsterActions),
#editor .monsterSection:has([data-actor-inventory-list]),
#editor .npcCardAttacks,
#editor .npcCardMore{
    background:#fffdf8 !important;
    border-color:#c8b89a !important;
}
#editor :is(.monsterRichField,.npcRichField,.sheetArea){
    background:#fffdf8 !important;
    color:#24170f !important;
    border-color:#c8b89a !important;
}
#editor .actorParsedActionCard,
#editor .actorInventoryList article,
#editor .npcAttackList article{
    display:grid !important;
    gap:6px !important;
    margin:0 0 8px !important;
    padding:10px 12px !important;
    background:#fffdf8 !important;
    color:#24170f !important;
    border:1px solid #c8b89a !important;
    border-left:4px solid #8a4b32 !important;
    border-radius:8px !important;
    box-shadow:none !important;
}
#editor .actorParsedActionHeading{display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; align-items:center}
#editor .actorGeneratedActionButtons,
#editor .actorInventoryWeaponRolls{display:flex; flex-wrap:wrap; gap:6px}
#editor .actorGeneratedActionButtons button,
#editor .actorInventoryWeaponRolls button,
#editor [data-actor-item-roll],
#editor [data-actor-action-roll]{
    min-height:32px !important;
    padding:4px 10px !important;
    border:0 !important;
    border-radius:6px !important;
    background:#243029 !important;
    color:#f6f1e6 !important;
    font-weight:800 !important;
    cursor:pointer;
}
#editor [data-actor-action-roll="damage"],
#editor [data-actor-item-roll="damage"]{background:#8a4b32 !important}
#editor .open5eSearchPanel{
    background:#fffdf8 !important;
    color:#24170f !important;
    border-color:#c8b89a !important;
}
#editor .open5eSearchHeading strong,
#editor .open5eSearchHeading span{color:#24170f !important}

/* Creature window: parchment stat block beside the portrait. Items under it stay editable. */
#editor .creatureLocked{
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
    padding:0 !important;
    max-width:none !important;
    width:100% !important;
    box-sizing:border-box !important;
}
#editor .creatureLocked.creatureEditing > :not(.creatureReadout):not(.open5eSearchPanel):not(.actorInventorySection):not(.monsterSheetActions):not(.npcSheetActions){
    display:block !important;
}
#editor .creatureLocked > :not(.creatureReadout):not(.open5eSearchPanel):not(.actorInventorySection):not(.monsterSheetActions):not(.npcSheetActions){
    display:none !important;
}
#editor .creatureReadout{
    margin:0 0 16px !important;
    padding:0 !important;
    background:transparent !important;
    color:#24170f !important;
    border:0 !important;
    scroll-margin-top:24px !important;
}
#editor .creatureStage{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 240px !important;
    gap:18px !important;
    align-items:start !important;
}
#editor .creatureCard{
    padding:16px 18px 14px !important;
    background:#f4efe4 !important;
    color:#24170f !important;
    border:1px solid #c4a882 !important;
    border-radius:10px !important;
}
#editor .creatureReadoutHead{
    display:block !important;
    margin:0 0 12px !important;
    padding:0 0 8px !important;
    border-bottom:2px solid #8a3a32 !important;
}
#editor .creatureReadoutHead h2{
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    color:#1c140e !important;
    font-size:32px !important;
    line-height:1.05 !important;
    letter-spacing:.04em !important;
}
#editor .creatureReadoutHead p{
    margin:3px 0 0 !important;
    color:#5c4636 !important;
    font-size:15px !important;
    font-style:italic !important;
}
#editor .creatureColumns{
    display:grid !important;
    grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr) !important;
    gap:18px 22px !important;
}
#editor .creatureCombat p,
#editor .creatureFact{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:6px !important;
    align-items:baseline !important;
    margin:0 0 4px !important;
    color:#24170f !important;
}
#editor .creatureCombat span,
#editor .creatureFact span,
#editor .creatureWeaponsTitle,
#editor .creatureProse h3{
    color:#6b3a24 !important;
    font-size:13px !important;
    font-weight:800 !important;
    letter-spacing:0 !important;
    text-transform:none !important;
}
#editor .creatureHpButtons{display:inline-flex !important; gap:4px !important}
#editor .creatureHpButtons button,
#editor .creatureRoll{
    min-height:24px !important;
    padding:1px 6px !important;
    border:1px solid #c8b89a !important;
    border-radius:4px !important;
    background:#fffdf8 !important;
    color:#1c140e !important;
    font-weight:800 !important;
    cursor:pointer !important;
}
#editor .creatureAbilityPair{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
    margin:10px 0 !important;
}
#editor .creatureAbilityTable{
    width:100% !important;
    border-collapse:collapse !important;
    background:#fffdf8 !important;
    color:#24170f !important;
}
#editor .creatureAbilityTable th,
#editor .creatureAbilityTable td{
    padding:3px 5px !important;
    border-bottom:1px solid #e4d8c4 !important;
    text-align:center !important;
    color:#24170f !important;
}
#editor .creatureAbilityTable thead th{color:#6b3a24 !important; font-size:11px !important}
#editor .creatureAbilityTable tbody th{text-align:left !important; color:#1c140e !important}
#editor .creatureAbilityTable tbody tr:nth-child(even){background:#f7f1e6 !important}
#editor .creatureProse{margin:0 0 8px !important}
#editor .creatureProse p,
#editor .creatureSource{margin:0 !important; color:#24170f !important}
#editor .creatureWeapons{margin-top:4px !important}
#editor .creatureCard .actorParsedActionCard{
    background:#fffdf8 !important;
    color:#24170f !important;
    border-color:#e4d8c4 !important;
    border-left:3px solid #8a3a32 !important;
}
#editor .creatureWeaponName{
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
    color:#1c140e !important;
    font:inherit !important;
    font-weight:800 !important;
    font-style:italic !important;
    cursor:pointer !important;
}
#editor .creatureSource{margin-top:10px !important; color:#6b3a24 !important; font-size:13px !important; text-align:right !important}
#editor .creatureArt{
    display:flex !important;
    justify-content:center !important;
    min-height:280px !important;
}
#editor .creatureArt .sheetPortraitControls{display:block !important; position:relative !important; width:100% !important}
#editor .creatureArt .sheetProfileUpload{
    position:relative !important;
    width:100% !important;
    height:340px !important;
    flex-basis:auto !important;
    border:1px solid #c4a882 !important;
    border-radius:8px !important;
    background:#f4efe4 !important;
    box-shadow:none !important;
    color:#6b3a24 !important;
}
#editor .creatureArt .sheetProfileImage{
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
    border-radius:8px !important;
}
#editor .creatureArt .creatureArtPlus{
    position:absolute !important;
    top:50% !important;
    left:50% !important;
    transform:translate(-50%, -50%) !important;
    width:26px !important;
    height:26px !important;
    display:grid !important;
    place-items:center !important;
    padding:0 !important;
    border:1px solid #c4a882 !important;
    border-radius:4px !important;
    background:#fffdf8 !important;
    color:#6b3a24 !important;
    font-size:18px !important;
    font-weight:500 !important;
    line-height:1 !important;
    cursor:pointer !important;
}
#editor .creatureArt .sheetProfileUpload:has(.sheetProfileImage) .creatureArtPlus{
    top:8px !important;
    right:8px !important;
    left:auto !important;
    transform:none !important;
}
#editor .creatureArt .creatureArtRemove{
    position:absolute !important;
    top:8px !important;
    left:8px !important;
    width:22px !important;
    height:22px !important;
    padding:0 !important;
    border:1px solid #c4a882 !important;
    border-radius:4px !important;
    background:#fffdf8 !important;
    color:#6b3a24 !important;
    font-size:14px !important;
    line-height:1 !important;
    cursor:pointer !important;
}
#editor .creatureLocked .actorInventorySection{
    display:block !important;
    margin:12px 0 0 !important;
    padding:14px !important;
    background:#f4efe4 !important;
    border:1px solid #c4a882 !important;
    border-radius:10px !important;
    color:#24170f !important;
}
#editor .creatureLocked .actorInventorySection h2{color:#6b3a24 !important}
@media (max-width:800px){
    #editor .creatureStage,
    #editor .creatureColumns,
    #editor .creatureAbilityPair{grid-template-columns:1fr !important}
}
#characterSkillChoices label{
    position:relative;
}
#characterSkillChoices label.skillAvailable{
    border-color:#c5a561 !important;
    background:rgba(197,165,97,.18) !important;
    color:#f3efe6 !important;
}
#characterSkillChoices label.skillUnavailable{
    opacity:.42 !important;
    filter:grayscale(1);
    pointer-events:none;
}
#characterSkillChoices .skillChoiceHint{
    display:block;
    margin-top:4px;
    font-size:11px;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
    color:#c5a561;
}
#characterSkillChoices label.skillUnavailable .skillChoiceHint{color:#8d8478}
#characterSkillChoices label.backgroundSkill .skillChoiceHint{color:#8fbf9a}

/* =========================================================
   Modal polish 1.8.92 — ink/brass/parchment, less green flood
   ========================================================= */
#templateWindow,
#panelChooserWindow,
#npcLibraryWindow,
#monsterLibraryWindow,
#mapLibraryWindow,
#pdfLibraryWindow,
#partyManagerWindow,
#spellbookWindow,
#lootManagerWindow{
    background:rgba(8,12,10,.82) !important;
}

#templateWindow .templateBox,
.panelChooserBox,
.npcLibraryBox,
.monsterLibraryBox,
.mapLibraryBox,
.pdfLibBox,
.pdfLibraryBox,
.partyManagerBox,
.spellbookBox,
.lootManagerBox{
    border:1px solid var(--modal-line) !important;
    border-radius:10px !important;
    background:
        linear-gradient(165deg,rgba(26,34,29,.98),rgba(18,25,22,.99)) !important;
    box-shadow:0 28px 80px rgba(0,0,0,.55),inset 0 0 0 1px rgba(196,165,116,.12) !important;
    color:var(--modal-bone) !important;
}

body > [id$="Window"] > :is(.panelChooserBox,.npcLibraryBox,.monsterLibraryBox,.mapLibraryBox,.pdfLibBox,.pdfLibraryBox,.partyManagerBox,.spellbookBox,.lootManagerBox)::after{
    border-image:none !important;
    border:1px solid rgba(196,165,116,.14) !important;
    inset:6px !important;
}

.panelChooserHeader,
.npcLibraryHeader,
.monsterLibraryHeader,
.mapLibraryHeader,
.pdfLibHeader,
.pdfLibraryHeader,
.partyManagerHeader,
.spellbookHeader,
.lootManagerHeader{
    background:linear-gradient(180deg,#1c2620,#141c18) !important;
    border-bottom:1px solid var(--modal-line) !important;
}
.panelChooserHeader h2,
.npcLibraryHeader h2,
.monsterLibraryHeader h2,
.mapLibraryHeader h2,
.pdfLibHeader h2,
.pdfLibraryHeader h2,
.partyManagerHeader h2,
.spellbookHeader h2,
.lootManagerHeader h2{
    color:#e8c56a !important;
}
.panelChooserHeader p,
.npcLibraryHeader p,
.monsterLibraryHeader p,
.mapLibraryHeader p,
.pdfLibHeader p,
.pdfLibraryHeader p,
.partyManagerHeader p,
.spellbookHeader p,
.lootManagerHeader p,
.partyManagerEyebrow,
.pdfLibEyebrow{
    color:var(--modal-muted) !important;
}
.pdfLibTools,
.pdfLibUpload,
.pdfLibCollection{
    background:transparent !important;
}
.pdfLibDropZone,
.pdfLibList .pdfLibCard,
.pdfLibCard{
    border:1px solid rgba(196,165,116,.28) !important;
    background:linear-gradient(165deg,#f4f0e6,#e9e2d2) !important;
    color:var(--modal-bone-ink) !important;
    border-radius:10px !important;
}

#templateWindow .templateBox{
    background:
        radial-gradient(ellipse at 12% 0,rgba(197,165,97,.14),transparent 42%),
        linear-gradient(160deg,#1d2621,#141b17) !important;
    border:1px solid var(--modal-line) !important;
}
#templateWindow .templateHeading > span{color:var(--modal-accent-note) !important}
#templateWindow .templateHeading h3{color:var(--modal-bone) !important}
#templateWindow .templateHeading p{color:var(--modal-muted) !important}
#closeTemplate{
    border:1px solid rgba(181,82,58,.55) !important;
    background:#2a1a16 !important;
    color:#f0cfc4 !important;
    border-radius:6px !important;
}

#templateWindow .templateBtn{
    border:1px solid rgba(196,165,116,.28) !important;
    background:linear-gradient(160deg,#222b26,#181f1b) !important;
    color:var(--modal-bone) !important;
    box-shadow:inset 3px 0 0 var(--modal-accent-note),0 10px 22px rgba(0,0,0,.25) !important;
}
#templateWindow .templateBtn[data-template="npc"]{box-shadow:inset 3px 0 0 var(--modal-accent-npc),0 10px 22px rgba(0,0,0,.25) !important}
#templateWindow .templateBtn[data-template="monster"]{box-shadow:inset 3px 0 0 var(--modal-accent-monster),0 10px 22px rgba(0,0,0,.25) !important}
#templateWindow .templateBtn[data-template="initiative"]{box-shadow:inset 3px 0 0 var(--modal-accent-initiative),0 10px 22px rgba(0,0,0,.25) !important}
#templateWindow .templateBtn[data-template="character"],
#templateWindow .templateBtn.templateCharacterBtn{box-shadow:inset 3px 0 0 var(--modal-accent-character),0 10px 22px rgba(0,0,0,.25) !important}
#templateWindow .templateBtn:nth-child(2),
#templateWindow .templateBtn:nth-child(5){
    background:linear-gradient(160deg,#222b26,#181f1b) !important;
}
#templateWindow .templateBtn:hover,
#templateWindow .templateBtn:focus-visible{
    border-color:rgba(232,197,106,.55) !important;
    filter:brightness(1.08);
    transform:translateY(-2px) !important;
}
#templateWindow .templateBtn strong{color:var(--modal-bone) !important}
#templateWindow .templateBtn small{color:var(--modal-muted) !important}
.templateChoiceIcon,
.templateChoiceIconSvg{
    border:1px solid rgba(196,165,116,.35) !important;
    background:rgba(12,16,14,.55) !important;
    color:#e8c56a !important;
    border-radius:8px !important;
}
.templateChoiceIconSvg .dmsPanelSvg,
.templateChoiceIcon .dmsPanelSvg{
    width:28px;
    height:28px;
}
#templateWindow .templateBtn[data-template="npc"] .templateChoiceIcon{color:var(--modal-accent-npc) !important;border-color:rgba(127,155,176,.45) !important}
#templateWindow .templateBtn[data-template="monster"] .templateChoiceIcon{color:var(--modal-accent-monster) !important;border-color:rgba(181,82,58,.5) !important}
#templateWindow .templateBtn[data-template="initiative"] .templateChoiceIcon{color:var(--modal-accent-initiative) !important;border-color:rgba(212,160,74,.5) !important}
#templateWindow .templateBtn[data-template="character"] .templateChoiceIcon,
#templateWindow .templateBtn.templateCharacterBtn .templateChoiceIcon{color:var(--modal-accent-character) !important;border-color:rgba(192,132,74,.5) !important}

/* Library / chooser tools and cards */
.monsterLibraryTools,
.npcLibraryTools,
.panelChooserTools,
.mapLibraryTools,
.pdfLibraryTools,
.spellbookToolbar,
.lootManagerToolbar,
.partyManagerToolbar{
    background:#1a221d !important;
    border-bottom:1px solid rgba(196,165,116,.22) !important;
}
#monsterLibrarySearch,
#npcLibrarySearch,
#panelChooserSearch,
#mapLibrarySearch,
#pdfLibrarySearch,
#partyManagerSearch,
.monsterLibraryFilterRow select,
.npcLibraryTools select,
.mapLibraryTools select,
.pdfLibraryTools select{
    border:1px solid rgba(196,165,116,.32) !important;
    background:#121916 !important;
    color:var(--modal-bone) !important;
    border-radius:8px !important;
}
#monsterLibraryCount,
#npcLibraryCount,
#mapLibraryCount,
#pdfLibraryCount,
.partyManagerStatus{
    background:#141c18 !important;
    color:var(--modal-muted) !important;
    border-bottom:1px solid rgba(196,165,116,.18) !important;
}
#panelChooserAddBtn,
#monsterLibraryCardViewBtn,
#monsterLibraryListViewBtn,
.monsterLibraryCardActions button,
.npcLibraryOpenBtn,
.panelChooserOpenBtn,
.partyManagerToolbar button,
.partyCharacterActions button{
    border:1px solid rgba(196,165,116,.4) !important;
    background:linear-gradient(180deg,#2a342d,#1e2722) !important;
    color:#e8c56a !important;
    border-radius:8px !important;
}
.monsterLibraryCardActions .monsterLibraryInitiativeBtn,
.partyManagerToolbar #createPartyCharacterBtn,
.partyCharacterActions button:not(.danger){
    background:linear-gradient(180deg,#3a2f1c,#2a2318) !important;
    border-color:rgba(197,165,97,.55) !important;
}
.monsterLibraryDeleteBtn,
.npcLibraryDeleteBtn,
.panelChooserDeleteBtn,
.partyCharacterActions .danger{
    background:linear-gradient(180deg,#5a2a22,#3d1c18) !important;
    border-color:rgba(181,82,58,.55) !important;
    color:#f3d4cc !important;
}

.monsterLibraryCard,
.npcLibraryCard,
.panelChooserItem,
.mapLibraryCard,
.pdfLibraryCard,
.partyCharacterCard{
    border:1px solid rgba(196,165,116,.28) !important;
    border-radius:10px !important;
    background:linear-gradient(165deg,#f4f0e6,#e9e2d2) !important;
    color:var(--modal-bone-ink) !important;
    box-shadow:0 10px 24px rgba(0,0,0,.22) !important;
}
.monsterLibraryCardTop,
.npcLibraryCardTop,
.partyCharacterCardHeader{
    background:linear-gradient(135deg,#2a2118,#1a221d 70%) !important;
    color:var(--modal-bone) !important;
    border-bottom:1px solid rgba(196,165,116,.28) !important;
}
.monsterLibraryCardTitle h3,
.npcLibraryCardTitle h3,
.partyCharacterCardHeader h3,
.panelChooserOpenBtn span:last-child{
    color:var(--modal-bone) !important;
}
.monsterLibraryCardTitle p,
.npcLibraryCardTitle p,
.partyCharacterCardHeader p,
.panelChooserOpenBtn small{
    color:rgba(243,239,230,.72) !important;
}
.monsterLibraryCardIcon,
.npcLibraryPortraitPlaceholder,
.panelChooserIcon{
    color:#e8c56a !important;
}
.monsterLibraryCardIcon .dmsPanelSvg,
.npcLibraryPortraitPlaceholder .dmsPanelSvg,
.panelChooserIcon .dmsPanelSvg,
.partyCharacterPortraitFallback .dmsPanelSvg{
    width:28px;
    height:28px;
}
.monsterLibraryStats,
.npcLibraryStats,
.partyCharacterQuickStats{
    background:transparent !important;
    gap:8px !important;
}
.monsterLibraryStats span,
.npcLibraryStats span,
.partyCharacterQuickStats div{
    background:rgba(28,25,21,.06) !important;
    border:1px solid rgba(122,78,42,.18) !important;
    border-radius:8px !important;
    color:#4a4034 !important;
}
.monsterLibraryStats strong,
.npcLibraryStats strong,
.partyCharacterQuickStats b{
    color:var(--modal-bone-ink) !important;
}
.partyCharacterQuickStats span,
.monsterLibraryStats span span,
.npcLibraryStats span span{color:#7a6c58 !important}
.partyCharacterMeta,
.npcLibraryMeta{color:#5a4f40 !important;background:transparent !important}
.partyCharacterActions{
    background:rgba(28,25,21,.04) !important;
    border-top:1px solid rgba(122,78,42,.2) !important;
}
.monsterLibraryEmpty,
.npcLibraryEmpty,
.panelChooserEmpty,
.partyCharacterEmpty,
.mapLibraryEmpty,
.pdfLibraryEmpty{
    border:1px dashed rgba(196,165,116,.45) !important;
    background:rgba(18,25,22,.55) !important;
    color:var(--modal-muted) !important;
}
.monsterLibraryEmpty strong,
.npcLibraryEmpty strong,
.partyCharacterEmpty strong{color:#e8c56a !important}
.monsterLibraryEmpty .dmsPanelSvg,
.npcLibraryEmpty .dmsPanelSvg{color:#e8c56a}

.partyManagerToolbar{
    background:#1a221d !important;
}
.partyManagerToolbar input{
    background:#121916 !important;
    color:var(--modal-bone) !important;
    border:1px solid rgba(196,165,116,.32) !important;
}
.partyOriginBadge{
    background:rgba(197,165,97,.18) !important;
    color:#e8c56a !important;
    border-radius:6px !important;
}
.partyCharacterPortrait{
    border-radius:8px !important;
    border:2px solid rgba(196,165,116,.55) !important;
    background:#2a2318 !important;
}

/* Home / side panel icons: cleaner stroke weight */
.dmsPanelSvg,
.sidePanelButtonIcon .dmsPanelSvg,
.panelIcon .dmsPanelSvg{
    stroke-width:2.6;
}
#homeGrid .panelIcon,
#homeGrid .panelCharacterFallback,
#homeGrid .panelCharacterCreatorFallback{
    color:#e8c56a !important;
}

/* =========================================================
   Map viewer as a full page (1.8.93)
   ========================================================= */
#editor:has(.dm-map-root){
    padding:0 !important;
    overflow:hidden !important;
    display:flex !important;
    flex-direction:column !important;
    min-height:calc(100vh - var(--real-header-height,76px) - 52px) !important;
    height:calc(100vh - var(--real-header-height,76px) - 52px) !important;
    background:#0f1512 !important;
}
#editor:has(.dm-map-root) .dm-map-root,
#editor .dm-map-root{
    display:flex !important;
    flex-direction:column !important;
    flex:1 1 auto !important;
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
    background:#0f1512 !important;
}
#editor .dm-map-toolbar{
    position:relative !important;
    top:auto !important;
    flex:0 0 auto !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:12px !important;
    min-height:46px !important;
    padding:8px 14px !important;
    margin:0 !important;
    border:0 !important;
    border-bottom:1px solid rgba(196,165,116,.28) !important;
    border-radius:0 !important;
    background:linear-gradient(180deg,#1a221d,#141c18) !important;
    box-shadow:none !important;
}
#editor .dm-map-toolbar-title{
    display:flex;
    flex-direction:column;
    gap:1px;
    min-width:0;
}
#editor .dm-map-toolbar-title strong{
    color:#f3efe6 !important;
    font:400 18px/1.1 var(--font-title) !important;
    letter-spacing:.04em;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
#editor .dm-map-toolbar-title small{
    color:var(--modal-muted,#9aa79d) !important;
    font:italic 400 12px/1.2 var(--font-old) !important;
}
#editor .dm-map-toolbar-actions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:flex-end;
    gap:6px;
}
#editor .dm-map-toolbar button{
    min-height:32px !important;
    padding:5px 10px !important;
    border:1px solid rgba(196,165,116,.35) !important;
    border-radius:6px !important;
    background:#1c2621 !important;
    color:#f3efe6 !important;
}
#editor .dm-map-toolbar button.active{
    border-color:rgba(232,197,106,.7) !important;
    background:#2a3428 !important;
    color:#e8c56a !important;
    box-shadow:none !important;
}
#editor .dm-map-zoom-label{color:#e8c56a !important;min-width:48px !important}
#editor .dm-map-status{
    position:absolute !important;
    top:58px !important;
    left:50% !important;
    transform:translateX(-50%);
    z-index:40 !important;
    width:max-content !important;
    max-width:min(520px,90%);
    min-height:0 !important;
    padding:8px 14px !important;
    margin:0 !important;
    border:1px solid rgba(196,165,116,.45) !important;
    border-radius:8px !important;
    background:rgba(18,25,22,.92) !important;
    color:#f3efe6 !important;
    box-shadow:0 12px 30px rgba(0,0,0,.35);
    pointer-events:none;
}
#editor .dm-map-status[hidden]{display:none !important}
#editor .dm-map-workspace{
    position:relative !important;
    flex:1 1 auto !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    overflow:hidden !important;
    border:0 !important;
    background:#0b100e !important;
}
#editor .dm-map-viewport{
    inset:0 !important;
    background:#0b100e !important;
}
#editor .dm-map-sidebar{
    background:linear-gradient(180deg,#1a221d,#141c18) !important;
    border-right:1px solid rgba(196,165,116,.28) !important;
    color:#f3efe6 !important;
}
#editor .dm-map-information,
#editor .mapPanelInformation{display:none !important}
#editor:has(.dm-map-root) .mapPanelToolbar + .mapPanelStatus + .mapPanelViewport,
#editor:has(.dm-map-root) .mapPanelViewport{
    height:auto !important;
    max-height:none !important;
}
@media(max-width:720px){
    #editor:has(.dm-map-root){
        height:calc(100vh - var(--real-header-height,76px) - 44px) !important;
    }
    #editor .dm-map-toolbar{flex-wrap:wrap}
}

/* =========================================================
   Generators windows 1.8.98 — full inner UI, not just labels
   ========================================================= */

/* Shared shell */
#encounterBuilderWindow,
#questManagerWindow,
#questEditorWindow,
#adventureBuilderWindow,
#adventureNodeEditorWindow,
#lootManagerWindow,
#lootGeneratorWindow,
#lootEditorWindow,
#generatorsWindow{
    background:rgba(8,12,10,.84) !important;
}

#encounterBuilderWindow .encounterBuilderBox,
#questManagerWindow .questManagerBox,
#questEditorWindow .questEditorBook,
#adventureBuilderWindow .adventureBuilderBox,
#adventureNodeEditorWindow .adventureNodeEditorBook,
#lootManagerWindow .lootManagerBox,
#lootGeneratorWindow .lootGeneratorBox,
#lootEditorWindow .lootEditorBook,
#generatorsWindow > .dmxBox{
    border:1px solid rgba(196,165,116,.45) !important;
    border-color:rgba(196,165,116,.45) !important;
    border-radius:10px !important;
    background:linear-gradient(165deg,#1d2621 0%,#141b17 100%) !important;
    box-shadow:0 28px 80px rgba(0,0,0,.55),inset 0 0 0 1px rgba(196,165,116,.12) !important;
    color:#f3efe6 !important;
}

body > :is(#encounterBuilderWindow,#questManagerWindow,#questEditorWindow,#adventureBuilderWindow,#adventureNodeEditorWindow,#lootManagerWindow,#lootGeneratorWindow,#lootEditorWindow,#generatorsWindow) > :is([class$="Box"],[class$="Book"])::after{
    border-image:none !important;
    border:1px solid rgba(196,165,116,.14) !important;
    inset:6px !important;
}

/* Headers / close */
#encounterBuilderWindow .encounterBuilderHeader,
#questManagerWindow .questManagerHeader,
#questEditorWindow .questEditorHeader,
#adventureBuilderWindow .adventureBuilderHeader,
#adventureNodeEditorWindow .adventureNodeEditorHeader,
#lootManagerWindow .lootManagerHeader,
#lootGeneratorWindow .lootGeneratorHeader,
#generatorsWindow .dmxHeader{
    background:linear-gradient(180deg,#1c2620,#141c18) !important;
    border-bottom:1px solid rgba(196,165,116,.28) !important;
}
#encounterBuilderWindow .encounterBuilderHeader h2,
#questManagerWindow .questManagerHeader h2,
#questEditorWindow .questEditorHeader h2,
#adventureBuilderWindow .adventureBuilderHeader h2,
#adventureNodeEditorWindow .adventureNodeEditorHeader h2,
#lootManagerWindow .lootManagerHeader h2,
#lootGeneratorWindow .lootGeneratorHeader h2,
#generatorsWindow .dmxTitle h2{
    color:#e8c56a !important;
}
#encounterBuilderWindow .encounterBuilderHeader p,
#questManagerWindow .questManagerHeader p,
#questEditorWindow .questEditorHeader p,
#adventureBuilderWindow .adventureBuilderHeader p,
#lootManagerWindow .lootManagerHeader p,
#lootGeneratorWindow .lootGeneratorHeader p,
#generatorsWindow .dmxTitle span{
    color:#9aa79d !important;
}
#encounterBuilderWindow #closeEncounterBuilder,
#questManagerWindow #closeQuestManager,
#questEditorWindow #closeQuestEditor,
#adventureBuilderWindow #closeAdventureBuilder,
#adventureNodeEditorWindow #closeAdventureNodeEditor,
#lootManagerWindow #closeLootManager,
#lootGeneratorWindow #closeLootGenerator,
#generatorsWindow .dmxClose{
    background:#2a1a16 !important;
    border:1px solid rgba(181,82,58,.55) !important;
    color:#f0cfc4 !important;
    border-radius:6px !important;
}

/* -------- Random Generators -------- */
#generatorsWindow .dmxTabs{
    background:#161e19 !important;
    border-right:1px solid rgba(196,165,116,.22) !important;
}
#generatorsWindow .dmxTabs button{
    color:#d7d1c4 !important;
    background:transparent !important;
    border:1px solid transparent !important;
}
#generatorsWindow .dmxTabs button[data-dmx-tab="names"]{box-shadow:inset 3px 0 0 #c5a561 !important}
#generatorsWindow .dmxTabs button[data-dmx-tab="npc"]{box-shadow:inset 3px 0 0 #7f9bb0 !important}
#generatorsWindow .dmxTabs button[data-dmx-tab="tavern"]{box-shadow:inset 3px 0 0 #c0844a !important}
#generatorsWindow .dmxTabs button[data-dmx-tab="rumors"]{box-shadow:inset 3px 0 0 #d4c4a0 !important}
#generatorsWindow .dmxTabs button[data-dmx-tab="encounter"]{box-shadow:inset 3px 0 0 #b5523a !important}
#generatorsWindow .dmxTabs button[data-dmx-tab="weather"]{box-shadow:inset 3px 0 0 #6f8fbf !important}
#generatorsWindow .dmxTabs button[data-dmx-tab="dungeon"]{box-shadow:inset 3px 0 0 #8d6bb0 !important}
#generatorsWindow .dmxTabs button[data-dmx-tab="loot"]{box-shadow:inset 3px 0 0 #e0b44a !important}
#generatorsWindow .dmxTabs button:hover{
    background:rgba(243,239,230,.06) !important;
    color:#f3efe6 !important;
}
#generatorsWindow .dmxTabs button.active{
    background:#f4f0e6 !important;
    color:#1c1915 !important;
    border-color:rgba(196,165,116,.45) !important;
}
#generatorsWindow .dmxOptions{
    background:#1a221d !important;
    border-bottom:1px solid rgba(196,165,116,.22) !important;
}
#generatorsWindow .dmxOptions label{color:#b9c3bb !important}
#generatorsWindow .dmxOptions select,
#generatorsWindow .dmxApply select,
#generatorsWindow .dmxSearch{
    background:#121916 !important;
    color:#f3efe6 !important;
    border:1px solid rgba(196,165,116,.38) !important;
}
#generatorsWindow .dmxPrimary,
#generatorsWindow .dmxGhost,
#generatorsWindow .dmxMini,
#generatorsWindow .dmxApply button{
    background:linear-gradient(180deg,#3a2f1c,#2a2318) !important;
    color:#e8c56a !important;
    border:1px solid rgba(197,165,97,.55) !important;
    box-shadow:none !important;
}
#generatorsWindow .dmxPrimary{
    border-color:rgba(197,165,97,.7) !important;
}
#generatorsWindow .dmxGhost:hover,
#generatorsWindow .dmxMini:hover,
#generatorsWindow .dmxApply button:hover,
#generatorsWindow .dmxPrimary:hover{
    filter:brightness(1.14);
    color:#f3e2a8 !important;
}
#generatorsWindow .dmxMini:disabled{
    opacity:.55;
    filter:none;
    cursor:default;
}
/* Name / copy chips — clickable, but not brass action buttons */
#generatorsWindow .dmxChips{
    gap:10px 12px !important;
    margin-top:4px !important;
}
#generatorsWindow .dmxChip{
    background:#fbf7ee !important;
    color:#3a2a1c !important;
    border:1px solid rgba(122,78,42,.28) !important;
    border-radius:999px !important;
    box-shadow:none !important;
    filter:none !important;
    font-weight:600 !important;
    padding:8px 14px !important;
}
#generatorsWindow .dmxChip:hover,
#generatorsWindow .dmxChip:focus-visible{
    background:#fff !important;
    color:#6b3a24 !important;
    border-color:rgba(180,85,45,.45) !important;
    filter:none !important;
}
#generatorsWindow .dmxContent,
#generatorsWindow .dmxMain{background:#121916 !important}
#generatorsWindow .dmxCard{
    background:linear-gradient(165deg,#f6f1e6,#e7dfcc) !important;
    color:#1c1915 !important;
    border:1px solid rgba(122,78,42,.28) !important;
    box-shadow:0 10px 24px rgba(0,0,0,.22) !important;
}
#generatorsWindow .dmxCard h3,
#generatorsWindow .dmxCard h3 small{color:#6b3a24 !important}
#generatorsWindow .dmxCard p,
#generatorsWindow .dmxCard li,
#generatorsWindow .dmxRows dd{color:#1c1915 !important}
#generatorsWindow .dmxCard strong{color:#3a2a1c !important}
#generatorsWindow .dmxRows dt,
#generatorsWindow .dmxTable th{color:#7a5a32 !important}
#generatorsWindow .dmxTable td{color:#1c1915 !important;border-bottom-color:rgba(122,78,42,.2) !important}
#generatorsWindow .dmxEmpty,
#generatorsWindow .dmxResultCount,
#generatorsWindow .dmxFooter,
#generatorsWindow .dmxNote{color:#9aa79d !important}
#generatorsWindow .dmxEmpty strong{color:#e8c56a !important}
#generatorsWindow .dmxFooter{
    background:#141c18 !important;
    border-top:1px solid rgba(196,165,116,.22) !important;
}
#generatorsWindow .dmxApply{border-top-color:rgba(122,78,42,.28) !important;color:#5a4f40 !important}

/* -------- Encounter Builder -------- */
#encounterBuilderWindow .encounterBuilderLayout{
    background:transparent !important;
}
#encounterBuilderWindow .encounterMonsterPicker,
#encounterBuilderWindow .encounterDraftSection,
#encounterBuilderWindow .savedEncountersSection,
#encounterBuilderWindow .encounterPartyPicker{
    background:#1a221d !important;
    border:1px solid rgba(196,165,116,.28) !important;
    border-radius:10px !important;
    color:#f3efe6 !important;
}
#encounterBuilderWindow .encounterBuilderLayout h3,
#encounterBuilderWindow .encounterNameLabel,
#encounterBuilderWindow .encounterSummary,
#encounterBuilderWindow .encounterPartyHeading h3{
    color:#e8c56a !important;
}
#encounterBuilderWindow .encounterPartyHeading small,
#encounterBuilderWindow .encounterDraftEmpty,
#encounterBuilderWindow .savedEncounterEmpty{
    color:#9aa79d !important;
}
#encounterBuilderWindow #encounterMonsterSearch,
#encounterBuilderWindow #encounterNameInput,
#encounterBuilderWindow input,
#encounterBuilderWindow select{
    background:#121916 !important;
    color:#f3efe6 !important;
    border:1px solid rgba(196,165,116,.35) !important;
    border-radius:8px !important;
}
#encounterBuilderWindow .encounterMonsterRow,
#encounterBuilderWindow .encounterDraftRow,
#encounterBuilderWindow .savedEncounterCard,
#encounterBuilderWindow .encounterPartyCharacter{
    background:linear-gradient(165deg,#f4f0e6,#e9e2d2) !important;
    border:1px solid rgba(196,165,116,.3) !important;
    border-radius:10px !important;
    color:#1c1915 !important;
    box-shadow:0 8px 18px rgba(0,0,0,.18) !important;
}
#encounterBuilderWindow .encounterMonsterRow strong,
#encounterBuilderWindow .encounterDraftMonsterInfo strong,
#encounterBuilderWindow .savedEncounterCard h4,
#encounterBuilderWindow .encounterPartyCharacter strong{
    color:#6b3a24 !important;
}
#encounterBuilderWindow .encounterMonsterRow span,
#encounterBuilderWindow .encounterDraftMonsterInfo span,
#encounterBuilderWindow .savedEncounterCardHeader span,
#encounterBuilderWindow .encounterPartyCharacter small,
#encounterBuilderWindow .encounterMonsterQuickStats{
    color:#5a4f40 !important;
}
#encounterBuilderWindow .savedEncounterPreview span{
    background:#efe4c2 !important;
    color:#3a2a1c !important;
}
#encounterBuilderWindow .encounterMonsterRow button,
#encounterBuilderWindow .encounterQuantityControl button,
#encounterBuilderWindow .savedEncounterActions button,
#encounterBuilderWindow .encounterPartyCharacter button,
#encounterBuilderWindow .encounterPartyHeading button,
#encounterBuilderWindow #clearEncounterBtn,
#encounterBuilderWindow .encounterPrimaryActions button,
#encounterBuilderWindow #saveEncounterBtn,
#encounterBuilderWindow #startEncounterBtn{
    border:1px solid rgba(196,165,116,.45) !important;
    border-radius:8px !important;
    background:linear-gradient(180deg,#3a2f1c,#2a2318) !important;
    color:#e8c56a !important;
}
#encounterBuilderWindow #startEncounterBtn,
#encounterBuilderWindow .startSavedEncounter{
    background:linear-gradient(180deg,#4a3420,#2f2418) !important;
}
#encounterBuilderWindow .encounterRemoveMonster,
#encounterBuilderWindow #clearEncounterBtn{
    background:linear-gradient(180deg,#5a2a22,#3d1c18) !important;
    border-color:rgba(181,82,58,.55) !important;
    color:#f3d4cc !important;
}
#encounterBuilderWindow .encounterDraftEmpty,
#encounterBuilderWindow .savedEncounterEmpty{
    border:1px dashed rgba(196,165,116,.4) !important;
    background:rgba(18,25,22,.45) !important;
}

/* -------- Quest Manager / Editor -------- */
#questManagerWindow .questManagerToolbar,
#questManagerWindow .questManagerStats{
    background:#161410 !important;
    border:1px solid rgba(196,165,116,.32) !important;
    border-radius:10px !important;
}
#questManagerWindow .questManagerToolbar input,
#questManagerWindow .questManagerToolbar select,
#questEditorWindow .questEditorBody input,
#questEditorWindow .questEditorBody select,
#questEditorWindow .questEditorBody textarea{
    background:#0f0e0c !important;
    color:#f3efe6 !important;
    border:1px solid rgba(196,165,116,.4) !important;
}
#questManagerWindow .questManagerToolbar button,
#questEditorWindow .questSectionHeading button,
#questEditorWindow .questEditorFooter button,
#questManagerWindow .questOpenBtn{
    background:linear-gradient(180deg,#3a2f1c,#2a2318) !important;
    border:1px solid rgba(197,165,97,.55) !important;
    color:#e8c56a !important;
    border-radius:8px !important;
}
#questManagerWindow .questManagerStats article{
    background:linear-gradient(165deg,#f4f0e6,#e9e2d2) !important;
    border:1px solid rgba(196,165,116,.35) !important;
    box-shadow:0 8px 18px rgba(0,0,0,.22) !important;
}
#questManagerWindow .questManagerStats strong{color:#6b3a24 !important}
#questManagerWindow .questManagerStats span{color:#5a4f40 !important}
#questManagerWindow .questManagerList{
    background:#12100e !important;
}
#questManagerWindow .questManagerEmpty{
    background:linear-gradient(165deg,#f4f0e6,#e9e2d2) !important;
    border:1px dashed rgba(196,165,116,.45) !important;
    color:#5a4f40 !important;
    border-radius:10px !important;
}
#questManagerWindow .questManagerCard{
    background:linear-gradient(165deg,#f4f0e6,#e9e2d2) !important;
    border:1px solid rgba(196,165,116,.3) !important;
    color:#1c1915 !important;
    box-shadow:0 10px 24px rgba(0,0,0,.2) !important;
}
#questManagerWindow .questCardTop h3,
#questEditorWindow .questSectionHeading h3,
#questEditorWindow .questEditorBody label{
    color:#6b3a24 !important;
}
#questManagerWindow .questCardTop p,
#questManagerWindow .questCardDescription,
#questManagerWindow .questCardMeta,
#questManagerWindow .questManagerEmpty{
    color:#5a4f40 !important;
}
#questManagerWindow .questTypeBadge,
#questManagerWindow .questStatusBadge{
    background:#3a2f1c !important;
    color:#e8c56a !important;
    border-radius:6px !important;
}
#questManagerWindow .questCardProgress > div{background:rgba(28,25,21,.12) !important}
#questManagerWindow .questCardProgress i{background:#c5a561 !important}
#questEditorWindow .questEditorBook{
    background:linear-gradient(165deg,#f6f1e6,#e7dfcc) !important;
    color:#1c1915 !important;
}
#questEditorWindow .questObjectivesSection,
#questEditorWindow .questRelationsSection{
    background:rgba(28,25,21,.06) !important;
    border:1px solid rgba(196,165,116,.28) !important;
}
#questEditorWindow .questSectionHeading span{color:#7a5a32 !important}

/* -------- Adventure Builder -------- */
#adventureBuilderWindow .adventureBuilderToolbar,
#adventureBuilderWindow #adventureBuilderStatus{
    background:#161410 !important;
    border:1px solid rgba(196,165,116,.32) !important;
    border-radius:10px !important;
    color:#c9c0b0 !important;
}
#adventureBuilderWindow .adventureBuilderToolbar input,
#adventureBuilderWindow .adventureBuilderToolbar select{
    background:#0f0e0c !important;
    color:#f3efe6 !important;
    -webkit-text-fill-color:#f3efe6 !important;
    border:1px solid rgba(196,165,116,.4) !important;
    border-radius:8px !important;
}
#adventureBuilderWindow .adventureBuilderToolbar button{
    background:linear-gradient(180deg,#3a2f1c,#2a2318) !important;
    border:1px solid rgba(197,165,97,.55) !important;
    color:#e8c56a !important;
    border-radius:8px !important;
}
#adventureBuilderWindow #deleteAdventureBtn,
#adventureBuilderWindow #deleteAdventureSelectionBtn{
    background:linear-gradient(180deg,#5a2a22,#3d1c18) !important;
    border-color:rgba(181,82,58,.55) !important;
    color:#f3d4cc !important;
}
#adventureNodeEditorWindow .adventureNodeEditorBook{
    background:linear-gradient(165deg,#f6f1e6,#e7dfcc) !important;
    color:#1c1915 !important;
}
#adventureNodeEditorWindow .adventureNodeEditorHeader{
    background:linear-gradient(180deg,#1c2620,#141c18) !important;
    border-bottom:1px solid rgba(196,165,116,.28) !important;
}
#adventureNodeEditorWindow .adventureNodeEditorHeader h2{color:#e8c56a !important}
#adventureNodeEditorWindow .adventureNodeEditorForm label{color:#6b3a24 !important}
#adventureNodeEditorWindow .adventureNodeEditorForm input,
#adventureNodeEditorWindow .adventureNodeEditorForm select,
#adventureNodeEditorWindow .adventureNodeEditorForm textarea{
    background:#fffdf8 !important;
    color:#1c1915 !important;
    border:1px solid rgba(122,78,42,.35) !important;
    border-radius:8px !important;
}
#adventureNodeEditorWindow .adventureNodeEditorFooter{
    background:#efe6d2 !important;
    border-top:1px solid rgba(196,165,116,.28) !important;
}
#adventureNodeEditorWindow .adventureNodeEditorFooter button{
    background:linear-gradient(180deg,#3a2f1c,#2a2318) !important;
    border:1px solid rgba(197,165,97,.55) !important;
    color:#e8c56a !important;
    border-radius:8px !important;
}
#adventureBuilderWindow #adventureCanvasViewport{
    background-color:#0b100e !important;
    background-image:
        linear-gradient(rgba(196,165,116,.06) 1px,transparent 1px),
        linear-gradient(90deg,rgba(196,165,116,.06) 1px,transparent 1px) !important;
    background-size:80px 80px,80px 80px !important;
}
#adventureBuilderWindow .adventureNode{
    background:linear-gradient(165deg,#f4f0e6,#e9e2d2) !important;
    color:#1c1915 !important;
    border:1px solid rgba(196,165,116,.35) !important;
    box-shadow:0 10px 22px rgba(0,0,0,.28) !important;
}
#adventureBuilderWindow .adventureNode h3{color:#6b3a24 !important}
#adventureBuilderWindow .adventureNode p{color:#5a4f40 !important}
#adventureBuilderWindow .adventureNodeEditBtn{
    background:linear-gradient(180deg,#3a2f1c,#2a2318) !important;
    border:1px solid rgba(197,165,97,.55) !important;
    color:#e8c56a !important;
    border-radius:6px !important;
}
#adventureBuilderWindow .adventureNodeTop{
    border-bottom-color:rgba(196,165,116,.3) !important;
}
#adventureBuilderWindow .adventureNodeTop small{color:#7a5a32 !important}
#adventureBuilderWindow .adventureNode-start{--node-accent:#4f835d}
#adventureBuilderWindow .adventureNode-end{--node-accent:#b5523a}
#adventureBuilderWindow .adventureNode-encounter{--node-accent:#b5523a}
#adventureBuilderWindow .adventureNode-loot{--node-accent:#c5a561}
#adventureBuilderWindow .adventureNode-npc{--node-accent:#7f9bb0}
#adventureBuilderWindow .adventureConnection{stroke:#9aa79d !important}
#adventureBuilderWindow .adventureConnection:hover,
#adventureBuilderWindow .adventureConnection.selected{stroke:#e8c56a !important}

/* -------- Loot windows -------- */
#lootManagerWindow .lootManagerToolbar,
#lootManagerWindow .lootManagerStats,
#lootGeneratorWindow .lootGeneratorForm,
#lootGeneratorWindow .lootGeneratorActions{
    background:#1a221d !important;
    border-color:rgba(196,165,116,.28) !important;
}
#lootManagerWindow input,
#lootManagerWindow select,
#lootGeneratorWindow input,
#lootGeneratorWindow select{
    background:#121916 !important;
    color:#f3efe6 !important;
    border:1px solid rgba(196,165,116,.35) !important;
}
#lootManagerWindow .lootManagerCard,
#lootManagerWindow .lootItemCard{
    background:linear-gradient(165deg,#f4f0e6,#e9e2d2) !important;
    color:#1c1915 !important;
    border:1px solid rgba(196,165,116,.3) !important;
}
#lootManagerWindow button,
#lootGeneratorWindow button,
#lootManagerWindow #generateLootBtn,
#lootGeneratorWindow #createGeneratedLootBtn{
    background:linear-gradient(180deg,#3a2f1c,#2a2318) !important;
    border:1px solid rgba(197,165,97,.55) !important;
    color:#e8c56a !important;
    border-radius:8px !important;
}
#lootGeneratorWindow #cancelLootGeneratorBtn{
    background:#2a2318 !important;
    color:#f3efe6 !important;
}
#lootGeneratorWindow .lootGeneratorForm label{color:#b9c3bb !important}

/* Flyout accents for the four Generators entries */
#rnlFlyout[data-menu="generators"]{
    background:#161e19 !important;
    border-color:rgba(196,165,116,.42) !important;
}
#rnlFlyout[data-menu="generators"] button{color:#f3efe6 !important}
#rnlFlyout[data-menu="generators"] button[data-press="floatingGeneratorsBtn"]{box-shadow:inset 3px 0 0 #c5a561 !important}
#rnlFlyout[data-menu="generators"] button[data-press="encounterBuilderBtn"]{box-shadow:inset 3px 0 0 #b5523a !important}
#rnlFlyout[data-menu="generators"] button[data-press="questManagerBtn"]{box-shadow:inset 3px 0 0 #7f9bb0 !important}
#rnlFlyout[data-menu="generators"] button[data-press="adventureBuilderBtn"]{box-shadow:inset 3px 0 0 #c0844a !important}
#rnlFlyout[data-menu="generators"] button:hover,
#rnlFlyout[data-menu="generators"] button:focus-visible{
    background:rgba(243,239,230,.08) !important;
    color:#e8c56a !important;
}

/* Flyout accents for Library entries — same side-stripe pattern */
#rnlFlyout[data-menu="library"]{
    background:#161e19 !important;
    border-color:rgba(196,165,116,.42) !important;
}
#rnlFlyout[data-menu="library"] button{color:#f3efe6 !important}
#rnlFlyout[data-menu="library"] button[data-press="npcLibraryBtn"]{box-shadow:inset 3px 0 0 #7f9bb0 !important}
#rnlFlyout[data-menu="library"] button[data-press="monsterLibraryBtn"]{box-shadow:inset 3px 0 0 #b5523a !important}
#rnlFlyout[data-menu="library"] button[data-press="mapLibraryBtn"]{box-shadow:inset 3px 0 0 #6f8fbf !important}
#rnlFlyout[data-menu="library"] button[data-press="pdfLibraryBtn"]{box-shadow:inset 3px 0 0 #c0844a !important}
#rnlFlyout[data-menu="library"] button[data-press="worldDatabaseBtn"]{box-shadow:inset 3px 0 0 #4f7d5c !important}
#rnlFlyout[data-menu="library"] button[data-press="floatingSpellsBtn"]{box-shadow:inset 3px 0 0 #8d6bb0 !important}
#rnlFlyout[data-menu="library"] button[data-press="openPanelBtn"]{box-shadow:inset 3px 0 0 #c5a561 !important}
#rnlFlyout[data-menu="library"] button:hover,
#rnlFlyout[data-menu="library"] button:focus-visible{
    background:rgba(243,239,230,.08) !important;
    color:#e8c56a !important;
}

/* =========================================================
   World suite 1.8.103 — atlas ink / parchment / brass
   ========================================================= */
#worldDatabaseWindow,
#worldEntryWindow{
    background:rgba(8,12,10,.84) !important;
}

#worldDatabaseWindow .worldDatabaseBox,
#worldEntryWindow .worldEntryBook{
    border:1px solid rgba(196,165,116,.45) !important;
    border-radius:10px !important;
    background:linear-gradient(165deg,#1d2621 0%,#141b17 100%) !important;
    box-shadow:0 28px 80px rgba(0,0,0,.55),inset 0 0 0 1px rgba(196,165,116,.12) !important;
    color:#f3efe6 !important;
}
body > :is(#worldDatabaseWindow,#worldEntryWindow) > :is(.worldDatabaseBox,.worldEntryBook)::after{
    border-image:none !important;
    border:1px solid rgba(196,165,116,.14) !important;
    inset:6px !important;
}

#worldDatabaseWindow .worldDatabaseHeader,
#worldEntryWindow .worldEntryHeader{
    background:linear-gradient(180deg,#1c2620,#141c18) !important;
    border-bottom:1px solid rgba(196,165,116,.28) !important;
}
#worldDatabaseWindow .worldDatabaseHeader h2,
#worldEntryWindow .worldEntryHeader h2{
    color:#e8c56a !important;
    font-family:Cinzel,Georgia,"Palatino Linotype",serif !important;
    letter-spacing:.04em !important;
}
#worldDatabaseWindow .worldDatabaseHeader p,
#worldEntryWindow .worldEntryHeader p{
    color:#9aa79d !important;
}
#worldDatabaseWindow #closeWorldDatabase,
#worldEntryWindow #closeWorldEntryWindow{
    background:#2a1a16 !important;
    border:1px solid rgba(181,82,58,.55) !important;
    color:#f0cfc4 !important;
    border-radius:6px !important;
}

#worldDatabaseWindow .worldDatabaseToolbar{
    background:#161410 !important;
    border-bottom:1px solid rgba(196,165,116,.28) !important;
}
#worldDatabaseWindow .worldDatabaseToolbar input,
#worldDatabaseWindow .worldDatabaseToolbar select{
    background:#0f0e0c !important;
    color:#f3efe6 !important;
    border:1px solid rgba(196,165,116,.4) !important;
    border-radius:8px !important;
    -webkit-text-fill-color:#f3efe6 !important;
}
#worldDatabaseWindow .worldDatabaseToolbar input::placeholder{
    color:#8a8376 !important;
    -webkit-text-fill-color:#8a8376 !important;
}
#worldDatabaseWindow #newWorldEntryBtn{
    background:linear-gradient(180deg,#3a2f1c,#2a2318) !important;
    border:1px solid rgba(197,165,97,.55) !important;
    color:#e8c56a !important;
    border-radius:8px !important;
}

#worldDatabaseWindow .worldCategorySidebar{
    background:#12100e !important;
    border-right:1px solid rgba(196,165,116,.28) !important;
}
#worldDatabaseWindow .worldCategoryHeading{
    background:#161410 !important;
    border-bottom:1px solid rgba(196,165,116,.28) !important;
    color:#e8c56a !important;
    letter-spacing:.12em !important;
}
#worldDatabaseWindow .worldCategoryButton{
    background:transparent !important;
    color:#d7d1c4 !important;
    border:1px solid transparent !important;
    border-radius:8px !important;
}
#worldDatabaseWindow .worldCategoryButton:hover{
    background:rgba(243,239,230,.06) !important;
    color:#f3efe6 !important;
}
#worldDatabaseWindow .worldCategoryButton.active{
    background:linear-gradient(165deg,#f4f0e6,#e9e2d2) !important;
    color:#1c1915 !important;
    border-color:rgba(196,165,116,.35) !important;
}
#worldDatabaseWindow .worldCategoryButton.active .worldCategoryCount{
    background:rgba(28,25,21,.12) !important;
    color:#6b3a24 !important;
}
#worldDatabaseWindow .worldCategoryCount{
    background:rgba(243,239,230,.08) !important;
    color:#c9c0b0 !important;
    border-radius:6px !important;
}
#worldDatabaseWindow .worldCategoryButton[data-world-category="all"]{box-shadow:inset 3px 0 0 #c5a561}
#worldDatabaseWindow .worldCategoryButton[data-world-category="kingdom"],
#worldDatabaseWindow .worldCategoryButton[data-world-category="capital"]{box-shadow:inset 3px 0 0 #c0844a}
#worldDatabaseWindow .worldCategoryButton[data-world-category="city"],
#worldDatabaseWindow .worldCategoryButton[data-world-category="village"]{box-shadow:inset 3px 0 0 #7f9bb0}
#worldDatabaseWindow .worldCategoryButton[data-world-category="dungeon"],
#worldDatabaseWindow .worldCategoryButton[data-world-category="ruins"]{box-shadow:inset 3px 0 0 #8d6bb0}
#worldDatabaseWindow .worldCategoryButton[data-world-category="forest"]{box-shadow:inset 3px 0 0 #4f835d}
#worldDatabaseWindow .worldCategoryButton[data-world-category="mountain"]{box-shadow:inset 3px 0 0 #9aa79d}
#worldDatabaseWindow .worldCategoryButton[data-world-category="water"]{box-shadow:inset 3px 0 0 #6f8fbf}
#worldDatabaseWindow .worldCategoryButton[data-world-category="road"]{box-shadow:inset 3px 0 0 #b8a070}
#worldDatabaseWindow .worldCategoryButton[data-world-category="temple"],
#worldDatabaseWindow .worldCategoryButton[data-world-category="religion"]{box-shadow:inset 3px 0 0 #d4c4a0}
#worldDatabaseWindow .worldCategoryButton[data-world-category="faction"],
#worldDatabaseWindow .worldCategoryButton[data-world-category="guild"]{box-shadow:inset 3px 0 0 #b5523a}
#worldDatabaseWindow .worldCategoryButton[data-world-category="plane"]{box-shadow:inset 3px 0 0 #8d6bb0}
#worldDatabaseWindow .worldCategoryButton[data-world-category="other"]{box-shadow:inset 3px 0 0 #c5a561}

#worldDatabaseWindow .worldDatabaseMain{
    background:#121916 !important;
    color:#f3efe6 !important;
}
#worldDatabaseWindow .worldDatabaseMainHeader{
    background:#161410 !important;
    border-bottom:1px solid rgba(196,165,116,.28) !important;
}
#worldDatabaseWindow .worldDatabaseMainHeader h3{
    color:#e8c56a !important;
    font-family:Cinzel,Georgia,"Palatino Linotype",serif !important;
}
#worldDatabaseWindow .worldDatabaseMainHeader span{
    color:#9aa79d !important;
}

#worldDatabaseWindow .worldEntryCard{
    background:var(--desk-raised,#FCFAF5) !important;
    border:1px solid var(--desk-line,#E2DDD3) !important;
    border-radius:12px !important;
    color:var(--desk-ink,#1C1B18) !important;
    box-shadow:none !important;
}
#worldDatabaseWindow .worldEntryCard.favorite{
    border-color:var(--desk-forest,#2F5D46) !important;
}
#worldDatabaseWindow .worldEntryCard:hover{
    transform:translateY(-2px);
    border-color:var(--desk-forest,#2F5D46) !important;
    box-shadow:none !important;
}
#worldDatabaseWindow .worldFavoriteBtn{
    background:#fff !important;
    color:var(--desk-terracotta,#B4552D) !important;
    border:1px solid var(--desk-line-strong,#CFC8BA) !important;
}
#worldDatabaseWindow .worldEntryCard.favorite .worldFavoriteBtn{
    color:var(--desk-terracotta,#B4552D) !important;
}
#worldDatabaseWindow .worldEntryCardIcon{
    width:48px;height:48px;
    display:grid;place-items:center;
    border-radius:10px;
    background:var(--desk-sunk,#EFEAE0) !important;
    border:1px solid var(--desk-line,#E2DDD3) !important;
    font-size:26px !important;
}
#worldDatabaseWindow .worldEntryCardHeading h3{
    color:var(--desk-ink,#1C1B18) !important;
    font-family:Georgia,"Times New Roman",serif !important;
}
#worldDatabaseWindow .worldEntryCardHeading p,
#worldDatabaseWindow .worldEntrySummary,
#worldDatabaseWindow .worldEntryTags,
#worldDatabaseWindow .worldEntryCardFooter > span{
    color:var(--desk-ink-soft,#57534A) !important;
}
#worldDatabaseWindow .worldEntryFacts span{
    background:#fff !important;
    border:1px solid var(--desk-line,#E2DDD3) !important;
    color:var(--desk-ink,#1C1B18) !important;
    border-radius:8px !important;
}
#worldDatabaseWindow .worldEntryFacts strong{
    color:var(--desk-terracotta,#B4552D) !important;
}
#worldDatabaseWindow .worldEntryCardFooter{
    display:flex !important;
    flex-wrap:wrap !important;
    align-items:center !important;
    gap:10px !important;
}
#worldDatabaseWindow .worldEntryCardActions{
    display:flex !important;
    flex-wrap:wrap !important;
    align-items:center !important;
    gap:8px !important;
    margin-left:auto !important;
}
#worldDatabaseWindow .showOnPlayerBtn,
#worldDatabaseWindow .worldEntryOpenBtn{
    box-sizing:border-box !important;
    min-height:40px !important;
    height:auto !important;
    padding:8px 14px !important;
    border:1px solid var(--desk-line-strong,#CFC8BA) !important;
    border-radius:8px !important;
    background:var(--desk-sunk,#EFEAE0) !important;
    color:var(--desk-ink,#1C1B18) !important;
    font:700 13px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
    box-shadow:none !important;
}
#worldDatabaseWindow .worldEntryOpenBtn{
    background:var(--desk-forest,#2F5D46) !important;
    border-color:var(--desk-forest,#2F5D46) !important;
    color:#fff !important;
}
#worldDatabaseWindow .worldDatabaseEmpty{
    background:linear-gradient(165deg,#f4f0e6,#e9e2d2) !important;
    border:1px dashed rgba(196,165,116,.45) !important;
    border-radius:12px !important;
    color:#5a4f40 !important;
}
#worldDatabaseWindow .worldDatabaseEmpty strong{color:#6b3a24 !important}
#worldDatabaseWindow .worldDatabaseEmptyMark{
    font-size:42px !important;
    color:#c5a561 !important;
    line-height:1;
}

#worldEntryWindow .worldEntryBook{
    background:linear-gradient(165deg,#f6f1e6,#e7dfcc) !important;
    color:#1c1915 !important;
}
#worldEntryWindow .worldEntryHeader{
    background:linear-gradient(180deg,#1c2620,#141c18) !important;
}
#worldEntryWindow .worldEntryForm > label,
#worldEntryWindow .worldEntryGrid label{
    color:#6b3a24 !important;
}
#worldEntryWindow .worldEntryForm input,
#worldEntryWindow .worldEntryForm select,
#worldEntryWindow .worldEntryForm textarea,
#worldEntryWindow .worldEntryGrid input{
    background:#fffdf8 !important;
    color:#1c1915 !important;
    border:1px solid rgba(122,78,42,.35) !important;
    border-radius:8px !important;
}
#worldEntryWindow #worldEntryNotes{
    background:
        repeating-linear-gradient(
            180deg,
            #fffdf8 0,
            #fffdf8 29px,
            rgba(196,165,116,.18) 30px,
            #fffdf8 31px
        ) !important;
}
#worldEntryWindow .worldEntryFooter{
    background:#efe6d2 !important;
    border-top:1px solid rgba(196,165,116,.28) !important;
}
#worldEntryWindow .worldEntryFooter button{
    border:1px solid rgba(197,165,97,.55) !important;
    border-radius:8px !important;
    background:linear-gradient(180deg,#3a2f1c,#2a2318) !important;
    color:#e8c56a !important;
}
#worldEntryWindow #deleteWorldEntryBtn{
    background:linear-gradient(180deg,#5a2a22,#3d1c18) !important;
    border-color:rgba(181,82,58,.55) !important;
    color:#f3d4cc !important;
}
#worldEntryWindow #saveWorldEntryBtn,
#worldEntryWindow #showWorldOnPlayerBtn{
    background:linear-gradient(180deg,#4a3420,#2f2418) !important;
}

@media (max-width:900px){
    #worldDatabaseWindow .worldDatabaseLayout{
        grid-template-columns:1fr !important;
    }
    #worldDatabaseWindow .worldCategorySidebar{
        max-height:160px;
        border-right:none !important;
        border-bottom:1px solid rgba(196,165,116,.28) !important;
    }
}

/* =========================================================
   Global Search 1.8.106 — ink / parchment / brass (not green flood)
   ========================================================= */
#globalSearchWindow{
    background:rgba(8,12,10,.78) !important;
    backdrop-filter:blur(6px);
}
.globalSearchBox{
    width:min(560px,100%) !important;
    max-height:min(68vh,620px) !important;
    border:1px solid rgba(196,165,116,.45) !important;
    border-radius:12px !important;
    background:
        linear-gradient(180deg,rgba(243,239,230,.04),transparent 28%),
        linear-gradient(165deg,#1d2621 0%,#141b17 100%) !important;
    box-shadow:0 28px 80px rgba(0,0,0,.55),inset 0 0 0 1px rgba(196,165,116,.12) !important;
    color:#f3efe6 !important;
}
.globalSearchBox > header{
    padding:16px 16px 0 !important;
    background:transparent !important;
}
.globalSearchBox > header h2{
    color:#e8c56a !important;
    font:700 .78rem/1 Cinzel,Georgia,"Palatino Linotype",serif !important;
    letter-spacing:.18em !important;
    text-transform:uppercase !important;
}
.globalSearchBox > header button{
    border:1px solid rgba(181,82,58,.55) !important;
    border-radius:6px !important;
    background:#2a1a16 !important;
    color:#f0cfc4 !important;
}
.globalSearchBox > header button:hover{
    background:#3a221c !important;
    color:#f8e6df !important;
}
#globalSearchInput{
    margin:14px 16px 10px !important;
    padding:14px 16px !important;
    border:1px solid rgba(196,165,116,.4) !important;
    border-radius:10px !important;
    background:#0f0e0c !important;
    color:#f3efe6 !important;
    -webkit-text-fill-color:#f3efe6 !important;
    font:400 1.05rem/1.3 Georgia,"Palatino Linotype",serif !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.04) !important;
}
#globalSearchInput::placeholder{
    color:#8a8376 !important;
    -webkit-text-fill-color:#8a8376 !important;
}
#globalSearchInput:focus{
    outline:none !important;
    border-color:rgba(232,197,106,.7) !important;
    box-shadow:0 0 0 2px rgba(232,197,106,.18) !important;
}
#globalSearchResults{
    padding:0 10px 14px !important;
}
.globalSearchHint{
    margin:6px 10px 12px !important;
    color:#9aa79d !important;
    font:400 .95rem/1.45 Georgia,"Palatino Linotype",serif !important;
}
.globalSearchResult{
    margin:0 0 6px !important;
    padding:12px 14px !important;
    border:1px solid transparent !important;
    border-radius:10px !important;
    background:transparent !important;
    color:#f3efe6 !important;
}
.globalSearchResult span{
    color:#c5a561 !important;
    font:700 .68rem/1 "Segoe UI",Tahoma,sans-serif !important;
    letter-spacing:.12em !important;
}
.globalSearchResult strong{
    color:#f3efe6 !important;
    font:700 1.05rem/1.25 Georgia,"Palatino Linotype",serif !important;
}
.globalSearchResult small{
    color:#9aa79d !important;
    font:400 .82rem/1.35 Georgia,"Palatino Linotype",serif !important;
}
.globalSearchResult.active,
.globalSearchResult:hover{
    border-color:rgba(196,165,116,.4) !important;
    background:linear-gradient(165deg,#f4f0e6,#e9e2d2) !important;
    color:#1c1915 !important;
}
.globalSearchResult.active span,
.globalSearchResult:hover span{
    color:#6b3a24 !important;
}
.globalSearchResult.active strong,
.globalSearchResult:hover strong{
    color:#1c1915 !important;
}
.globalSearchResult.active small,
.globalSearchResult:hover small{
    color:#5a4f40 !important;
}

/* —— Creature Edit desk: full width, readable, not cramped —— */
#editor .creatureLocked.creatureEditing{
    max-width:none !important;
    width:100% !important;
    box-sizing:border-box !important;
}
#editor .creatureLocked.creatureEditing .creatureStage{
    grid-template-columns:minmax(0,1fr) !important;
}
#editor .creatureLocked.creatureEditing .creatureArt{
    display:none !important;
}
#editor .creatureEditAnchor{
    scroll-margin-top:20px !important;
}
#editor .creatureLocked.creatureEditing .npcCardFrame,
#editor .creatureLocked.creatureEditing .monsterIdentityGrid,
#editor .creatureLocked.creatureEditing .monsterShortFields,
#editor .creatureLocked.creatureEditing .monsterAbilities,
#editor .creatureLocked.creatureEditing .monsterDetails,
#editor .creatureLocked.creatureEditing .npcCardMore,
#editor .creatureLocked.creatureEditing .npcSection,
#editor .creatureLocked.creatureEditing .npcCardMoreGrid{
    width:100% !important;
    max-width:none !important;
    box-sizing:border-box !important;
}
#editor .creatureLocked.creatureEditing .npcCardFrame{
    display:flex !important;
    flex-direction:column !important;
    gap:16px !important;
    margin:0 0 18px !important;
    padding:18px 18px 20px !important;
    border:1px solid #c8b89a !important;
    border-radius:12px !important;
    background:#f7f2e8 !important;
    color:#1c140e !important;
}
#editor .creatureLocked.creatureEditing .npcCardFrame::before{
    content:"Edit NPC";
    display:block !important;
    margin:0 0 6px !important;
    color:#1c140e !important;
    font:700 1.35rem/1.2 Georgia,"Times New Roman",serif !important;
    letter-spacing:.02em !important;
}
#editor .creatureLocked.creatureEditing .npcCardName,
#editor .creatureLocked.creatureEditing .npcCardAbilities,
#editor .creatureLocked.creatureEditing .npcCardCenter,
#editor .creatureLocked.creatureEditing .npcCardSide{
    grid-column:auto !important;
    grid-row:auto !important;
    width:100% !important;
    max-width:none !important;
}
#editor .creatureLocked.creatureEditing .npcCardVitals,
#editor .creatureLocked.creatureEditing .npcCardSide,
#editor .creatureLocked.creatureEditing .npcCardCenter,
#editor .creatureLocked.creatureEditing .monsterShortFields,
#editor .creatureLocked.creatureEditing .monsterDetails,
#editor .creatureLocked.creatureEditing .monsterAbilities{
    margin:0 !important;
    padding:14px 14px 12px !important;
    border:1px solid #d2c4a8 !important;
    border-radius:10px !important;
    background:#fffdf8 !important;
    color:#1c140e !important;
}
#editor .creatureLocked.creatureEditing .npcCardVitals::before,
#editor .creatureLocked.creatureEditing .npcCardSide::before,
#editor .creatureLocked.creatureEditing .npcSheet.npcCard .npcAbilities::before,
#editor .creatureLocked.creatureEditing .monsterShortFields::before,
#editor .creatureLocked.creatureEditing .monsterAbilities::before,
#editor .creatureLocked.creatureEditing .monsterDetails::before{
    position:static !important;
    display:block !important;
    margin:0 0 10px !important;
    color:#6b3a24 !important;
    font:700 12px/1 system-ui,sans-serif !important;
    letter-spacing:.1em !important;
    text-transform:uppercase !important;
}
#editor .creatureLocked.creatureEditing .npcSheet.npcCard .npcAbilities{
    display:grid !important;
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
    gap:10px !important;
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:14px !important;
    border:1px solid #d2c4a8 !important;
    border-radius:10px !important;
    background:#fffdf8 !important;
    flex-direction:unset !important;
}
#editor .creatureLocked.creatureEditing .npcSheet.npcCard .npcCardAbility{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:6px !important;
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    padding:10px 8px !important;
    border:1px solid #e4d8c4 !important;
    border-radius:8px !important;
    background:#f4efe4 !important;
    grid-template-columns:none !important;
    grid-template-areas:none !important;
}
#editor .creatureLocked.creatureEditing .npcSheet.npcCard .npcCardAbility strong{
    color:#6b3a24 !important;
    font-size:12px !important;
    letter-spacing:.08em !important;
}
#editor .creatureLocked.creatureEditing .npcSheet.npcCard .npcCardScore,
#editor .creatureLocked.creatureEditing .npcSheet.npcCard .npcCardScore .npcAbilityScore{
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    height:auto !important;
}
#editor .creatureLocked.creatureEditing .npcSheet.npcCard .npcCardScore .npcAbilityScore{
    min-height:40px !important;
    font-size:18px !important;
    text-align:center !important;
}
#editor .creatureLocked.creatureEditing .npcSheet.npcCard .npcAbilityModifier{
    color:#1c140e !important;
    font-size:14px !important;
}
#editor .creatureLocked.creatureEditing :is(h1,h2,h3,p,li,span,strong,small,label,div,summary){
    color:#1c140e !important;
    text-shadow:none !important;
}
#editor .creatureLocked.creatureEditing label,
#editor .creatureLocked.creatureEditing .npcCardLine > span,
#editor .creatureLocked.creatureEditing .npcCardBox > span,
#editor .creatureLocked.creatureEditing .npcVital > span{
    color:#5a3d28 !important;
    font-size:13px !important;
    font-weight:700 !important;
    letter-spacing:.04em !important;
}
#editor .creatureLocked.creatureEditing :is(input,select,textarea):not([type="checkbox"],[type="radio"],[type="file"],[type="hidden"]){
    width:100% !important;
    min-height:38px !important;
    margin-top:4px !important;
    padding:8px 10px !important;
    border:1px solid #c8b89a !important;
    border-radius:8px !important;
    background:#fffdf8 !important;
    color:#1c140e !important;
    font-size:15px !important;
    line-height:1.35 !important;
    box-shadow:none !important;
}
#editor .creatureLocked.creatureEditing textarea{
    min-height:88px !important;
    resize:vertical !important;
}
#editor .creatureLocked.creatureEditing .npcCardMore{
    margin:0 0 16px !important;
    padding:14px 16px !important;
    border:1px solid #c8b89a !important;
    border-radius:12px !important;
    background:#f7f2e8 !important;
}
#editor .creatureLocked.creatureEditing .npcCardMore > summary{
    cursor:pointer !important;
    color:#6b3a24 !important;
    font:700 15px/1.3 system-ui,sans-serif !important;
}
#editor .creatureLocked.creatureEditing .npcCardMoreGrid{
    display:grid !important;
    grid-template-columns:repeat(auto-fit,minmax(200px,1fr)) !important;
    gap:12px 14px !important;
    margin-top:12px !important;
}
#editor .creatureLocked.creatureEditing .npcSection{
    margin:12px 0 0 !important;
    padding:12px 0 0 !important;
    border-top:1px solid #e4d8c4 !important;
}
#editor .creatureLocked.creatureEditing .npcSection h2{
    margin:0 0 8px !important;
    color:#6b3a24 !important;
    font-size:15px !important;
}
#editor .creatureLocked.creatureEditing .sheetArea.npcRichField{
    min-height:96px !important;
    padding:10px 12px !important;
    border:1px solid #c8b89a !important;
    border-radius:8px !important;
    background:#fffdf8 !important;
    color:#1c140e !important;
    font-size:15px !important;
}
#editor .creatureLocked.creatureEditing .npcSheetActions,
#editor .creatureLocked.creatureEditing .monsterSheetActions{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:10px !important;
    margin-top:8px !important;
}
#editor .creatureLocked.creatureEditing :is(.npcSheetActions,.monsterSheetActions) button{
    min-height:40px !important;
    padding:8px 14px !important;
    border:1px solid #8a7344 !important;
    border-radius:8px !important;
    background:#fffdf8 !important;
    color:#1c140e !important;
    font-size:14px !important;
    font-weight:700 !important;
}
@media (max-width:900px){
    #editor .creatureLocked.creatureEditing .npcSheet.npcCard .npcAbilities{
        grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    }
}
@media (max-width:560px){
    #editor .creatureLocked.creatureEditing .npcSheet.npcCard .npcAbilities{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }
}

/* ============================================================
   Desk paper — match Privacy / Guides / About (legal.css)
   NPC, Monster, Notes, Character, Character Creator, Initiative
   ============================================================ */
:root{
    --desk-paper:#F1ECDF;
    --desk-raised:#F7F4ED;
    --desk-sunk:#E8E2D4;
    --desk-ink:#1C1B18;
    --desk-ink-soft:#57534A;
    --desk-line:#E2DDD3;
    --desk-line-strong:#CFC8BA;
    --desk-forest:#2F5D46;
    --desk-forest-dark:#234836;
    --desk-terracotta:#B4552D;
    /* Quiet paper grain (Guides / Policy) — no dark stain blotches. */
    --desk-fibre:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .36 0 0 0 0 .22 0 0 0 0 .08 0 0 0 .12 0'/></filter><rect width='300' height='300' filter='url(%23n)'/></svg>");
}

#editorLeft,
#editorView:has(.npcSheet),
#editorView:has(.monsterSheet),
#editorView:has(.characterSheet),
#editor{
    background:var(--desk-paper) !important;
    color:var(--desk-ink) !important;
    box-shadow:none !important;
    outline:0 !important;
}

/* Notes parchment: Guides/Policy paper — kill the old dark radial “stain” spot. */
#editor.parchmentEditor{
    background:
        var(--desk-fibre),
        linear-gradient(180deg,var(--desk-raised),var(--desk-paper)) !important;
    color:var(--desk-ink) !important;
    border-color:var(--desk-line-strong) !important;
    box-shadow:inset 0 0 0 1px rgba(74,47,23,.06) !important;
}
#editor.parchmentEditor a{color:var(--desk-terracotta) !important}
#editor:has(> .monsterSheet),
#editor:has(> .npcSheet){
    background:var(--desk-paper) !important;
    color:var(--desk-ink) !important;
}

/* Notes + generic editor text */
#editor,
#editor p,
#editor li,
#editor h1,
#editor h2,
#editor h3{
    color:var(--desk-ink) !important;
}

/* —— NPC / Monster sheets —— */
#editor .monsterSheet,
#editor .npcSheet,
#editor .npcSheet.npcCard,
.npcSheet.npcCard{
    background:var(--desk-raised) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line) !important;
    border-radius:12px !important;
    box-shadow:none !important;
}
#editor :is(.monsterSheet,.npcSheet,.npcSheet.npcCard) :is(h1,h2,h3,p,li,span,strong,small,label,div,summary,em){
    color:var(--desk-ink) !important;
    text-shadow:none !important;
}
#editor :is(.monsterSheet,.npcSheet) label,
#editor :is(.monsterSheet,.npcSheet.npcCard) label,
#editor .npcCardLine > span,
#editor .npcCardBox > span,
#editor .npcVital > span,
#editor .npcCardPortrait > span{
    color:var(--desk-terracotta) !important;
    font:700 12px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif !important;
    letter-spacing:.08em !important;
    text-transform:uppercase !important;
}
#editor :is(.monsterSheet,.npcSheet) h2,
#editor :is(.monsterSectionHeading,.npcSectionHeading) h2{
    color:var(--desk-forest-dark) !important;
    border-bottom-color:var(--desk-line) !important;
    font-size:13px !important;
    letter-spacing:.1em !important;
}
#editor :is(.monsterSheet,.npcSheet,.npcSheet.npcCard) :is(input,select,textarea):not([type="checkbox"],[type="radio"],[type="file"],[type="hidden"]),
#editor .npcSheet.npcCard .sheetInput,
#editor .npcSheet.npcCard .sheetSmall,
#editor .npcSheet.npcCard .sheetArea{
    background:#fff !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
    border-radius:8px !important;
    box-shadow:none !important;
}
#editor :is(.monsterSheet,.npcSheet) :is(input,select,textarea):focus{
    outline:2px solid rgba(47,93,70,.35) !important;
    border-color:var(--desk-forest) !important;
    background:#fff !important;
}

#editor .npcCardVitals,
#editor .npcCardSide,
#editor .npcCardCenter,
#editor .npcCardAttacks,
#editor .monsterShortFields,
#editor .monsterDetails,
#editor .monsterAbilities,
#editor .npcSheet.npcCard .npcAbilities,
#editor .npcCardPortrait,
#editor .npcVitalSpeed{
    background:var(--desk-raised) !important;
    color:var(--desk-ink) !important;
    border-color:var(--desk-line-strong) !important;
}
#editor .npcCardVitals::before,
#editor .npcCardSide::before,
#editor .npcSheet.npcCard .npcAbilities::before,
#editor .monsterShortFields::before,
#editor .monsterAbilities::before,
#editor .monsterDetails::before{
    color:var(--desk-terracotta) !important;
}
#editor .npcSheet.npcCard .npcCardName .npcName{
    background:#fff !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
}
#editor .npcSheet.npcCard .npcCardAbility{
    background:var(--desk-sunk) !important;
    border:1px solid var(--desk-line) !important;
}
#editor .npcSheet.npcCard .npcCardAbility strong,
#editor .npcSheet.npcCard .npcAbilityModifier{
    color:var(--desk-ink) !important;
}
#editor .npcVitalHp .npcHpButtons button,
#editor .creatureHpButtons button{
    background:var(--desk-sunk) !important;
    color:var(--desk-ink) !important;
    border-color:var(--desk-line-strong) !important;
}
#editor .npcCardMore{
    background:var(--desk-raised) !important;
    border:1px solid var(--desk-line) !important;
    border-radius:10px !important;
}
#editor .creatureCard,
#editor .creatureArt .sheetProfileUpload{
    background:var(--desk-raised) !important;
    border-color:var(--desk-line-strong) !important;
    color:var(--desk-ink) !important;
}
#editor .creatureReadout,
#editor .creatureReadoutHead h2,
#editor .creatureCombat p,
#editor .creatureFact,
#editor .creatureProse p{
    color:var(--desk-ink) !important;
}
#editor .creatureReadoutHead p,
#editor .creatureCombat span,
#editor .creatureFact span,
#editor .creatureProse h3{
    color:var(--desk-terracotta) !important;
}

/* —— Character creator (all steps: paper desk, no gradients) —— */
#characterCreatorWindow{
    background:rgba(28,27,24,.28) !important;
}
#characterCreatorWindow > .characterCreatorBox,
.characterCreatorBox{
    background:var(--desk-paper) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line) !important;
    border-radius:12px !important;
    box-shadow:none !important;
}
.characterCreatorHeader{
    background:var(--desk-raised) !important;
    border-bottom:1px solid var(--desk-line) !important;
    color:var(--desk-ink) !important;
}
.characterCreatorHeader h2,
.characterCreatorEyebrow{
    color:var(--desk-ink) !important;
}
.characterCreatorHeader p{
    color:var(--desk-ink-soft) !important;
}
.characterCreatorHeader > button{
    background:var(--desk-sunk) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
}
.characterCreatorProgress{
    background:var(--desk-line) !important;
    border-bottom:1px solid var(--desk-line) !important;
}
.characterCreatorProgress button{
    background:var(--desk-sunk) !important;
    color:var(--desk-ink) !important;
    border:0 !important;
    box-shadow:none !important;
}
.characterCreatorProgress button span{
    background:#fff !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line) !important;
}
.characterCreatorProgress button.active{
    background:var(--desk-forest) !important;
    color:#fff !important;
}
.characterCreatorProgress button.active span{
    background:#fff !important;
    color:var(--desk-forest-dark) !important;
}
.characterCreatorProgress button.complete{
    background:var(--desk-raised) !important;
    color:var(--desk-ink) !important;
}
.characterCreatorBody,
.characterCreatorSteps{
    background:var(--desk-paper) !important;
    color:var(--desk-ink) !important;
}
.characterCreatorSummary{
    background:var(--desk-raised) !important;
    color:var(--desk-ink) !important;
    border-right:1px solid var(--desk-line) !important;
    box-shadow:none !important;
}
.characterCreatorSummary > strong,
.characterCreatorSummary > span{
    color:var(--desk-ink) !important;
}
.characterPortraitButton{
    background:var(--desk-sunk) !important;
    border:2px solid var(--desk-line-strong) !important;
    outline:0 !important;
    box-shadow:none !important;
}
.characterSummaryStats div{
    background:#fff !important;
    border:1px solid var(--desk-line) !important;
    border-radius:8px !important;
    box-shadow:none !important;
}
.characterSummaryStats span{
    color:var(--desk-terracotta) !important;
}
.characterSummaryStats b{
    color:var(--desk-ink) !important;
}
.characterStepHeading{
    border-bottom:1px solid var(--desk-line) !important;
}
.characterStepHeading span{
    color:var(--desk-terracotta) !important;
}
.characterStepHeading h3,
.characterCreatorSteps h2,
.characterCreatorSteps h3,
.characterCreatorSteps label,
.characterFormGrid label,
.characterWideField,
.characterLongFields label{
    color:var(--desk-ink) !important;
}
.characterStepHelp,
.characterAutoCalcNote{
    color:var(--desk-ink-soft) !important;
}
.characterCreatorBox :is(input,select,textarea):not([type="checkbox"],[type="radio"]),
.characterFormGrid :is(input,select),
.characterWideField textarea,
.characterLongFields textarea,
.characterAbilityGrid input,
.characterFlexibleSpeciesBonuses select,
.characterEquipmentBrowserControls :is(select,input){
    background:#fff !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
    border-radius:8px !important;
    box-shadow:none !important;
    -webkit-text-fill-color:var(--desk-ink) !important;
}
.characterFormGrid input[readonly]{
    background:var(--desk-sunk) !important;
    color:var(--desk-ink-soft) !important;
}
.characterSelectWithInfo .characterReferenceInfoBtn{
    background:var(--desk-forest) !important;
    color:#fff !important;
    border:1px solid var(--desk-forest) !important;
    box-shadow:none !important;
}
.characterOriginReferenceCard,
.characterReferenceTooltip{
    background:var(--desk-raised) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line) !important;
    border-radius:10px !important;
    box-shadow:none !important;
}
.characterOriginReferenceCard header span,
.characterReferenceTooltip header span,
.characterOriginReferenceCard small,
.characterReferenceTooltip small{
    color:var(--desk-terracotta) !important;
}
.characterOriginReferenceCard h4,
.characterReferenceTooltip h4,
.characterOriginReferenceCard p,
.characterReferenceTooltip p,
.characterOriginReferenceCard li,
.characterReferenceTooltip li{
    color:var(--desk-ink) !important;
}
.characterAbilityGrid label{
    background:#fff !important;
    border:1px solid var(--desk-line-strong) !important;
    border-radius:12px !important;
    box-shadow:none !important;
}
.characterAbilityGrid label span,
.characterAbilityGrid label b,
.characterAbilityGrid small,
.characterPointBuyGrid label > strong[data-character-final-score],
.characterPointBuyGrid label > em{
    color:var(--desk-ink) !important;
}
.characterPointBuyToolbar,
.characterFlexibleSpeciesBonuses,
.characterSrdEquipmentBrowser,
.characterEquipmentDetail,
.characterReviewHero,
.characterReviewSection{
    background:var(--desk-raised) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line) !important;
    box-shadow:none !important;
}
.characterPointBudget span,
.characterPointBudget small,
.characterFlexibleSpeciesBonuses strong,
.characterEquipmentBrowserHeader span,
.characterEquipmentBrowserHeader p,
.characterEquipmentStatus,
.characterEquipmentMeta span{
    color:var(--desk-ink-soft) !important;
}
.characterPointBudget strong,
.characterEquipmentBrowserHeader h4,
.characterEquipmentDetail header h4,
.characterReviewHero h3,
.characterReviewSection h4{
    color:var(--desk-ink) !important;
}
.characterPointBuyToolbar button,
.characterAbilityAdjust button,
.characterEquipmentActions button,
.characterCreatorFooter button{
    background:var(--desk-sunk) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
    box-shadow:none !important;
}
.characterCreatorFooter{
    background:var(--desk-raised) !important;
    border-top:1px solid var(--desk-line) !important;
}
#characterCreatorNextBtn,
#characterCreatorFinishBtn,
.characterEquipmentActions #characterReloadEquipmentBtn{
    background:var(--desk-forest) !important;
    border-color:var(--desk-forest) !important;
    color:#fff !important;
}
.characterChoiceGrid label,
.characterCheckboxLine,
.characterChoiceGrid label.backgroundSkill{
    background:#fff !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line) !important;
}
.characterReviewStatGrid div{
    background:#fff !important;
    border:1px solid var(--desk-line) !important;
    color:var(--desk-ink) !important;
}
.characterSpeciesBonusSummary{
    background:var(--desk-sunk) !important;
    color:var(--desk-ink) !important;
    border-left:4px solid var(--desk-forest) !important;
}
.characterEquipmentDetail header,
.characterEquipmentMeta,
.characterEquipmentDescription{
    background:transparent !important;
    color:var(--desk-ink) !important;
    border-color:var(--desk-line) !important;
}
.characterEquipmentDetail header > b,
.characterEquipmentStatus{
    background:var(--desk-sunk) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line) !important;
}

/* Species / class automatic choices — paper desk (no dark chrome) */
.characterAutomaticChoices{
    background:var(--desk-raised) !important;
    border:1px solid var(--desk-line) !important;
    border-radius:10px !important;
    box-shadow:none !important;
}
.characterAutomaticChoicesHeading{
    background:var(--desk-sunk) !important;
    color:var(--desk-ink) !important;
    border-bottom:1px solid var(--desk-line) !important;
}
.characterAutomaticChoicesHeading span{
    color:var(--desk-terracotta) !important;
}
.characterAutomaticChoicesHeading h4{
    color:var(--desk-ink) !important;
}
.characterAutomaticChoicesHeading p{
    color:var(--desk-ink-soft) !important;
}
.characterAutomaticChoiceGrid{
    background:transparent !important;
}
.characterAutomaticChoiceGrid label{
    background:#fff !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line) !important;
    border-radius:8px !important;
    box-shadow:none !important;
}
.characterAutomaticChoiceGrid label strong{
    color:var(--desk-ink) !important;
}
.characterAutomaticChoiceGrid label select{
    background:#fff !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
    border-radius:8px !important;
    box-shadow:none !important;
    -webkit-text-fill-color:var(--desk-ink) !important;
}
.characterAutomaticChoiceGrid label small,
.characterAutomaticChoiceEmpty{
    color:var(--desk-ink-soft) !important;
}
.characterRecommendedLoadout{
    background:var(--desk-sunk) !important;
    border-top:1px solid var(--desk-line) !important;
}
.characterRecommendedLoadout span{
    color:var(--desk-ink-soft) !important;
}
.characterRecommendedLoadout button{
    background:var(--desk-forest) !important;
    border:1px solid var(--desk-forest) !important;
    color:#fff !important;
    box-shadow:none !important;
}

/* —— Interactive character sheet (colors only; layout untouched) ——
   Must use #interactiveCharacterSheetContent so these beat the mid-file dark block. */
#interactiveCharacterSheetWindow{
    background:rgba(28,27,24,.28) !important;
}
#interactiveCharacterSheetWindow .interactiveCharacterSheetBox,
#interactiveCharacterSheetContent,
.interactiveCharacterSheetBox{
    background:var(--desk-paper) !important;
    color:var(--desk-ink) !important;
}
#interactiveCharacterSheetContent .characterSheetHeader{
    background:var(--desk-raised) !important;
    color:var(--desk-ink) !important;
    border-bottom:1px solid var(--desk-line) !important;
    box-shadow:none !important;
}
#interactiveCharacterSheetContent .characterSheetIdentity h1,
#interactiveCharacterSheetContent .characterSheetIdentity p,
#interactiveCharacterSheetContent .characterSheetHeaderActions,
#interactiveCharacterSheetContent .characterSheetHeaderActions span,
#interactiveCharacterSheetContent .characterSheetHeader :is(h1,h2,strong,span,p,small,label){
    color:var(--desk-ink) !important;
    text-shadow:none !important;
}
#interactiveCharacterSheetContent .characterSheetXpLine > span,
#interactiveCharacterSheetContent .characterSheetXpLine small,
#interactiveCharacterSheetContent .characterSheetCombatCluster span,
#interactiveCharacterSheetContent .characterSheetHpControl > span,
#interactiveCharacterSheetContent .characterSheetHpReadout small,
#interactiveCharacterSheetContent .characterSheetBoard h2,
#interactiveCharacterSheetContent .characterSheetListRoll small,
#interactiveCharacterSheetContent .characterSheetSenseNote,
#interactiveCharacterSheetContent .characterSheetRailBlock p span,
#interactiveCharacterSheetContent .characterSheetAbilityCard span{
    color:var(--desk-terracotta) !important;
}
#interactiveCharacterSheetContent .characterSheetXpBar{
    background:var(--desk-sunk) !important;
}
#interactiveCharacterSheetContent .characterSheetXpBar i{
    background:var(--desk-forest) !important;
}
#interactiveCharacterSheetContent .characterSheetHeaderActions button,
#interactiveCharacterSheetContent .characterSheetBackBtn,
#interactiveCharacterSheetContent .characterSheetCloseBtn,
#interactiveCharacterSheetContent .characterSheetRollMode select{
    background:var(--desk-sunk) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
    box-shadow:none !important;
}
#interactiveCharacterSheetContent .characterSheetPortraitFallback{
    background:var(--desk-sunk) !important;
    color:var(--desk-forest-dark) !important;
    border-color:var(--desk-line-strong) !important;
}
#interactiveCharacterSheetContent .characterSheetStatRow,
#interactiveCharacterSheetContent .characterSheetBoard{
    background:var(--desk-paper) !important;
    border-bottom-color:var(--desk-line) !important;
    color:var(--desk-ink) !important;
}
#interactiveCharacterSheetContent .characterSheetAbilityCard{
    background:#fff !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
    box-shadow:none !important;
}
#interactiveCharacterSheetContent .characterSheetAbilityCard strong,
#interactiveCharacterSheetContent .characterSheetAbilityCard small{
    color:var(--desk-ink) !important;
}
#interactiveCharacterSheetContent .characterSheetAbilityCard small{
    background:var(--desk-sunk) !important;
    border:1px solid var(--desk-line) !important;
}
#interactiveCharacterSheetContent .characterSheetCombatCluster > div,
#interactiveCharacterSheetContent .characterSheetCombatCluster > button{
    background:#fff !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
}
#interactiveCharacterSheetContent .characterSheetCombatCluster strong,
#interactiveCharacterSheetContent .characterSheetHpReadout b{
    color:var(--desk-ink) !important;
}
#interactiveCharacterSheetContent .characterSheetInspiration.active{
    background:var(--desk-sunk) !important;
    box-shadow:inset 0 0 0 1px var(--desk-forest) !important;
}
#interactiveCharacterSheetContent .characterSheetHpActions button{
    background:var(--desk-sunk) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
}
#interactiveCharacterSheetContent .characterSheetBoard > *{
    background:var(--desk-raised) !important;
    border:1px solid var(--desk-line) !important;
    color:var(--desk-ink) !important;
}
#interactiveCharacterSheetContent .characterSheetRailBlock + .characterSheetRailBlock{
    border-top-color:var(--desk-line) !important;
}
#interactiveCharacterSheetContent .characterSheetSaveChip,
#interactiveCharacterSheetContent .characterSheetSkillList .characterSheetListRoll{
    background:transparent !important;
    color:var(--desk-ink) !important;
    border-bottom:1px solid var(--desk-line) !important;
}
#interactiveCharacterSheetContent .characterSheetListRoll strong,
#interactiveCharacterSheetContent .characterSheetListRoll span,
#interactiveCharacterSheetContent .characterSheetSenseList strong,
#interactiveCharacterSheetContent .characterSheetRailBlock p{
    color:var(--desk-ink) !important;
}
#interactiveCharacterSheetContent .characterSheetListRoll:hover{
    background:rgba(47,93,70,.08) !important;
}
#interactiveCharacterSheetContent .characterSheetDock .characterSheetTabs{
    background:var(--desk-raised) !important;
    border-bottom:1px solid var(--desk-line) !important;
}
#interactiveCharacterSheetContent .characterSheetDock .characterSheetTabs button{
    background:transparent !important;
    color:var(--desk-ink-soft) !important;
}
#interactiveCharacterSheetContent .characterSheetDock .characterSheetTabs button.active{
    color:var(--desk-ink) !important;
    border-bottom-color:var(--desk-forest) !important;
    background:transparent !important;
}
#interactiveCharacterSheetContent .characterSheetDock .characterSheetTabContent{
    background:var(--desk-raised) !important;
    color:var(--desk-ink) !important;
}
#interactiveCharacterSheetContent .characterSheetActionFilters button{
    background:transparent !important;
    color:var(--desk-ink-soft) !important;
    border:1px solid var(--desk-line-strong) !important;
}
#interactiveCharacterSheetContent .characterSheetActionFilters button.active{
    background:var(--desk-forest) !important;
    color:#fff !important;
    border-color:var(--desk-forest) !important;
}
#interactiveCharacterSheetContent :is(
    .characterSheetActionCard,
    .characterSheetSpellCard,
    .characterSheetInventoryItem,
    .characterSheetOfficialFeatureCard,
    .characterSheetEmptyState,
    .characterSheetDeathSaves,
    .characterSheetHitDie,
    .characterSheetResourceTracker,
    .characterSheetRollHistory,
    .characterSheetEditableBlock,
    .characterSheetSpellSlots,
    .characterSheetCarry,
    .characterSheetChosenOptions article
){
    background:#fff !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
    box-shadow:none !important;
}
#interactiveCharacterSheetContent .characterSheetActionCard h3,
#interactiveCharacterSheetContent .characterSheetActionCard p,
#interactiveCharacterSheetContent .characterSheetActionCard span,
#interactiveCharacterSheetContent .characterSheetSpellCard,
#interactiveCharacterSheetContent .characterSheetSpellCard h3,
#interactiveCharacterSheetContent .characterSheetSpellCard p,
#interactiveCharacterSheetContent .characterSheetInventoryItem,
#interactiveCharacterSheetContent .characterSheetInventoryItem h3,
#interactiveCharacterSheetContent .characterSheetEmptyState,
#interactiveCharacterSheetContent .characterSheetEmptyState p,
#interactiveCharacterSheetContent .characterSheetOfficialFeatureCard,
#interactiveCharacterSheetContent .characterSheetOfficialFeatureCard strong{
    color:var(--desk-ink) !important;
}
#interactiveCharacterSheetContent .characterSheetActionValues button,
#interactiveCharacterSheetContent .characterSheetFixedDamage{
    background:var(--desk-sunk) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
}
#interactiveCharacterSheetContent .characterSheetActionValues strong{
    color:var(--desk-ink) !important;
}
#interactiveCharacterSheetContent :is(input,select,textarea){
    background:#fff !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
    box-shadow:none !important;
}
#interactiveCharacterSheetContent .characterSheetChosenOptions > h3,
#interactiveCharacterSheetContent .characterSheetResourceHeading{
    background:var(--desk-sunk) !important;
    color:var(--desk-ink) !important;
}
#interactiveCharacterSheetContent .characterSheetSpellCard > header b,
#interactiveCharacterSheetContent .characterSheetSpellRolls button,
#interactiveCharacterSheetContent .characterSheetResourceHeading button,
#interactiveCharacterSheetContent .characterSheetResourceControls button{
    background:var(--desk-sunk) !important;
    color:var(--desk-ink) !important;
    border-color:var(--desk-line-strong) !important;
}
#interactiveCharacterSheetContent .characterSheetSpellUtility{
    background:var(--desk-paper) !important;
    color:var(--desk-ink) !important;
    border-color:var(--desk-line) !important;
}
#interactiveCharacterSheetContent .characterSheetCarryBar i{
    background:var(--desk-forest) !important;
}
#interactiveCharacterSheetContent .characterSheetWorkspace,
#interactiveCharacterSheetContent .characterSheetStatistics,
#interactiveCharacterSheetContent .characterSheetMain,
#interactiveCharacterSheetContent .characterSheetRightRail{
    background:var(--desk-paper) !important;
    color:var(--desk-ink) !important;
}
#interactiveCharacterSheetContent :is(
    .characterSheetSection,
    .characterSheetPanel,
    .characterSheetHpCard,
    .characterSheetVitalsBand,
    .characterSheetCombatSummary,
    .characterSheetCombatBar > div,
    .characterSheetCombatBar > button,
    .characterSheetItemEmpty
){
    background:#fff !important;
    color:var(--desk-ink) !important;
    border-color:var(--desk-line-strong) !important;
    box-shadow:none !important;
    text-shadow:none !important;
}
#interactiveCharacterSheetContent .characterSheetStatistics h2,
#interactiveCharacterSheetContent .characterSheetTabContent h2,
#interactiveCharacterSheetContent .characterSheetRightRail h2,
#interactiveCharacterSheetContent .characterSheetSection h2{
    color:var(--desk-forest-dark) !important;
}

/* —— Initiative tracker (Guides papyrus) —— */
#editorView:has(#initiativeTracker.show),
#editorView:has(#initiativeTracker.show) #editorLeft,
#initiativeTracker,
#initiativeTracker.show{
    background:
      url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .36 0 0 0 0 .22 0 0 0 0 .08 0 0 0 .10 0'/></filter><rect width='300' height='300' filter='url(%23n)'/></svg>"),
      var(--desk-paper) !important;
    color:var(--desk-ink) !important;
}
#initiativeTracker{
    border:1px solid var(--desk-line-strong) !important;
    border-radius:2px !important;
    box-shadow:inset 0 0 0 3px var(--desk-raised), inset 0 0 0 4px rgba(74,47,23,.12) !important;
}
#initiativeTracker .initiativeTrackerBanner{display:none !important;}
#initiativeTracker .initiativeTrackerTop{
    display:flex !important;
    flex-wrap:wrap !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:10px !important;
    background:transparent !important;
    border:0 !important;
    border-bottom:1px solid var(--desk-line) !important;
}
#initiativeTracker .trackerToolbar,
#initiativeTracker .trackerToolbar.initiativeTabBar,
#initiativeTracker .initiativeCombatBar,
#initiativeTracker .initiativeToolbarGroup{
    display:inline-flex !important;
    flex-wrap:wrap !important;
    align-items:center !important;
    gap:6px !important;
    grid-template-columns:none !important;
    background:transparent !important;
    background-image:none !important;
    border:0 !important;
    box-shadow:none !important;
    margin:0 !important;
    padding:0 !important;
}
#initiativeTracker .initiativeCombatBar{margin-left:auto !important;}
#initiativeTracker .initiativeSidePanel,
#initiativeTracker .initiativeTurnStrip,
#initiativeTracker #roundCounter,
#initiativeCurrentCard,
#initiativeNextCard,
#initiativeTracker .activeEncounterSummary{display:none !important;}
#initiativeTracker .combatantCard{
    background:var(--desk-raised) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line) !important;
    border-radius:2px !important;
    box-shadow:none !important;
}
#initiativeTracker .combatantCard.activeTurn{
    border-color:var(--desk-forest) !important;
    background:var(--desk-sunk) !important;
    box-shadow:inset 4px 0 0 var(--desk-forest) !important;
}
#initiativeTracker .combatantNowLabel{
    color:var(--desk-forest-dark) !important;
    background:var(--desk-sunk);
    padding:4px 8px;
    border-radius:2px;
}
#initiativeTracker label,
#initiativeTracker .summaryStat,
#initiativeTracker .initiativeCardEmpty{
    color:var(--desk-ink-soft) !important;
}
#initiativeTracker span,
#initiativeTracker strong,
#initiativeTracker small,
#initiativeTracker p,
#initiativeTracker h2,
#initiativeTracker h3{
    color:var(--desk-ink) !important;
}
#initiativeTracker .initBtn,
#initiativeTracker .trackerToolbar button,
#initiativeTracker .initiativeCombatBar button,
#initiativeTracker .initiativeTurnControls button,
#initiativeTracker .combatantDetailsBtn,
#initiativeTracker #openEnemiesBtn,
#initiativeTracker #addCombatantBtn,
#initiativeTracker #toggleInitiativeFloatBtn,
#initiativeTracker #initiativeMoreBtn,
#initiativeTracker #previousTurnBtn,
#initiativeTracker #nextTurnBtn,
#initiativeTracker #newRoundBtn,
#initiativeTracker #endEncounterBtn{
    background:var(--desk-sunk) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
    border-radius:2px !important;
    background-image:none !important;
    box-shadow:none !important;
    text-shadow:none !important;
    filter:none !important;
}
#initiativeTracker #openEnemiesBtn,
#initiativeTracker #toggleInitiativeFloatBtn,
#initiativeTracker #previousTurnBtn,
#initiativeTracker #newRoundBtn{
    background:var(--desk-raised) !important;
}
#initiativeTracker .initBtnAdd,
#initiativeTracker .initBtnNext,
#initiativeTracker #toggleInitiativeFloatBtn.is-open,
#initiativeTracker #addCombatantBtn,
#initiativeTracker #nextTurnBtn,
#initiativeTracker #nextTurnBtn:hover{
    background:var(--desk-forest) !important;
    color:#fff !important;
    border-color:var(--desk-forest-dark) !important;
}
#initiativeTracker .initBtnFloat{
    background:var(--desk-raised) !important;
    color:var(--desk-forest-dark) !important;
    border-color:var(--desk-forest) !important;
}
#initiativeTracker .initBtnEnd,
#initiativeTracker #endEncounterBtn{
    background:transparent !important;
    color:var(--desk-terracotta) !important;
    border-color:var(--desk-terracotta) !important;
}
#initiativeTracker .removeCombatantBtn{
    background:var(--desk-terracotta) !important;
    border:1px solid var(--desk-terracotta) !important;
    color:#fff !important;
    border-radius:2px !important;
}
#initiativeTracker .initiativeWorkspace{
    background:var(--desk-raised) !important;
    border:1px solid var(--desk-line-strong) !important;
    border-radius:2px !important;
}
#initiativeTracker .initiativeTablePane,
#initiativeTracker .initiativeCardGrid{
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
}
#initiativeTracker :is(input,select,textarea):not([type="checkbox"],[type="radio"],[type="file"]){
    background:var(--desk-paper) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
    border-radius:2px !important;
}
#initiativeTracker .initiativeMoreMenu,
#initiativeTracker .combatantActionMenu{
    background:var(--desk-raised) !important;
    border:1px solid var(--desk-line-strong) !important;
    border-radius:2px !important;
    box-shadow:0 12px 28px rgba(28,27,24,.12) !important;
}
#initiativeTracker .initiativeMoreMenu button,
#initiativeTracker .combatantActionMenu button,
#initiativeTracker .combatMenuItem{
    color:var(--desk-ink) !important;
    background:transparent !important;
}
#initiativeTracker .initiativeMoreMenu button:hover,
#initiativeTracker .combatantActionMenu button:hover,
#initiativeTracker .combatMenuItem:hover{
    background:var(--desk-sunk) !important;
}
#initiativeTracker .hpBarTrack{
    background:var(--desk-line) !important;
    border-radius:2px !important;
}
#initiativeTracker .hpBarFill{
    background:var(--desk-forest) !important;
    box-shadow:none !important;
}
#initiativeTracker .initiativeSideCard{
    background:var(--desk-raised) !important;
    border:1px solid var(--desk-line) !important;
    border-radius:2px !important;
}
#initiativeTracker .combatIconBtn{
    background:var(--desk-sunk) !important;
    border:1px solid var(--desk-line-strong) !important;
    color:var(--desk-ink) !important;
    border-radius:2px !important;
}
/* Only while the initiative panel is actually open (.show). */
#editorView:has(#initiativeTracker.show) #editorHeader{
    background:var(--desk-paper) !important;
    border-bottom:1px solid var(--desk-line) !important;
    box-shadow:none !important;
}
#editorView:has(#initiativeTracker.show) #documentTitle{
    color:var(--desk-ink) !important;
    font:400 28px/1.1 Georgia,"Times New Roman",serif !important;
    letter-spacing:.02em !important;
    text-shadow:none !important;
}
#editorView:has(#initiativeTracker.show) #editorHeaderButtons > button{
    background:var(--desk-sunk) !important;
    border:1px solid var(--desk-line-strong) !important;
    color:var(--desk-ink) !important;
    background-image:none !important;
}

/* Header buttons on sheet editors */
#editorView:has(.monsterSheet) #editorHeaderButtons > button,
#editorView:has(.npcSheet) #editorHeaderButtons > button{
    background:var(--desk-raised) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
}
#creatureEditBtn{
    background:var(--desk-forest) !important;
    color:#fff !important;
    border-color:var(--desk-forest) !important;
}

/* —— Spellbook / spell detail (paper desk; no gradients) —— */
#spellbookWindow,
#customSpellWindow{
    background:rgba(28,27,24,.28) !important;
}
.spellbookBox,
.customSpellBook{
    background:var(--desk-paper) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line) !important;
    border-radius:12px !important;
    box-shadow:none !important;
}
.spellbookHeader,
.customSpellHeader{
    background:var(--desk-raised) !important;
    border-bottom:1px solid var(--desk-line) !important;
}
.spellbookHeader h2,
.customSpellHeader h2{
    color:var(--desk-ink) !important;
}
.spellbookHeader p,
.customSpellHeader p{
    color:var(--desk-ink-soft) !important;
}
.spellbookToolbar,
.spellbookStatus,
#spellResultList{
    background:var(--desk-paper) !important;
    border-color:var(--desk-line) !important;
    color:var(--desk-ink-soft) !important;
}
.spellbookToolbar input,
.spellbookToolbar select,
.customSpellForm :is(input,select,textarea){
    background:#fff !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
}
#spellDetailPane{
    background:var(--desk-paper) !important;
    color:var(--desk-ink) !important;
}
.spellDetailBook{
    background:var(--desk-raised) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line) !important;
    border-radius:12px !important;
    box-shadow:none !important;
}
.spellDetailHeader{
    border-bottom:1px solid var(--desk-line) !important;
}
.spellDetailHeader span{
    color:var(--desk-terracotta) !important;
}
.spellDetailHeader h3,
.spellDescriptionSection h4{
    color:var(--desk-forest-dark) !important;
}
.spellDetailHeader p,
.spellDescriptionSection p,
.spellDetailActions{
    color:var(--desk-ink) !important;
}
.spellDetailFacts span{
    background:#fff !important;
    border:1px solid var(--desk-line) !important;
    color:var(--desk-ink) !important;
}
.spellDetailFacts strong{
    color:var(--desk-terracotta) !important;
}
.spellDescriptionSection h4{
    border-bottom-color:var(--desk-line) !important;
}
.spellDetailActions{
    border-top-color:var(--desk-line) !important;
}
#selectedSpellFavoriteBtn,
#searchOnlineSpellsBtn,
#newCustomSpellBtn,
#editSelectedCustomSpellBtn{
    background:var(--desk-sunk) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line-strong) !important;
    box-shadow:none !important;
}
.spellResultCard{
    background:var(--desk-raised) !important;
    color:var(--desk-ink) !important;
    border:1px solid var(--desk-line) !important;
}
.spellResultCard:hover,
.spellResultCard.active{
    background:var(--desk-sunk) !important;
    border-color:var(--desk-forest) !important;
}
.spellDetailEmpty,
.spellResultEmpty{
    color:var(--desk-ink-soft) !important;
}
.spellDetailEmpty div{
    color:var(--desk-terracotta) !important;
}/* —— Lobby (GM host + player join) — floating dock, does not block the page —— */
#rnlLobbyHostWindow,
#rnlLobbyPlayerWindow,
.rnlLobbyDock{
    position:fixed;
    right:16px;
    bottom:16px;
    /* Above home grid / ad slots; below app header (20000) and left rail (19000). */
    z-index:18500;
    width:min(380px,calc(100vw - 24px));
    max-height:min(72vh,680px);
    padding:0;
    margin:0;
    background:transparent;
    pointer-events:none;
    display:block;
}
#rnlLobbyHostWindow.hidden,
#rnlLobbyPlayerWindow.hidden{display:none !important}
.rnlLobbyDock .rnlLobbyBox,
.rnlLobbyBox{
    position:relative;
    pointer-events:auto;
    width:100%;
    max-height:min(72vh,680px);
    display:flex;
    flex-direction:column;
    overflow:hidden;
    border:1px solid rgba(196,165,116,.45) !important;
    border-radius:12px !important;
    background:linear-gradient(165deg,#1d2621,#141b17) !important;
    color:#f3efe6;
    box-shadow:0 18px 48px rgba(0,0,0,.45) !important;
}
#rnlLobbyHostWindow > .rnlLobbyBox::after,
#rnlLobbyPlayerWindow > .rnlLobbyBox::after{
    content:none !important;
    display:none !important;
}
.rnlLobbyDock.isMinimized .rnlLobbyBody{display:none}
.rnlLobbyDock.isMinimized .rnlLobbyBox{max-height:none;overflow:visible}
/* Use a div, not <header>, so global app header rules do not restyle this chrome. */
.rnlLobbyHeader{
    display:flex !important;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    height:auto !important;
    min-height:0 !important;
    flex:0 0 auto;
    padding:12px 12px 12px 16px !important;
    border-bottom:1px solid rgba(196,165,116,.22) !important;
    background:transparent !important;
    box-shadow:none !important;
    position:relative;
    z-index:1;
}
.rnlLobbyHeader::after{display:none !important;content:none !important}
.rnlLobbyHeaderTitle{min-width:0;flex:1 1 auto}
.rnlLobbyEyebrow{display:block;color:#c5a561;font:700 10px/1.2 Georgia,serif;letter-spacing:.14em;text-transform:uppercase}
.rnlLobbyHeader h2{margin:4px 0 0;font:700 20px/1.15 Georgia,serif;color:#f3efe6}
.rnlLobbyHeaderActions{
    display:flex;
    align-items:center;
    gap:8px;
    flex-shrink:0;
}
.rnlLobbyHeaderActions > button{
    border:1px solid rgba(196,165,116,.35);border-radius:8px;background:#24302a;color:#f3efe6;
    width:40px;height:40px;cursor:pointer;font-size:18px;line-height:1;flex-shrink:0;
    padding:0;margin:0
}
.rnlLobbyCloseBtn{
    background:#a84428 !important;
    border:2px solid #f0c2b4 !important;
    color:#fff !important;
    font-weight:900 !important;
    box-shadow:0 0 0 1px rgba(0,0,0,.35),0 6px 14px rgba(0,0,0,.4) !important
}
.rnlLobbyCloseBtn:hover{
    background:#c45232 !important;
    color:#fff !important
}
.rnlLobbyMinBtn{
    background:#2f3d35 !important;
    border-color:rgba(196,165,116,.55) !important;
    color:#e8c56a !important
}
.rnlLobbyCodePending{
    color:#9aa79d !important;
    letter-spacing:.28em !important;
}
#saveLobbyToMyPageBtn[hidden],
#saveLobbyToMyPageBtn.hidden{display:none !important}
.rnlLobbyInlineActions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.rnlLobbyBody{
    padding:16px 18px 24px;
    display:grid;
    gap:12px;
    flex:1 1 auto;
    min-height:0;
    overflow:auto;
    overscroll-behavior:contain;
}
.rnlLobbyLead{margin:0;color:#c9c2b4;line-height:1.45}
.rnlLobbyCodeRow{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.rnlLobbyCodeRow strong{
    font:700 28px/1 Georgia,serif;letter-spacing:.12em;color:#e8c56a;
    padding:8px 12px;border:1px solid rgba(196,165,116,.35);border-radius:8px;background:#101612
}
.rnlLobbyCodeRow button,.rnlLobbyActions button,.rnlLobbyPlayerList button,.rnlLobbyField + .rnlLobbyActions button{
    border:1px solid rgba(196,165,116,.4);border-radius:8px;background:#2a2318;color:#e8c56a;
    padding:9px 12px;font-weight:700;cursor:pointer
}
.rnlLobbyPrimary{background:linear-gradient(180deg,#3a2f1c,#2a2318) !important;border-color:rgba(197,165,97,.7) !important}
.rnlLobbyDanger{background:#3a2220 !important;border-color:rgba(180,85,45,.55) !important;color:#f0d2c4 !important}
.rnlLobbyMeta,.rnlLobbyHint,.rnlLobbyEmpty{margin:0;color:#9aa79d;font-size:13px;line-height:1.4}
.rnlLobbyActions{display:flex;flex-wrap:wrap;gap:8px}
.rnlLobbyBody h3{margin:8px 0 0;font:700 14px/1.2 Georgia,serif;color:#c5a561;letter-spacing:.06em;text-transform:uppercase}
.rnlLobbyPlayerList{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.rnlLobbyPlayerList li{
    display:flex;align-items:center;justify-content:space-between;gap:10px;
    padding:10px 12px;border:1px solid rgba(196,165,116,.22);border-radius:8px;background:#18211c
}
.rnlLobbyPlayerList strong{display:block;color:#f3efe6}
.rnlLobbyPlayerList span{color:#9aa79d;font-size:12px}
.rnlLobbyField{display:grid;gap:6px;color:#c9c2b4;font-size:13px}
.rnlLobbyField input{
    border:1px solid rgba(196,165,116,.38);border-radius:8px;background:#121916;color:#f3efe6;
    padding:10px 12px;font:700 16px/1.2 Georgia,serif;letter-spacing:.06em
}
#sharePanelWithLobbyBtn.isActive{color:#e8c56a}
.rnlLobbyShareHint{margin:0 10px 8px;padding:0;color:#9aa79d;font-size:11px;line-height:1.35}
#rnlLobbySharedBoard{margin:18px 16px 28px}
.rnlLobbySharedBox{
    border:1px solid rgba(196,165,116,.35);border-radius:12px;padding:16px;
    background:linear-gradient(165deg,#1d2621,#141b17);color:#f3efe6
}
.rnlLobbySharedBox header h2{margin:0;font:700 20px Georgia,serif}
.rnlLobbySharedBox header p{margin:4px 0 0;color:#9aa79d;font-size:13px}
.rnlLobbySharedGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px;margin-top:14px}
.rnlLobbySharedCard{
    display:grid;gap:4px;justify-items:start;text-align:left;padding:12px;
    border:1px solid rgba(196,165,116,.28);border-radius:10px;background:#18211c;color:#f3efe6;cursor:pointer
}
.rnlLobbySharedCard:hover{border-color:#c5a561}
.rnlLobbySharedIcon{font-size:22px}
.rnlLobbySharedCard small{color:#9aa79d;text-transform:uppercase;letter-spacing:.06em}
#rnlLobbySharedBack{
    margin:10px 12px;border:1px solid rgba(196,165,116,.4);border-radius:8px;
    background:#2a2318;color:#e8c56a;padding:8px 12px;font-weight:700;cursor:pointer
}
#editor.rnlLobbyReadOnly{caret-color:transparent}
.lobbyLiveHomePanel{
    outline:1px solid rgba(197,165,97,.55);
    box-shadow:inset 3px 0 0 #c5a561;
}
.lobbyLiveHomePanel .panelKind{color:#c5a561 !important}
#saveLobbyToMyPageBtn{color:#e8c56a}
#rnlRail [data-rail-switch-locked]{
    opacity:.72;cursor:pointer
}

/* —— Floating initiative dock (Guides paper, draggable) —— */
#rnlInitFloat,
.rnlInitFloat{
    position:fixed;
    left:calc(var(--rail-width, 88px) + 16px);
    bottom:16px;
    /* Above body > header (20000) and #editorHeader (31000) so the drag bar stays reachable */
    z-index:32050;
    width:min(340px,calc(100vw - 32px));
    max-height:min(70vh,560px);
    pointer-events:none;
}
#rnlInitFloat.hidden{display:none !important}
.rnlInitFloatBox{
    pointer-events:auto;
    display:flex;
    flex-direction:column;
    max-height:min(70vh,560px);
    overflow:hidden;
    border:1px solid var(--desk-line-strong,#CFC8BA);
    border-radius:10px;
    background:var(--desk-paper,#F7F4ED);
    color:var(--desk-ink,#1C1B18);
    box-shadow:0 18px 40px rgba(28,27,24,.18);
}
.rnlInitFloat.isMinimized .rnlInitFloatBody{display:none}
.rnlInitFloatHeader{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    flex:0 0 auto;
    padding:12px 12px 10px 16px;
    border-bottom:1px solid var(--desk-line,#E2DDD3);
    background:var(--desk-raised,#FCFAF5);
    cursor:grab;
    touch-action:none;
    user-select:none;
}
.rnlInitFloatHeader.isDragging{cursor:grabbing}
.rnlInitFloatEyebrow{
    display:block;
    color:var(--desk-terracotta,#B4552D);
    font:700 10px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;
    letter-spacing:.14em;
    text-transform:uppercase;
}
.rnlInitFloatHeader h2{
    margin:4px 0 0;
    color:var(--desk-ink,#1C1B18) !important;
    font:400 22px/1.1 Georgia,"Times New Roman",serif !important;
    letter-spacing:.02em;
    text-shadow:none;
}
.rnlInitFloatHeaderActions{display:flex;gap:6px;flex-shrink:0}
.rnlInitFloatHeaderActions > button{
    width:34px;height:34px;padding:0;margin:0;cursor:pointer;
    border:1px solid var(--desk-line-strong,#CFC8BA);border-radius:8px;
    background:var(--desk-sunk,#EFEAE0);color:var(--desk-ink,#1C1B18);font-size:16px;line-height:1
}
.rnlInitFloatCloseBtn{
    background:var(--desk-terracotta,#B4552D) !important;
    border-color:var(--desk-terracotta,#B4552D) !important;
    color:#fff !important;font-weight:900
}
.rnlInitFloatBody{
    padding:14px 16px 16px;
    display:grid;gap:10px;
    overflow:auto;min-height:0;flex:1 1 auto
}
.rnlInitFloatMeta{
    display:flex;justify-content:space-between;gap:8px;
    color:var(--desk-ink-soft,#57534A);font:600 12px/1.3 system-ui,-apple-system,"Segoe UI",sans-serif;
    letter-spacing:.04em;text-transform:uppercase
}
.rnlInitFloatMeta strong{color:var(--desk-ink,#1C1B18);font-size:14px}
.rnlInitFloatNow,
.rnlInitFloatNext{
    display:grid;gap:2px;
    padding:10px 12px;
    border:1px solid var(--desk-line,#E2DDD3);
    border-radius:8px;
    background:var(--desk-raised,#FCFAF5);
}
.rnlInitFloatNow{border-left:4px solid var(--desk-forest,#2F5D46)}
.rnlInitFloatNext{border-left:4px solid var(--desk-terracotta,#B4552D)}
.rnlInitFloatLabel{
    color:var(--desk-terracotta,#B4552D);
    font:700 10px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;
    letter-spacing:.14em;text-transform:uppercase
}
.rnlInitFloatNow strong,
.rnlInitFloatNext strong{
    color:var(--desk-ink,#1C1B18);
    font:400 20px/1.15 Georgia,"Times New Roman",serif
}
.rnlInitFloatNow small,
.rnlInitFloatNext small{
    color:var(--desk-ink-soft,#57534A);
    font:italic 400 13px/1.3 Georgia,serif
}
.rnlInitFloatOrder{
    list-style:none;margin:0;padding:0;display:grid;gap:4px;
    max-height:160px;overflow:auto
}
.rnlInitFloatOrder li{
    display:grid;grid-template-columns:24px minmax(0,1fr);gap:8px;align-items:center;
    padding:6px 8px;border:1px solid transparent;border-radius:8px;
    color:var(--desk-ink,#1C1B18);font:600 13px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif
}
.rnlInitFloatOrder li span{color:var(--desk-ink-soft,#57534A);font-size:11px}
.rnlInitFloatOrder li.isCurrent{
    border-color:var(--desk-forest,#2F5D46);
    background:var(--desk-sunk,#EFEAE0)
}
.rnlInitFloatOrder li.isCurrent strong{color:var(--desk-forest-dark,#234836)}
.rnlInitFloatEmpty,
.rnlInitFloatEmptyItem{
    margin:0;color:var(--desk-ink-soft,#57534A);
    font:italic 400 14px/1.4 Georgia,serif
}
.rnlInitFloatActions{display:flex;flex-wrap:wrap;gap:8px}
.rnlInitFloatActions button{
    border:1px solid var(--desk-line-strong,#CFC8BA);border-radius:8px;
    background:var(--desk-sunk,#EFEAE0);color:var(--desk-ink,#1C1B18);
    padding:8px 10px;font:700 12px/1 system-ui,-apple-system,"Segoe UI",sans-serif;
    letter-spacing:.04em;cursor:pointer
}
.rnlInitFloatPrimary{
    background:var(--desk-forest,#2F5D46) !important;
    border-color:var(--desk-forest-dark,#234836) !important;
    color:#fff !important
}
@media (max-width:760px){
    #rnlInitFloat,.rnlInitFloat{
        left:12px;right:12px;width:auto;bottom:88px
    }
}
