/* Book corrections: the lamp rests on the shelf in both reading modes. */
#knowledge-root .knowledge-lantern{top:var(--lantern-top);left:var(--lantern-left);right:auto;transform-origin:50% 95%;transition:none}
#knowledge-root .knowledge-lantern:before{content:'';position:absolute;left:22%;right:15%;bottom:3%;height:5%;border-radius:50%;background:#1008068a;filter:blur(2px);z-index:0}
#knowledge-root .knowledge-room-light{background:radial-gradient(ellipse at var(--lamp-center-x) var(--lamp-light-y),#ffbc5050,transparent 52%)}
#knowledge-root .knowledge-reader-edge.previous,#knowledge-root .knowledge-reader-edge.next{width:30px;height:44px;min-height:44px;padding:0;border:1px solid #b99c60c9;border-radius:5px;background:linear-gradient(125deg,#28524b,#163c38);color:#e8ce8d;box-shadow:0 2px 5px #100b0845;font:400 30px Interface,sans-serif;line-height:1;display:grid;place-items:center}
#knowledge-root .knowledge-reader-edge.previous{left:-12px}
#knowledge-root .knowledge-reader-edge.next{right:-12px}
#knowledge-root .knowledge-reader-edge.previous:before,#knowledge-root .knowledge-reader-edge.previous:after,#knowledge-root .knowledge-reader-edge.next:before,#knowledge-root .knowledge-reader-edge.next:after{display:none}
/* Result frames are reusable art assets; the inventory's own cards keep their layout. */
.modal-shade.has-combat-result{background:#203a3c73;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);padding:16px 12px}
#app .modal.combat-result{width:100%;max-width:520px!important;max-height:calc(100% - 8px);min-height:0;display:flex;flex-direction:column;overflow:hidden;padding:20px 17px 17px;border:1px solid #d8c49b;border-radius:25px;background:radial-gradient(ellipse at 50% 0,#fffef8cc,transparent 55%),linear-gradient(120deg,#fff9ea,#fcf1dc);box-shadow:0 14px 45px #102b3345,inset 0 0 0 3px #fff8e6,inset 0 0 40px #e9d0a21a;color:#153f40;isolation:isolate}
.combat-result .result-heading{flex:none;display:flex;flex-direction:column;align-items:center;text-align:center;gap:5px}
.combat-result .result-heading>img{width:48px;height:48px;object-fit:contain}
.combat-result .result-heading>h2{font:700 40px/1.05 Interface,sans-serif;color:#145559;letter-spacing:-.6px;margin:0}
.combat-result .result-heading>h2.result-loss-text{color:#943c32}
.combat-result .result-rule{display:flex;align-items:center;gap:8px;min-width:18px;margin:13px 0;flex:none;opacity:.8}
.combat-result .result-rule>i{height:1px;flex:1;background:linear-gradient(90deg,#bd96583d,#bd9658)}
.combat-result .result-rule>i:last-child{transform:scaleX(-1)}
.combat-result .result-rule>b{width:6px;height:6px;transform:rotate(45deg);border:1px solid #bb9253;box-shadow:inset 0 0 0 1px #fff9e8}
.combat-result .result-stats{flex:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:17px}
.combat-result .result-metric{min-width:0;min-height:80px;border:1px solid #c9ab73;border-radius:15px;background-color:#faeccb;background-image:url('art/ui/reward-laurel-v01728.svg');background-size:100% 100%;box-shadow:inset 0 0 0 4px #fff5df7a;padding:10px 6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#a47b36}
.combat-result .metric-xp{background-color:#e6f1f8;border-color:#9fbed1;color:#507ba2}
.combat-result .metric-wear{background-color:#e8ecf0;border-color:#a5b2be;color:#546c82}
.combat-result .result-metric-value{display:flex;align-items:center;justify-content:center;gap:8px;max-width:100%;line-height:1;white-space:nowrap}
.combat-result .result-metric-value>.icon{font-size:30px}
.combat-result .metric-xp .icon{color:#3679c4;text-shadow:0 1px 4px #6cb3ed40}
.combat-result .result-metric-value>strong{font:700 35px/1.05 Interface,sans-serif;letter-spacing:-1px;font-variant-numeric:tabular-nums}
.combat-result .result-metric>span{font:700 12px/1.25 Interface,sans-serif;color:#827d6a}
.combat-result .metric-xp>span,.combat-result .metric-wear>span{color:#748493}
.combat-result .result-loss-text{color:#963c33}
.combat-result .result-scroll{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;padding:0 1px 1px}
.combat-result .result-scroll::-webkit-scrollbar{display:none}
.combat-result .result-section{display:flex;align-items:center;gap:10px;margin:0 0 10px;min-width:0}
.combat-result .result-section>h3{font:700 23px/1.1 Interface,sans-serif;white-space:nowrap;letter-spacing:-.4px}
.combat-result .result-section>.result-rule{flex:1;margin:0;gap:5px}
.combat-result .result-section>span{font:400 16px/1.2 Interface,sans-serif;white-space:nowrap;color:#878070}
.combat-result .result-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;align-items:stretch}
.combat-result .result-item{--rarity:#b0a58e;position:relative;min-width:0;display:flex;flex-direction:column;width:100%;margin:0;padding:12px 9px 10px;min-height:230px;border:1px solid var(--rarity);border-radius:14px;background:linear-gradient(135deg,#fffdf6,#f1eee1);color:#153f40;text-align:center;box-shadow:inset 0 0 0 4px #fffdf380;overflow:hidden}
.combat-result .result-item:before{content:'';position:absolute;inset:0;border:19px solid transparent;border-image:url('art/ui/result-frame-v01728.svg') 36 / 19px stretch;opacity:.58;pointer-events:none}
.combat-result .result-item.rarity-uncommon{--rarity:#8ea977;background:linear-gradient(135deg,#fffdf5,#eaf0db)}
.combat-result .result-item.rarity-rare{--rarity:#7ba2bc;background:linear-gradient(135deg,#fffdf5,#e4eef4)}
.combat-result .result-item.rarity-epic{--rarity:#a791b2;background:linear-gradient(135deg,#fffdf5,#eee5f3)}
.combat-result .result-item.rarity-legendary{--rarity:#b99a55;background:linear-gradient(135deg,#fffdf5,#f4e5c1)}
.combat-result .result-item-meta{display:flex;align-items:center;justify-content:space-between;gap:3px;min-width:0;font:400 10px/1.25 Interface,sans-serif;color:#8d8b79;text-align:left;z-index:1}
.combat-result .result-item-meta>span{display:flex;align-items:center;gap:5px}
.combat-result .result-item-meta>span:first-child{color:var(--rarity)}
.combat-result .result-item-meta i{flex:none;width:6px;height:6px;background:currentColor;transform:rotate(45deg)}
.combat-result .result-item-meta>span:last-child{font-size:12px;color:#8b887a}
.combat-result .result-item-art{height:120px;flex:none;display:grid;place-items:center;margin:4px 0;background:url('art/ui/item-sigil-v01728.svg') center/contain no-repeat}
.combat-result .result-item-art>img{display:block;width:100%;height:100%;max-width:140px;max-height:120px;object-fit:contain;filter:drop-shadow(0 5px 3px #7b663024)}
.combat-result .result-item>h3{font:700 21px/1.12 Interface,sans-serif;letter-spacing:-.2px;margin:2px 0 10px;flex:1;min-height:45px;display:grid;align-content:center;overflow-wrap:anywhere}
.combat-result .result-item-footer{display:flex;align-items:center;justify-content:center;gap:8px;border-top:1px solid #aaa58545;padding-top:9px;font:400 11px/1.3 Interface,sans-serif;color:#828873;min-height:29px}
.combat-result .result-item-footer>span{display:flex;align-items:center;justify-content:center;gap:4px;min-width:0}
.combat-result .result-item-footer>span+span{border-left:1px solid #aaa58545;padding-left:8px;white-space:nowrap}
.combat-result .result-item-footer .icon,.combat-result .result-item-footer img{font-size:17px;width:17px;height:17px;object-fit:contain}
.combat-result .result-item.result-worn{--rarity:#a9a49a;background:linear-gradient(135deg,#f4f1e9,#e6e2d9)}
.combat-result .result-worn .result-item-art>img{filter:saturate(.64) drop-shadow(0 5px 3px #5c594524)}
.combat-result .result-worn .result-item-footer{flex-wrap:wrap;gap:4px 7px;color:#828075}
.combat-result .result-worn .result-item-footer>strong{font-size:14px;font-weight:700}
.combat-result .result-worn .result-item-footer strong>small{font-size:10px;font-weight:400;white-space:nowrap}
.combat-result .result-empty-slot{min-height:230px;border:1px solid #c5b59445;border-radius:14px;background:#e9dbc329 url('art/ui/item-sigil-v01728.svg') center/45px no-repeat;opacity:.75}
.combat-result .result-no-items{padding:25px 10px;text-align:center;font-size:13px;color:#8b8572;min-height:150px;display:grid;place-content:center;gap:12px}
.combat-result .result-no-items>.icon{font-size:32px}
.combat-result .result-footer{flex:none;border-top:1px solid #c4a77166;margin-top:15px;padding-top:13px}
#app .combat-result .result-continue{position:relative;display:flex;align-items:center;justify-content:center;width:100%;min-height:56px;padding:12px 27px;margin:0;border:1px solid #1b6969;border-radius:17px;background:linear-gradient(140deg,#2e7773,#125355);color:#fff9e7;box-shadow:inset 0 0 0 2px #ffffff0e,0 3px 0 #174e48;overflow:visible;font:700 23px/1.1 Interface,sans-serif;text-align:center}
.combat-result .result-continue:before{content:'';position:absolute;inset:0;pointer-events:none;border:24px solid transparent;border-image:url('art/ui/result-button-v01728.svg') 42 / 24px stretch;opacity:.85}
.combat-result .result-continue>span{position:relative;z-index:1}
.combat-result .result-continue:active{transform:translateY(1px);box-shadow:inset 0 0 0 2px #ffffff0e,0 1px 0 #174e48}
@media(max-width:350px){#app .modal.combat-result{padding:17px 13px 14px}.combat-result .result-heading>img{width:38px;height:38px}.combat-result .result-heading>h2{font-size:34px}.combat-result .result-metric{min-height:73px}.combat-result .result-metric-value>strong{font-size:31px}.combat-result .result-metric-value>.icon{font-size:26px}.combat-result .result-section>h3{font-size:20px}.combat-result .result-section>span{font-size:14px}.combat-result .result-item{min-height:208px;padding-inline:7px}.combat-result .result-item-art{height:97px}.combat-result .result-item-art>img{max-height:97px}.combat-result .result-item>h3{font-size:18px;min-height:40px}.combat-result .result-item-footer{font-size:9px;gap:5px}.combat-result .result-item-footer>span+span{padding-left:5px}.combat-result .result-empty-slot{min-height:208px}#app .combat-result .result-continue{font-size:21px;min-height:52px}}
@media(max-height:680px){.combat-result .result-heading>img{width:34px;height:34px}.combat-result .result-heading>h2{font-size:33px}.combat-result .result-rule{margin-block:10px}.combat-result .result-stats{margin-bottom:12px}.combat-result .result-metric{min-height:69px;padding-block:8px}.combat-result .result-footer{margin-top:11px;padding-top:11px}}
/* The expanded bestiary uses the same parchment and item frames. */
#knowledge-root .reader-subtitle{display:flex;align-items:center;gap:8px;font:400 16px Interface,sans-serif;color:#79542f;margin:20px 0 12px}
#knowledge-root .reader-subtitle:before,#knowledge-root .reader-subtitle:after{content:'';flex:1;height:1px;background:#9f773b66}
#knowledge-root .reader-loot-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
#knowledge-root .reader-loot-item{border:15px solid transparent;border-image:url('art/ui/codex-loot-v01728.svg') 31 / 15px stretch;padding:6px;text-align:center;min-width:0;background:#f2d29d21;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}
#knowledge-root .reader-loot-item>img{width:75px;height:70px;object-fit:contain;filter:drop-shadow(0 2px 2px #764d2625)}
#knowledge-root .reader-loot-item>span{font:400 13px/1.2 Interface,sans-serif;overflow-wrap:anywhere}
#knowledge-root .reader-battle-notes{list-style:none;padding:0;margin:0}
#knowledge-root .reader-battle-notes>li{position:relative;padding-left:18px;font:400 var(--reader-font)/1.4 Interface,sans-serif;margin-bottom:12px;color:#513c25}
#knowledge-root .reader-battle-notes>li:before{content:'✦';position:absolute;left:0;color:#906a39;font-size:14px;top:3px}

#knowledge-root .knowledge-reader-edge>svg{width:19px;height:25px;stroke-width:1.5}

.combat-result button:focus-visible{outline:2px solid #c4a365;outline-offset:2px}
#knowledge-root .knowledge-page-mark{width:36px;height:60px}
#knowledge-root .knowledge-page-mark .book-ribbon-number{font-size:10px}
#knowledge-root .reader-monster-stats dt{display:flex;align-items:center;gap:7px}
#knowledge-root .reader-monster-stats .icon{font-size:16px;color:#8b6b3c}
#knowledge-root .knowledge-reader-content:has(.reader-loot-grid) .reader-heading.with-art{grid-template-columns:46px minmax(0,1fr);gap:8px}
#knowledge-root .knowledge-reader-content:has(.reader-loot-grid) .reader-heading>img{width:46px;height:61px}
#knowledge-root .knowledge-reader-content:has(.reader-loot-grid) .reader-heading>h2{font-size:24px}
#knowledge-root .knowledge-reader-content:has(.reader-loot-grid) .reader-subtitle{margin:13px 0 10px}
