/* Shared journal and new mode controls, using the arcade's paper / plum palette. */
.spellbook-dialog{width:820px;max-width:calc(100vw - 24px);max-height:88dvh;overflow:auto;border:1px solid #b49bc4;border-radius:14px;background:#faf5eb;color:#44344f;padding:28px;box-shadow:0 20px 100px #22192d88}.spellbook-dialog::backdrop{background:#241d36b8}.spellbook-heading{display:flex;align-items:start;justify-content:space-between;gap:16px}.spellbook-heading h2{font:36px Georgia,serif;margin:8px 0 18px}.spellbook-dialog button,.expansion-controls button,.expansion-controls select{min-height:44px;border:1px solid #b49cc3;background:#eee4f2;color:#513d60;border-radius:6px;padding:9px 12px;cursor:pointer}.spellbook-dialog h3{font:23px Georgia,serif;margin-top:28px}.spellbook-dialog p{font-size:13px;line-height:1.7}.spellbook-dialog small{display:block;line-height:1.6;font-size:11px;margin-top:5px}.spellbook-badges{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.spellbook-badge{border:1px dashed #d4c6d9;border-radius:7px;padding:12px;color:#7c6b86;font-size:12px}.spellbook-badge.earned{border-style:solid;border-color:#9eb9a3;background:#edf1e2;color:#39594b}.spellbook-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.spellbook-card{display:flex;flex-direction:column;gap:9px;padding:14px;border:1px solid #d7cadd;background:#fffaf2;border-radius:10px;min-width:0}.spellbook-card strong{font-size:13px;line-height:1.5}.spellbook-art{height:110px;display:grid;place-items:center}.spellbook-art svg{height:100%;width:100%;min-height:0;max-height:110px}.spellbook-card button{font-size:11px}.spellbook-foot{border-top:1px solid #d9cbde;padding-top:18px;color:#82718b}.spellbook-empty{grid-column:1/-1;color:#85728d}#spellbook-current{display:flex;gap:14px;align-items:center;justify-content:space-between;padding:15px;background:#ede3f0;border-radius:8px;font-size:13px}.spellbook-wizard-progress{border-bottom:1px solid #ded2e1;padding-bottom:12px}.spellbook-wizard-progress h4{font:18px Georgia,serif}.expansion-controls{padding:14px 20px;background:#ede5f0;display:flex;gap:12px;align-items:center;flex-wrap:wrap}.expansion-controls label{font-size:12px;display:flex;gap:8px;align-items:center}.expansion-controls select{max-width:100%;font-size:12px}.expansion-note{font-size:11px;line-height:1.6;color:#776581;margin:0;flex:1;min-width:150px}.upgrade-panel{background:#40324f;color:#f8ead3;padding:22px}.upgrade-panel h2{font:27px Georgia,serif;margin:4px 0 8px}.upgrade-panel p{font-size:12px;line-height:1.7}.upgrade-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.upgrade-options button{min-height:80px;padding:15px;text-align:left;border:1px solid #b7a0c5;border-radius:8px;background:#f6eeda;color:#4c365d}.upgrade-options strong,.upgrade-options small{display:block}.upgrade-options small{font-size:11px;line-height:1.6;margin-top:8px}.upgrade-options button:disabled{opacity:.5;cursor:default}.endless-summary{padding:10px 20px;font-size:11px;line-height:1.6;color:#705a80;background:#f1e9f3}.cup-route{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;list-style:none;margin:0;padding:15px;background:#ede5f1}.cup-route li{font-size:10px;line-height:1.6;padding:8px;border:1px solid #d3c2de;border-radius:6px;min-width:0}.cup-route strong{display:block;font-size:11px}.cup-route .current{background:#543d68;color:#f4e8cf}.cup-route .complete{background:#dcead8;color:#415c43}.cup-rival-note{padding:12px 20px;font-size:12px;line-height:1.7;margin:0;background:#f3eddf;color:#62506b}.living-saves{padding:14px 20px;display:flex;flex-wrap:wrap;gap:10px;align-items:center;background:#ede5f0}.living-saves button{border:1px solid #b29bbf;border-radius:5px;padding:10px 12px;min-height:44px;background:#f8f0df;color:#54405f}.living-saves p{font-size:11px;line-height:1.6;margin:0;flex-basis:100%}.living-saves strong{font-size:12px}.living-save-slots{display:flex;gap:8px;flex-wrap:wrap}.living-object small{pointer-events:none}.living-object.ingredient{background:#60857e;color:#f3ebbb}.masthead nav{flex-wrap:wrap;row-gap:3px}
@media(max-width:580px){.spellbook-dialog{padding:18px}.spellbook-heading h2{font-size:29px}.spellbook-badges{grid-template-columns:1fr}.spellbook-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.spellbook-card{padding:10px}.spellbook-card button{padding:8px 4px}.spellbook-art{height:90px}.spellbook-art svg{max-height:90px}#spellbook-current{flex-wrap:wrap}.expansion-controls{padding:12px}.expansion-controls label{flex-wrap:wrap;max-width:100%}.upgrade-panel{padding:16px}.upgrade-options{gap:8px}.upgrade-options button{padding:11px}.cup-route{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px}.living-saves{padding:12px}.living-save-slots{width:100%}.living-save-slots button{flex:1;font-size:11px}.cup-rival-note{font-size:11px;padding:12px}}

.duelist.ward-gathering .duel-ward{display:block;border-style:dashed;opacity:.6;background:transparent}#living-brew{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}#living-brew-order{flex-basis:100%;margin:0;font-size:13px}.living-panel-actions{display:flex;flex-direction:column;gap:8px}

.masthead nav #open-spellbook{appearance:none;background:none;border:0;border-bottom:2px solid transparent;padding:20px 0;font:inherit;font-size:12px;color:#786284;cursor:pointer;min-height:44px}.masthead nav #open-spellbook:hover{color:#4d345f;border-bottom-color:#9675ad}.spellbook-heading{position:sticky;top:-28px;z-index:2;background:#faf5eb;padding:10px 0}.spellbook-heading>button{white-space:nowrap}.upgrade-panel>button{min-height:44px;padding:10px 12px;border:1px solid #a891b6;border-radius:5px;color:#f6e7d0;margin-top:14px}.duel-stage:has(.duel-overlay:not([hidden])){min-height:350px}@media(max-width:580px){.masthead nav #open-spellbook{padding:12px 0}.spellbook-heading{top:-18px}.duel-stage:has(.duel-overlay:not([hidden])){min-height:340px}}
