/* The Forbidden Grimoire — original vector engravings, parchment pages and a bound leather cover. No remote art or fonts. */
#runePractice{--spell-ink:#8c3a22;width:min(1000px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:12px 15px;margin:auto;background:repeating-linear-gradient(116deg,#ffffff02 0px,#ffffff02 1px,transparent 1px,transparent 5px),radial-gradient(ellipse at 50% 0,#4e342d,#211923 78%);border:4px double #b48b53;border-radius:12px;color:#ebd3a2;box-shadow:0 0 0 3px #151218,0 0 0 5px #65432e,0 20px 65px #000c;font:13px/1.4 system-ui,sans-serif;box-sizing:border-box}
#runePractice::backdrop{background:#080a10dc}.rune-heading{display:flex;align-items:center;gap:11px;padding:0 4px 10px}.grimoire-seal{width:40px;height:40px;display:grid;place-items:center;border:2px solid #af8549;outline:1px solid #7c5734;outline-offset:3px;border-radius:50%;color:#e8c87d;font-size:27px;background:#2e2323}.rune-heading small{font:9px Georgia,serif;letter-spacing:.17em;color:#cbb487}.rune-heading h2{font:700 clamp(20px,3vw,29px) Georgia,serif;margin:2px 0;color:#f4dfb7;text-shadow:1px 2px #170e10}.rune-heading button{margin-left:auto;color:#ebd3a2;background:#342728;border:1px solid #997346;width:32px;height:32px;font-size:23px;cursor:pointer;flex:none}
#runeCatalog{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;margin:0 0 8px}.rune-entry{display:flex;flex-direction:column;align-items:center;gap:1px;justify-content:center;min-height:52px;min-width:0;border:1px solid #78583a;background:linear-gradient(#453227,#302620);color:#e9d3a6;padding:4px 2px;cursor:pointer;font:700 11px Georgia,serif;text-align:center}.rune-entry[aria-pressed=true]{background:linear-gradient(#cfaf78,#a9814f);color:#281d18;border-color:#e8c58a;box-shadow:inset 0 0 0 2px #7c4e32}.rune-entry svg{width:28px;height:28px;flex:none;background:#201b23;border-radius:50%;padding:1px}.rune-entry b{overflow-wrap:anywhere}
.grimoire-spread{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px;padding:4px;background:#251b17;border:1px solid #a98252;box-shadow:0 5px 0 #9d754a,0 8px 0 #60422b,0 11px 0 #3b261c}.grimoire-page{position:relative;min-width:0;padding:13px 17px 12px;background:repeating-linear-gradient(0deg,#70472106 0px,#70472106 1px,transparent 1px,transparent 4px),radial-gradient(ellipse at 48% 42%,#efdfb9 0,#e4c99a 56%,#c29b66 100%);color:#36281f;box-shadow:inset 0 0 18px #69432155,inset -4px 0 8px #68432344;border:1px solid #a98454;display:flex;flex-direction:column;gap:7px}.grimoire-page:before{content:'';position:absolute;inset:5px;border:1px solid #9e774b77;pointer-events:none}.grimoire-page:after{content:'';position:absolute;inset:8px;border:1px solid #a9824c44;pointer-events:none}.grimoire-folio{display:flex;justify-content:space-between;gap:6px;font:700 9px Georgia,serif;letter-spacing:.08em;color:#6c4b31;border-bottom:1px solid #a27d50;padding-bottom:4px}.grimoire-folio #runeKnowledge{letter-spacing:0;color:#8b4438;text-align:right}.grimoire-folio #runeKnowledge[data-learned=true]{color:#32603d}
.grimoire-lore h3,.rune-instructions h3{font:700 clamp(19px,2.5vw,26px) Georgia,serif;margin:0;color:var(--spell-ink)}.grimoire-loretext{font:italic 12px/1.45 Georgia,serif;color:#61462f;margin:0;min-height:32px}.grimoire-illustration{position:relative;background:#ad82491a;border:1px solid #a98454;min-height:92px;display:flex;justify-content:center;align-items:center;overflow:hidden}.grimoire-illustration>svg{width:100%;height:clamp(92px,17vh,145px)}.grimoire-rune-seal{position:absolute;right:8px;bottom:7px;width:48px;height:48px;background:radial-gradient(#382b2c,#1e1920);border:2px solid #926c3b;border-radius:50%;box-shadow:0 2px 5px #38241677}.grimoire-rune-seal svg{display:block;width:100%;height:100%;animation:grimoire-sigil 3s ease-in-out infinite}@keyframes grimoire-sigil{50%{filter:drop-shadow(0 0 3px #e1d7ae88)}}.grimoire-rule{display:flex;align-items:center;justify-content:center;gap:8px;color:#745131;font:700 11px Georgia,serif;text-transform:uppercase;letter-spacing:.12em}.grimoire-rule:before,.grimoire-rule:after{content:'';height:1px;background:#a27d50;flex:1}.grimoire-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.grimoire-stats>div{padding:4px;border:1px solid #ad89575e;background:#f3e1bd55;min-width:0;text-align:center}.grimoire-stats small{display:block;color:#6c4d33;font-size:9px}.grimoire-stats b{display:block;font:700 13px Georgia,serif;color:#37271e;overflow-wrap:anywhere}.grimoire-effect{margin:0;font:12px/1.45 Georgia,serif;color:#463223}.grimoire-mastery{border-top:1px solid #ac8758;padding-top:5px;font-size:9px;color:#745637;margin-top:auto}.grimoire-tiers{display:flex;gap:4px;margin:4px 0}.grimoire-tiers span{flex:1;border:1px solid #9f8055;text-align:center;padding:3px 1px;color:#79684f;font:10px Georgia,serif}.grimoire-tiers span:first-child{background:#72533c;color:#fae2ad}.grimoire-mastery small{font-size:9px}
.rune-instructions{display:flex;justify-content:space-between;align-items:center;gap:8px}.rune-instructions h3{font-size:20px}.rune-instructions p{margin:2px 0;color:#5d4733;font:12px Georgia,serif}.rune-instructions button{white-space:nowrap;border:1px solid #8d704c;color:#f4e2b7;background:#5b4230;padding:5px 7px;cursor:pointer;font-size:10px}.rune-drawing{position:relative;border:3px double #8a6a42;background:radial-gradient(ellipse,#27313b,#10151d 80%);box-shadow:inset 0 0 18px #0009;flex:1;display:flex;flex-direction:column;min-height:150px}.grimoire-canvas-label{text-align:center;color:#a58c62;font:9px Georgia,serif;letter-spacing:.12em;padding:5px 0 0;pointer-events:none}.rune-drawing #runeCanvas{display:block;width:100%;height:clamp(150px,29vh,245px);flex:1;touch-action:none;cursor:crosshair}#runeFeedback{min-height:30px;padding:6px;color:#493b30;border:1px solid #a27d5055;background:#f5e6c244;font:12px/1.35 Georgia,serif}#runeFeedback[data-result=good]{color:#235b37}#runeFeedback[data-result=other]{color:#7b4b13}#runeFeedback[data-result=bad]{color:#9a382b}.grimoire-practice-stats{display:flex;justify-content:space-between;gap:6px;font-size:10px;color:#61482f}.rune-controls{display:flex;align-items:center;justify-content:space-between;gap:8px}.rune-controls span{font-size:10px;color:#654c34}.grimoire-note{margin:0;font:italic 11px/1.35 Georgia,serif;color:#654a32}.rune-footer{display:flex;align-items:center;justify-content:space-between;gap:7px;margin-top:15px;font:700 11px Georgia,serif}.rune-footer .btn,.rune-controls .btn{flex:0 1 auto;min-width:0;min-height:29px;padding:4px 8px;font-size:10px;background:#49392e;color:#f0d4a0;border:1px solid #987245!important;box-shadow:none}.rune-open{color:#b2e5ed!important}
@media(max-width:680px){#runePractice{width:calc(100vw - 14px);padding:9px;max-height:calc(100dvh - 14px)}#runeCatalog{grid-template-columns:repeat(3,minmax(0,1fr))}.rune-entry{min-height:35px;flex-direction:row;gap:3px;font-size:10px}.rune-entry svg{width:23px;height:23px}.grimoire-spread{grid-template-columns:1fr}.grimoire-page{padding:12px 13px}.grimoire-illustration>svg{height:105px}.rune-drawing #runeCanvas{height:220px;flex:none}.rune-footer{flex-wrap:wrap}.rune-heading h2{font-size:20px}.grimoire-seal{width:32px;height:32px}}@media(prefers-reduced-motion:reduce){.grimoire-rune-seal svg{animation:none}}

/* Permanent spell knowledge: no changes to existing Hades portrait or animations. */
.grimoire-unlock{font:700 11px/1.35 Georgia,serif;color:#654a32;border:1px solid #a98454;background:#f5e5be66;padding:6px;margin:0}.grimoire-index-state{font:9px system-ui,sans-serif;opacity:.82}.scroll-library{border-top:1px solid #80684a;padding-top:8px;margin-top:8px;min-width:0}.scroll-library header{display:block;margin:0 0 6px;padding:0;border:0}.scroll-library header h3{margin:0;color:#f0c98e;font:700 17px Georgia,serif}.scroll-library header p{margin:3px 0;font:11px system-ui,sans-serif;color:#c9bda9}.scroll-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.scroll-item{grid-template-rows:56px 1fr auto;min-width:0}.scroll-art{display:grid;place-items:center;background:radial-gradient(ellipse,var(--scroll-color)22,#111722);border:1px solid #806a49;overflow:hidden}.scroll-paper{width:46px;height:42px;display:grid;place-items:center;background:linear-gradient(90deg,#8d6039,#d7b17b 15%,#ead1a0 50%,#d7b17b 85%,#8d6039);border-block:3px solid #8b5f36;box-shadow:2px 2px 5px #0008}.scroll-paper svg{width:35px;height:35px;background:#2b2630;border-radius:50%}.scroll-library #scrollNotice{margin:3px 0;color:#eec593;font-size:11px}.scroll-library #scrollNotice:empty{display:none}@media(max-width:440px){.scroll-grid{grid-template-columns:1fr}.grimoire-index-state{display:none}}

.grimoire-tiers span:first-child{background:transparent;color:#79684f}.grimoire-tiers span.mastery-owned{background:#72533c;color:#fae2ad}.grimoire-mastery #runeXp{font-weight:700;color:#5d422c}.grimoire-mastery #runeEvolution{margin:4px 0;font:11px/1.4 Georgia,serif;color:#5d422c}.grimoire-mastery #runeRitual{background:#49392e;color:#f0d4a0;padding:5px 8px;min-height:28px;font-size:11px;margin:3px 0}.grimoire-mastery #runeRitual[hidden]{display:none}.grimoire-mastery #runeRitual:disabled{opacity:.5}.grimoire-mastery #runeRitualStatus{display:block}.magic-tier-select{display:flex;align-items:center;gap:4px;font-size:11px;color:#d6c8ad}.magic-tier-select select{background:#202c3a;color:#e4d3b1;border:1px solid #7a6851;padding:3px}
