/* Full Steam Encyclopedia PackedScene: native 640×360, 512×296 cover, 5×48 px slots.
   The cover/pages remain independent so the source opening can be reproduced. */
@font-face{font-family:CTBBook;src:url('assets/reference/MatchupPro.ttf') format('truetype');font-display:swap}
.ctb-book{position:absolute;inset:0;z-index:220;overflow:clip;isolation:isolate;touch-action:manipulation;color:white;font:16px/1 CTBBook,Plumbum,Tiny,monospace;user-select:none}
.ctb-book[hidden],.ctb-book [hidden]{display:none!important}
.ctb-book *{box-sizing:border-box}
.ctb-book button{font:inherit;border:0;outline:0;margin:0;padding:0;border-radius:0;background:none;box-shadow:none;color:inherit;cursor:pointer;letter-spacing:normal;text-transform:none;touch-action:manipulation}
.ctb-book button:disabled{cursor:default;opacity:1}
.ctb-book button:focus-visible{outline:1px dotted white;outline-offset:2px}
.ctb-book img,.ctb-book canvas{image-rendering:pixelated;pointer-events:none;max-width:none}
.ctb-book-shade{position:absolute;inset:0;background:rgba(0,0,0,.5019608);backdrop-filter:blur(2px)}
.ctb-book-world{position:absolute;left:50%;top:50%;width:640px;height:360px;transform:translate(-50%,-50%) scale(var(--book-scale,1));transform-origin:center;overflow:visible}
.ctb-book-papers{position:absolute;inset:0;pointer-events:none}
.ctb-book-cover{position:absolute;left:64px;top:50px;width:512px;height:296px}
.ctb-book-paper{position:absolute;top:-13px;width:407px;height:407px;object-fit:none}
.ctb-book-paper-left{left:-8px;transform-origin:327px 203.5px}
.ctb-book-paper-right{left:239px;transform-origin:80px 203.5px}
.ctb-book-pages{position:absolute;left:86px;top:72px;width:469.3566px;height:234px}
.ctb-book-page{position:absolute;inset:0;display:grid;grid-template-columns:224.6783px 224.6783px;gap:20px}
.ctb-book-left,.ctb-book-right{position:relative;min-width:0;min-height:0}
.ctb-book-items .ctb-book-left,.ctb-book-items .ctb-book-right{background:rgba(115,115,115,.792157);border-radius:5px}
.ctb-book-scroll{position:absolute;left:-50px;top:-21px;width:286px;height:264px;transform:rotate(-1.2786deg);transform-origin:0 0;z-index:2;overflow-x:hidden;overflow-y:auto;scrollbar-width:none;overscroll-behavior:contain;touch-action:pan-y;scroll-padding:26px 15px 20px}
.ctb-book-scroll::-webkit-scrollbar,.ctb-book-chest-list::-webkit-scrollbar{display:none;width:0;height:0}
/* Space belongs inside the scrollable area: rotating cards, corner selectors,
   raised goal badges and bottom counters must not touch its clipping boundary.
   The viewport offset compensates for the inset, preserving the card positions. */
.ctb-book-grid{display:grid;grid-template-columns:repeat(5,48px);grid-auto-rows:52px;gap:4px;width:256px;padding:26px 0 20px;margin:0 15px}
.ctb-book .ctb-book-slot{position:relative;display:block;width:48px;height:52px;overflow:visible;z-index:0}
.ctb-book-slot:hover,.ctb-book-slot[aria-pressed=true]{z-index:2}
.ctb-book-slot-content{position:absolute;inset:0;transform-origin:center;pointer-events:none}
.ctb-book-slot-fill{position:absolute;inset:3px;background:var(--book-accent);opacity:.572549}
.ctb-book-frame{position:absolute;inset:0;border-style:solid;border-width:7px 7px 9px;border-image:var(--book-panel) 7 7 9 7 fill / 7px 7px 9px 7px / 0 stretch;pointer-events:none}
.ctb-book-slot.inactive .ctb-book-slot-fill{background:#000}
.ctb-book-slot.inactive .ctb-book-frame{filter:brightness(.2)}
.ctb-book-slot.gacha .ctb-book-frame{border-image-source:var(--book-panel-gacha)}
.ctb-book-slot-icon{position:absolute;top:0;left:0;width:48px;height:48px;object-fit:contain}
.ctb-book-slot.inactive .ctb-book-slot-icon{filter:brightness(0)}
.ctb-book-slot.inactive.discovered .ctb-book-slot-icon{filter:brightness(.212)}
.ctb-book-count{position:absolute;left:0;top:43px;right:0;height:16px;text-align:center;line-height:16px;white-space:nowrap;text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000,1px 1px #000,-1px -1px #000}
.ctb-book-golden-count{position:absolute;right:-2px;top:-2px;color:#ffcc00;font-size:13px;line-height:13px;text-shadow:1px 1px #000,-1px -1px #000,1px -1px #000,-1px 1px #000;pointer-events:none}
.ctb-book-golden-count[hidden],.ctb-book-gacha-info[hidden],.ctb-book-goal-row[hidden]{display:none!important}
.ctb-book-gacha-info{flex:none;white-space:pre-line;font-size:12px;line-height:13px;color:var(--book-accent);padding:1px 0;text-shadow:1px 1px #000}
.ctb-book-marker{position:absolute;left:30px;top:-8px;width:16px;height:32px}
.ctb-book-alert{position:absolute;left:39px;top:-11px;width:11px;height:26px;color:#af0;font-size:32px;line-height:26px;text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000}
.ctb-book-selector{position:absolute;inset:0;z-index:4;pointer-events:none}
.ctb-book-selector i{position:absolute;width:14px;height:16px;background:var(--book-select-top) center/100% 100%;image-rendering:pixelated}
.ctb-book-selector i:nth-child(1){top:-4px;left:-4px}
.ctb-book-selector i:nth-child(2){top:-4px;right:-4px;transform:scaleX(-1)}
.ctb-book-selector i:nth-child(3){bottom:-4px;left:-4px;background-image:var(--book-select-bottom)}
.ctb-book-selector i:nth-child(4){bottom:-4px;right:-4px;background-image:var(--book-select-bottom);transform:scaleX(-1)}
.ctb-book-detail{position:absolute;inset:0;text-align:center}
.ctb-book-icon-wrap{position:absolute;left:88.5px;top:18px;width:48px;height:48px;transform-origin:center;z-index:1}
.ctb-book-icon{position:absolute;inset:0;width:48px;height:48px;object-fit:contain;z-index:1}
.ctb-book-halo{position:absolute;width:80.54px;height:79.26px;left:-16.27px;top:-15.63px;z-index:0}
.ctb-book-name{position:absolute;left:0;right:0;top:81.5px;margin:0!important;font:32px/26px CTBBook,Plumbum,Tiny,monospace!important;font-weight:normal!important;white-space:nowrap;color:white!important;text-align:center;text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000,1px 1px #000,-1px -1px #000}
.ctb-book-rarity{position:absolute;left:0;right:0;top:98.5px;height:26px;margin:0;font-size:16px;line-height:26px;color:var(--book-accent);text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000}
.ctb-book-copy{position:absolute;left:14.84px;right:14.84px;top:124.5px;bottom:0;display:flex;flex-direction:column;gap:4px}
.ctb-book-description{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:0 1px;color:#fff;font:16px/16px CTBBook,Plumbum,Tiny,monospace;text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000}
.ctb-book-description>span{display:block}
.ctb-book-rainbow{animation:ctb-book-rainbow 4s linear infinite}
.ctb-book-goal{position:relative;flex:1;min-width:0;height:30px;transform-origin:center}
.ctb-book-progress{position:absolute;inset:0}
.ctb-book-progress::before{content:"";position:absolute;inset:5px 5px 7px;background:rgba(0,0,0,.537255)}
.ctb-book-progress-fill{position:absolute;inset:0;border-style:solid;border-color:transparent;border-width:8px 8px 10px;border-image:var(--book-bar-fill) 8 8 10 8 fill/8px 8px 10px 8px/0 stretch;clip-path:inset(0 var(--book-progress,100%) 0 0)}
.ctb-book-progress-frame{position:absolute;inset:0;border-style:solid;border-color:transparent;border-width:8px 8px 10px;border-image:var(--book-bar-frame) 8 8 10 8 fill/8px 8px 10px 8px/0 stretch}
.ctb-book-progress-text{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding-bottom:4px;color:white;white-space:nowrap;text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000}
.ctb-book .ctb-book-claim{position:absolute;inset:0;display:block;height:30px;width:100%}
.ctb-book-button-content{position:absolute;inset:0;transform-origin:center;pointer-events:none;display:flex;align-items:center;justify-content:center;padding:0 5px 4px}
.ctb-book-button-skin{position:absolute;inset:0;border-style:solid;border-color:transparent;border-width:3px 3px 5px;border-image:var(--book-button) 3 3 5 3 fill/3px 3px 5px 3px/0 stretch;z-index:0}
.ctb-book-button-label{position:relative;z-index:1;white-space:nowrap;color:white;text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000}
.ctb-book-claim:hover .ctb-book-button-skin{border-image-source:var(--book-button-white)}
.ctb-book-claim:hover .ctb-book-button-label{color:var(--book-accent)}
.ctb-book-tabs{position:absolute;left:73.5px;top:21px;height:30px;display:flex;gap:4px;align-items:flex-start;pointer-events:auto}
.ctb-book .ctb-book-tab{position:relative;display:block;min-width:47.765px;height:32px}
.ctb-book-tab-content{height:25px;position:absolute;left:0;right:0;top:0;display:flex;align-items:flex-start;justify-content:center;padding:3px 5px 0;pointer-events:none}
.ctb-book-tab-skin{position:absolute;inset:0;border-style:solid;border-width:3px 3px 0;border-image:var(--book-tab-blue) 3 3 0 3 fill/3px 3px 0 3px/0 0 40px stretch}
.ctb-book-tab-label{position:relative;white-space:nowrap;line-height:16px;text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000}
.ctb-book-tab:hover .ctb-book-tab-skin{border-image-source:var(--book-tab-white)}
.ctb-book-tab:hover .ctb-book-tab-label{color:#279cdb}
.ctb-book .ctb-book-tab-close{min-width:24.94px!important}
.ctb-book-tab-close .ctb-book-tab-skin{border-image-source:var(--book-tab-red)}
.ctb-book-tab-close:hover .ctb-book-tab-label{color:#ff4229}
.ctb-book-stats .ctb-book-right{padding:5px;isolation:isolate}
.ctb-book-stat-paper{position:absolute;left:50%;top:50%;width:180px;height:165px;transform:translate(-50%,-50%);opacity:.521569;pointer-events:none}
.ctb-book-chances{position:absolute;inset:10px;display:flex;align-items:stretch;justify-content:center;gap:4px}
.ctb-book-chance-title{position:relative;display:flex;align-items:center;justify-content:center;width:100px;margin:0;padding:0 2px;text-align:center;font-size:16px;line-height:16px;text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000}
.ctb-book-chance-meter{position:relative;width:47px;height:100%;flex:none;background:#000}
.ctb-book-chance-segments{position:absolute;inset:6px 4px 6px 6.265px;display:flex;flex-direction:column;gap:2px}
.ctb-book-chance-segment{position:relative;flex-basis:0;min-height:0;cursor:pointer}
.ctb-book-chance-segment img{position:absolute;width:32px;height:32px;left:50%;top:50%;transform:translate(-50%,-50%)}
.ctb-book-chance-segment span{position:absolute;left:50%;top:50%;padding-top:8px;transform:translateX(-50%);line-height:16px;white-space:nowrap;text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000}
.ctb-book-stats-title{font:16px/16px CTBBook,Plumbum,Tiny,monospace!important;font-weight:normal!important;color:#000!important;text-shadow:none!important;margin:0 0 11px!important;text-align:center}
.ctb-book-stats-rows{display:flex;flex-direction:column;gap:11px}
.ctb-book-stat{display:flex;gap:4px;align-items:center;min-height:16px;color:#000;text-shadow:none;line-height:16px;white-space:nowrap}
.ctb-book-stat-label{font-size:13px;flex:none}
.ctb-book-stat-dots{height:12px;flex:1;min-width:3px;background:var(--book-line) left center/4px 12px repeat-x;image-rendering:pixelated}
.ctb-book-stat-value{font-size:16px;flex:none}
.ctb-book-coin-popup{position:absolute;z-index:8;display:flex;align-items:center;gap:2px;font-size:16px;pointer-events:none;text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000}
.ctb-book-coin-popup img{width:16px;height:16px;object-fit:contain}
.ctb-book.reduced-motion *{animation:none!important}
.ctb-book-item-paper,.ctb-book-item-paper-back{position:absolute;left:-61px;top:-9px;width:293px;height:245px;pointer-events:none;border-style:solid;border-width:10px 4px 20px 15px;border-image:var(--book-paper-panel) 10 4 20 15 fill/10px 4px 20px 15px/0 repeat;transform:scale(1.12);transform-origin:center}
.ctb-book-item-paper-back{transform:scale(1.12) rotate(-6deg);filter:brightness(.84)}
.ctb-book-goal-row{display:flex;flex:none;gap:1px;height:30px}
.ctb-book-reward{display:flex;align-items:center;gap:2px;padding-bottom:4px;color:white;text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000}
.ctb-book-reward img{width:9px;height:9px;object-fit:contain}
.ctb-book-reward span{white-space:nowrap}
.ctb-book-tab[aria-selected=true] .ctb-book-tab-skin{border-image-source:var(--book-tab-white)}
.ctb-book-tab[aria-selected=true] .ctb-book-tab-label{color:#279cdb}
.ctb-book-tab[aria-selected=true] .ctb-book-tab-content{transform:translateY(-5px)}
.ctb-book-tab-label{line-height:18px}
.ctb-book-stat-front,.ctb-book-stat-back{position:absolute;z-index:-1;inset:-5px -8px 0 -17px;pointer-events:none;border-style:solid;border-width:10px 4px 20px 15px;border-image:var(--book-paper-panel) 10 4 20 15 fill/10px 4px 20px 15px/0 repeat;transform:rotate(1.5deg)}
.ctb-book-stat-back{transform:rotate(-4.5deg);filter:brightness(.84)}
.ctb-book-chest-graph-paper{position:absolute;inset:18px 4px 0 -5px;border-style:solid;border-width:10px 4px 20px 15px;border-image:var(--book-paper-panel) 10 4 20 15 fill/10px 4px 20px 15px/0 repeat;transform:rotate(1.6deg)}
.ctb-book-chest-title{position:relative;font:16px/16px CTBBook,Plumbum,Tiny,monospace!important;text-align:center;color:#fff!important;margin:0!important;font-weight:normal!important;text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000}
.ctb-book .ctb-book-chest-graph{position:absolute;left:0;top:0;width:215px;height:224px;pointer-events:auto;cursor:pointer}
.ctb-book-chest-list{position:absolute;left:-17px;right:-29px;top:-15px;height:171px;display:flex;flex-direction:column;gap:4px;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;overscroll-behavior:contain;padding:5px 12px 10px}
.ctb-book-chest-row{position:relative;isolation:isolate;flex:none;height:54px;min-height:54px;padding:5px 11px 1px 9px;outline:0;transform-origin:center;cursor:pointer}
.ctb-book-chest-row:before{content:"";position:absolute;inset:0;z-index:-1;border-style:solid;border-width:10px 4px 20px 15px;border-image:var(--book-paper-panel) 10 4 20 15 fill/10px 4px 20px 15px/0 repeat;pointer-events:none}
.ctb-book-chest-row:focus-visible{outline:1px dotted #000}
.ctb-book-chest-row h3{font:20px/20px CTBBook,Plumbum,Tiny,monospace!important;font-weight:normal!important;text-align:center;margin:0!important;white-space:nowrap;text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000}
.ctb-book-chest-row-body{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:-4px}
.ctb-book-chest-row-body img{width:32px;height:32px}
.ctb-book-chest-row-body p{margin:0;color:#000;white-space:pre-line;font:13px/13px CTBBook,Plumbum,Tiny,monospace}
.ctb-book-chest-effects{position:absolute;left:-7px;right:-29px;top:179px;height:65px;transform:rotate(-1.4deg);border-style:solid;border-width:19px 17px 4px 22px;border-image:var(--book-effects-paper) 19 17 4 22 fill/19px 17px 4px 22px/5px 12px repeat}
.ctb-book-chest-effects .ctb-book-chest-title{position:absolute;left:0;right:0;top:-24px}
.ctb-book-effects-list{position:absolute;left:0;right:0;top:0;display:flex;justify-content:space-around;gap:8px}
.ctb-book-effect{position:relative;width:36px;height:36px;transform-origin:center}
.ctb-book-effect canvas{width:48px;height:48px;position:absolute;left:-6px;top:-8px}
.ctb-book-effect span{position:absolute;left:-4px;right:-4px;bottom:-4px;text-align:center;font-size:13px;white-space:nowrap;text-shadow:1px 0 #000,-1px 0 #000,0 1px #000,0 -1px #000}
.ctb-book-history-note{position:absolute;left:0;top:236px;width:220px;margin:0;color:#42464b;font-size:10px;line-height:10px;text-align:center;z-index:2}
@keyframes ctb-book-rainbow{0%{color:#ff9292}20%{color:#ffff92}40%{color:#a2ff92}60%{color:#92f6ff}80%{color:#d092ff}100%{color:#ff9292}}

