#modal:has(.evolution-book){max-width:1060px;width:calc(100% - 24px);max-height:94dvh;padding:26px 24px 16px;border:3px solid #a67b48;background:linear-gradient(120deg,#32253d,#211c30);box-shadow:0 24px 80px #100b20aa;color:#f5e4bd;overflow-y:auto;scrollbar-color:#b99661 #2b2237}
#modal:has(.evolution-book)>#close{z-index:6;position:absolute;top:12px;right:12px}
.evolution-book{padding:0 8px}.evolution-book .book-heading{display:flex;align-items:center;justify-content:space-between;padding-right:48px;gap:20px}.book-heading .eyebrow{color:#c7a573;font-size:9px;letter-spacing:2px}.book-heading h2{font:500 32px/1.15 'Fredoka',sans-serif;color:#ffe4aa;margin:6px 0}.book-heading-seal{font-size:42px;line-height:1;color:#cda66a}
.evolution-book .book-intro{font-size:11px;line-height:1.6;color:#d7c7ab;margin:6px 0 10px;max-width:720px}.evolution-book .evolution-summary{border:0;border-bottom:1px solid #b4915d55;border-radius:0;padding:0 0 10px;background:none;color:#d7bc87;font-size:10px;margin:0 0 10px}.evolution-book .evolution-tools{grid-template-columns:minmax(0,1fr) 190px;gap:12px}.evolution-book .evolution-tools label{display:flex;flex-direction:column;align-items:stretch;gap:6px;color:#dcc8a1;font-size:10px}.evolution-book .evolution-tools input,.evolution-book .evolution-tools select{border:1px solid #b39462;background:#fff0d0;color:#63492e;border-radius:7px;padding:8px 12px}.evolution-book .evolution-result-count{color:#c6ab7d;font-size:10px;margin:9px 0 8px}
.evolution-book .evolution-book-pages{max-height:none;overflow:visible;padding:0;outline-offset:5px;min-width:0}.evolution-spread{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);border:5px solid #76503b;border-radius:8px 12px 12px 8px;box-shadow:0 3px #c2a16a,0 8px #4e3a30,0 13px 22px #0005;position:relative;isolation:isolate;animation:book-reveal105 .22s ease-out}.evolution-spread:after{content:'';position:absolute;z-index:3;left:calc(50% - 12px);width:24px;inset-block:0;background:linear-gradient(90deg,transparent,#805a3644 40%,#67412870 50%,#fff4d575 65%,transparent);pointer-events:none}
.evolution-leaf{position:relative;min-width:0;padding:14px 24px 26px;background:radial-gradient(ellipse at 50% 35%,#fff9e4aa,transparent 65%),repeating-linear-gradient(0deg,#a9833310 0 1px,transparent 1px 5px),#efdfb6;color:#62472f;display:flex;flex-direction:column;text-align:center}.origin-leaf{border-radius:3px 0 0 3px;background-color:#f2e4c3;background-image:linear-gradient(90deg,transparent 85%,#9f7e4233),radial-gradient(ellipse,#fff9e4aa,transparent 70%)}.awakened-leaf{border-radius:0 7px 7px 0;background-image:linear-gradient(90deg,#7a57331c,transparent 12%),radial-gradient(ellipse,#fffaf0aa,transparent 70%)}
.leaf-running-head{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:8px;font-weight:900;letter-spacing:1.4px;color:#9b7b4f;border-bottom:1px solid #b999665c;padding-bottom:7px;margin-bottom:10px;min-height:20px}.book-creature-type{font-size:8px;letter-spacing:1px;color:#9b774e;font-weight:900;line-height:1.6;margin-top:7px}.book-creature-type>span{padding:0 8px;color:#b88e42}.evolution-book .evolution-leaf h3{font:500 28px/1.15 'Fredoka',sans-serif;margin:7px 0;color:#63452e;overflow-wrap:anywhere}
.book-portrait{position:relative;display:grid;place-items:center;height:210px;margin:5px 0 10px}.book-portrait img{position:relative;z-index:1;width:200px;max-width:100%;height:200px;object-fit:contain;filter:drop-shadow(0 9px 7px #7455262b)}.book-orbit{position:absolute;width:160px;height:160px;border:1px solid #b49a6266;border-radius:50%;background:radial-gradient(#fff6cd,transparent 70%);outline:1px solid #b49a622b;outline-offset:10px}.book-orbit:after{content:'✦';position:absolute;top:-9px;left:calc(50% - 7px);color:#c19c59;background:#f4e6c3;padding:0 3px;font-size:13px}.book-lore{font-size:11px;line-height:1.7;margin:auto 0 11px;text-wrap:pretty;max-width:350px;align-self:center;color:#806345}.book-progress{display:flex;justify-content:center;gap:18px;margin:7px 0 4px}.book-progress>span{display:flex;flex-direction:column;gap:5px;font-size:8px;color:#96794f}.book-progress b{display:grid;place-items:center;width:27px;height:27px;border:1px solid #b89a68;border-radius:50%;font-size:11px;background:#ead7ab;color:#9b7a48}.book-progress .complete b{color:#fff9d9;background:#6d8a67;border-color:#5e7a53}
.book-stage-tabs{display:flex;justify-content:center;gap:6px;margin:0 0 6px}.book-stage-tabs button{border:1px solid #b08b54;background:#e5d1a4;color:#785730;padding:7px 12px;border-radius:4px 4px 9px 9px;font-size:10px;font-weight:900;cursor:pointer}.book-stage-tabs button[aria-selected=true]{background:#705143;color:#fff0c6;border-color:#614639;box-shadow:inset 0 2px #bd9060}.book-stage-tabs button:focus-visible,.book-turn:focus-visible{outline:3px solid #729d9a;outline-offset:3px}
.book-evolution-art{height:210px;display:grid;place-items:center;background:radial-gradient(ellipse,#cfa45f2b,transparent 65%)}.book-evolution-art img{width:200px;max-width:100%;height:200px;object-fit:contain;filter:drop-shadow(0 8px 5px #7854292b)}.evolution-book .awakened-leaf h3{font-size:22px;min-height:45px;display:grid;place-items:center;margin:6px 0}.book-skill{font-size:11px;font-weight:900;color:#765333;line-height:1.5;margin:6px 0}.book-skill small{display:block;font-size:10px;font-weight:600;color:#9b7c51;margin-top:3px}.book-gains{display:flex;justify-content:center;gap:10px;margin:9px 0}.book-gains span{font-size:10px;padding:6px 14px;border-top:1px solid #b497624d;border-bottom:1px solid #b497624d;color:#8c6b43}.book-gains b{font-size:15px;color:#6a7852;padding-right:4px}.book-form-status{font-size:10px;line-height:1.5;min-height:25px;color:#917149;margin:5px 0}.evolution-book .book-evolve-button{width:100%;max-width:280px;margin:0 auto;min-height:38px;font-size:11px}.evolution-book .book-evolve-button:disabled{opacity:.65}.leaf-number{position:absolute;bottom:8px;left:0;right:0;font-size:10px;color:#ad8d5b;font-style:italic}
.book-pagination{display:grid;grid-template-columns:1fr minmax(120px,240px) 1fr;align-items:center;gap:16px;padding:20px 0 10px;position:sticky;bottom:-16px;background:#2c2238;z-index:5;border-radius:0 0 8px 8px}.book-turn{background:none;border:0;color:#efd29a;cursor:pointer;display:flex;align-items:center;justify-content:flex-start;gap:8px;padding:8px 0;font:700 12px 'Nunito',sans-serif}.book-turn:last-child{justify-content:flex-end}.book-turn:disabled{opacity:.3;cursor:default}.book-jump{min-width:0;text-align:center}.book-jump>span{display:block;font-size:8px;color:#b99f77;margin-bottom:5px}.book-jump select{width:100%;max-width:240px;border:1px solid #a5885a;background:#3c2e43;color:#f0d9aa;border-radius:6px;padding:7px 9px;font-size:11px}.book-rules{border-top:1px solid #a6885755;padding-top:11px;color:#bfa67c;font-size:10px;line-height:1.7}.book-rules summary{cursor:pointer;color:#dcc294;font-weight:800}.book-rules p{font-size:11px;line-height:1.7}.evolution-book-empty{text-align:center;padding:60px 20px;background:#efdfb6;color:#775631;border-radius:8px}.evolution-book-empty>span{font-size:44px;color:#b99254}.evolution-book-empty h3{font:500 25px 'Fredoka'}.evolution-book-empty p{font-size:12px;line-height:1.7}
@keyframes book-reveal105{from{opacity:.65;transform:translateX(5px)}to{opacity:1;transform:none}}
#battle-view .battle-vitals{background:#d7c89e url('assets/hud-biome-0-v105.webp') center/100% 100% no-repeat;padding:20px 26px;border-color:#b5955e;gap:22px}#battle-view .battle-vitals .status{background:linear-gradient(135deg,#fff5dcdf,#f0e0bbd9);border-color:#947a4e80;box-shadow:0 2px 10px #4a352a1a,inset 0 1px #fff9e8}
@media(max-width:650px){#modal:has(.evolution-book){width:calc(100% - 12px);padding:24px 10px 15px;max-height:95dvh}.evolution-book{padding:0 2px}.book-heading h2{font-size:28px}.book-heading-seal{font-size:34px}.evolution-book .book-intro{font-size:11px}.evolution-book .evolution-tools{grid-template-columns:minmax(0,1fr) 125px;gap:8px}.evolution-book .evolution-tools input,.evolution-book .evolution-tools select{padding:8px;font-size:11px}.evolution-spread{grid-template-columns:minmax(0,1fr);border-width:4px}.evolution-spread:after{display:none}.evolution-leaf{padding:14px 18px 26px}.origin-leaf{border-radius:3px 3px 0 0;border-bottom:2px solid #b4915d66;display:grid;grid-template-columns:90px minmax(0,1fr);column-gap:12px;text-align:left}.origin-leaf .leaf-running-head{grid-column:1 / -1;margin-bottom:8px}.origin-leaf .book-creature-type{grid-column:2;font-size:7px;margin:0;align-self:end}.origin-leaf h3{grid-column:2;font-size:23px!important;margin:4px 0!important}.origin-leaf .book-portrait{grid-column:1;grid-row:2 / 5;width:100%;height:110px;margin:0}.origin-leaf .book-portrait img{height:100px}.origin-leaf .book-orbit{width:74px;height:74px;outline-offset:4px}.origin-leaf .book-lore{grid-column:2;font-size:10px;line-height:1.5;margin:3px 0 8px}.origin-leaf .book-progress{grid-column:1 / -1;gap:24px;margin:8px 0 3px}.origin-leaf .leaf-number{bottom:6px}.awakened-leaf{border-radius:0 0 7px 7px}.book-evolution-art,.book-evolution-art img{height:160px}.evolution-book .awakened-leaf h3{min-height:0;font-size:22px}.book-pagination{gap:8px;grid-template-columns:1fr minmax(100px,150px) 1fr;padding-top:15px}.book-turn{font-size:11px;gap:4px}.book-turn span{max-width:54px}.book-jump select{font-size:10px;padding:7px 5px}#battle-view .battle-vitals{padding:12px 10px;gap:8px}}
@media(prefers-reduced-motion:reduce){.evolution-spread{animation:none}}
