/* Muted alchemical theatre palette, shared by every mode. */
:root{--ink:#e0d5c8;--purple:#776379;--pink:#793e50;--gold:#b39a72;--paper:#201722;--velvet:#3c182e;--wine:#351620}
body{color:var(--ink);background:#100d15;background-image:repeating-linear-gradient(45deg,#1c1521 0 2px,#120f18 2px 6px)}
.edge-decor{filter:none;background-image:url('cool-plum-study.png')}
.shell{background:#15101bd9;border-color:#685866;box-shadow:0 0 0 4px #120e18b0,0 0 0 6px #554653}
header,.toolbar,.bottom,footer,.modes{background:#19121c;border-color:#786776;color:#c5b29b}
header .spark,header button,.toolbar button,.bottom button,.meaning-heading{color:#bba27c}
header button{background:#2c1b29;border-color:#77614d}
.window{background:#17121def;border-color:#7d6b79;box-shadow:0 0 0 2px #100d14,0 0 0 5px #342636}
.titlebar{background:linear-gradient(#493040,#241b2c);color:#d5c5b2;border-color:#7e6975}
.modes button,.modes button:nth-child(2n),footer nav button{background:linear-gradient(#493342,#2b1c2c 48%,#201625 50%,#352638);border-color:#8a7580;color:#e0d1c5}
.modes button[aria-pressed=true]{background:linear-gradient(#653445,#472333 50%,#351c2b 51%,#503044);border-color:#b39a72;color:#eadcc4;box-shadow:inset 0 0 6px #100b1480}
.scorebar{background:#211927;color:#baa8b7}.scorebar strong,#result .big{color:#baa17a}
.progress{background:#100d15}.progress div{background:linear-gradient(90deg,#653749,#a28c70)}
.card,.meaning{background:#241b2a;color:#e0d5c8;border-color:#706071}
.card.selected,.meaning.selected{background:#493044!important;border-color:#b39a72!important}
.letter{background:#463044;color:#d3bea0;border-color:#816d77}
#selection{background:#251b2b;color:#d6c6cd;border-color:#80697a}
.status{background:#201827;color:#c5b3c1}.bottom #next{background:#4c2435;color:#dfcfb8;border-color:#a28b68}
#study{color:#e0d5c8}#study h2,#study h3,summary{color:#c7b08b}
#study button,select,.toolbar select,#modal-body button{background:#332333;color:#e0d1c5;border-color:#82707c}
#study textarea,#meaning-search{background:#16121c;color:#e0d5c8;border-color:#82707c}
textarea::placeholder,input::placeholder,.small-note,.reference-card small{color:#b9a8b9}
details,.reference-card,.source-notes,.journal-entry{background:#201825;border-color:#705c6d}
blockquote{background:#281c2b;border-color:#805268;color:#d9ccbf}a,#modal-body a{color:#c0a67e}
.study-image,.reference-image,.reference-card summary>img{border-color:#a18c74}
dialog{background:#1d1523;color:#e0d5c8;border-color:#89717d}
.tree-scroll{background:radial-gradient(ellipse,#312336,#17121e);border-color:#756275}
.tree-board line{stroke:#9f8867}.tree-board circle{fill:#342438;stroke:#ad9471}.tree-board text{fill:#d9c9ae}.tree-board .sef-label{fill:#c3b0bd}
#study .path-card.card-back,#study #mystery.card-back:not(:disabled){background:repeating-linear-gradient(45deg,#382036,#382036 5px,#4b293d 6px,#4b293d 8px)!important;color:#cbb591!important;border-color:#a58c68!important}
#study .path-card small{background:#261b2c;color:#cbb591}.path-picker button{background:#302132!important;color:#dfcfbc!important;border-color:#89717d!important}#tree-status{color:#c4ac88}
button:focus-visible,select:focus-visible,textarea:focus-visible,input:focus-visible,summary:focus-visible{outline-color:#c5ad87}
/* Tint only the decorative cloth, leaving card faces and text untouched. */
.theatre>.velvet-drape{filter:saturate(.45) brightness(.65);background-color:#2a1229}
.theatre>.velvet-drape::after{content:'';position:absolute;inset:0;background:#481a32;mix-blend-mode:soft-light;pointer-events:none}
.intro.illustrated-study{border-color:#786675}
