
:root{--resource-ink:#6c5148;--resource-paper:#fffaf4;--resource-sand:#e8dac7;--resource-blue:#39c2eb;--resource-edge:#d2bda0}
body.resource-page{margin:0;background:#efe6d8;color:var(--resource-ink);font:16px/1.6 var(--guide-font)}
.resource-shell,.resource-catalog-dialog{font-family:var(--guide-font);color:var(--resource-ink);line-height:1.6}.resource-shell *,.resource-catalog-dialog *{box-sizing:border-box}.resource-shell{box-sizing:border-box;width:min(1320px,100%);margin:20px auto;padding:0 20px;overflow-wrap:anywhere}.resource-shell>nav{font-size:13px;margin:0 4px 14px}.resource-shell a,.resource-footer a{color:#276b81;text-underline-offset:4px}.resource-shell button,.resource-shell input,.resource-shell select,.resource-catalog-dialog button{font:inherit;color:inherit}.resource-shell button,.resource-catalog-dialog button{cursor:pointer;touch-action:manipulation}.resource-shell :focus-visible,.resource-catalog-dialog :focus-visible{outline:3px solid #237b9b;outline-offset:4px}
.resource-skip{position:absolute;top:-100px;left:8px;background:#fff;padding:12px;z-index:1100}.resource-skip:focus{top:8px}.resource-heading{display:none}.resource-book{border:3px solid #fffaf4;border-radius:32px;background:var(--resource-paper);box-shadow:0 6px 0 #d8c8b2;overflow:clip}.resource-book-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 22px;background:var(--resource-sand);border-bottom:2px dashed var(--resource-edge)}.resource-book-heading h1,.resource-book-heading h2{font-size:25px;line-height:1.4;margin:0;padding:8px 22px;background:#39bde9;color:#fff;border-radius:999px;box-shadow:0 3px 0 #22a5d0;font-weight:850}.resource-book-total{font-size:25px;font-weight:800;white-space:nowrap}.resource-book-total small{font-size:13px}
.resource-controls{display:flex;flex-wrap:wrap;align-items:end;gap:10px;padding:18px 22px 6px}.resource-controls label{font-size:12px;display:flex;flex-direction:column;gap:4px;flex:1;min-width:110px}.resource-controls .resource-search{flex:2;min-width:220px}.resource-controls input,.resource-controls select{min-height:44px;width:100%;padding:8px 12px;border:2px solid #e3d6c4;background:#fff;border-radius:999px;max-width:100%;font-size:14px}.resource-controls button,.resource-actions button,#resource-more,.resource-compare-open{min-height:44px;padding:8px 15px;border:2px solid #dbc7ae;border-radius:999px;background:var(--resource-paper);font-size:14px;font-weight:750}.resource-controls button[aria-pressed=true],.resource-actions button[data-favorite][aria-pressed=true]{background:#ffe6a0;border-color:#ddb044}.resource-status-row{display:flex;justify-content:space-between;gap:12px;margin:4px 24px 10px;min-height:24px;font-size:12px;color:#806d5e}.resource-status-row p{margin:0}.resource-status-row #resource-notice:empty{display:none}#resource-empty{padding:24px;text-align:center}
.resource-workbench{padding:12px 22px 26px}.resource-list{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:20px 16px;align-items:start}.resource-entry{min-width:0;scroll-margin-top:110px}.resource-entry summary{list-style:none;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;min-height:184px;padding:15px 7px 12px;border:3px solid transparent;border-radius:25px;background:#f0ebe3;text-align:center;position:relative}.resource-entry summary::-webkit-details-marker{display:none}.resource-entry summary strong{font-size:16px;line-height:1.35;font-weight:800;overflow-wrap:anywhere;min-height:2.7em;display:flex;align-items:center;justify-content:center}.resource-entry summary small{font-size:12px;line-height:1.3;color:#8b7566}.resource-grade{font-size:11px;font-weight:750;color:#5f493e;line-height:1.2}.resource-entry.is-selected summary{border-color:#39bde9;background:#f3ece0}.resource-entry summary:hover{border-color:#cbb69c}
.resource-portrait{display:inline-grid;place-items:center;position:relative;border-radius:50%;background:#e4e0c5;width:100px;height:100px;flex:0 0 auto;overflow:hidden}.resource-portrait img{width:80%;height:80%;max-width:100%;object-fit:contain;display:block}.resource-portrait.g0{background:#e7dfd3}.resource-portrait.g2{background:#a3e467}.resource-portrait.g3{background:#59c6d9}.resource-portrait.g4{background:#e793e8}.resource-portrait.g5{background:linear-gradient(135deg,#88f5ff,#f492ff)}.resource-portrait.is-large{width:156px;height:156px;margin:10px auto 0;display:grid}.resource-image-pending{font-size:12px;color:#796758}.resource-card-price{font-size:16px;font-weight:800}
.resource-detail{background:var(--resource-paper);border-radius:26px;padding:16px;text-align:center}.resource-detail-heading h2{font-size:24px;margin:0 0 14px;font-weight:850}.resource-description{white-space:pre-line;font-size:16px;font-weight:700;color:#8b776b;margin:18px auto 22px;line-height:1.6;max-width:520px}.resource-durability{display:table;margin:-3px auto 0;padding:0 12px;position:relative;z-index:1;border-radius:20px;background:#af9689;color:#fff;font-size:14px;font-weight:750}.resource-game-panel{background:var(--resource-sand);border-radius:27px;min-height:220px;margin:20px 0 0;padding:24px 24px 20px;color:#8a725c;font-weight:750}.resource-game-panel h3{font-size:20px;margin:0 0 16px;color:#7b614a}.resource-abilities{list-style:none;padding:0;margin:0;font-size:17px;line-height:1.65}.resource-no-effect{font-size:18px;margin:8px 0 42px}.resource-acquisition{display:flex;flex-wrap:wrap;align-items:start;gap:10px 22px;border-top:2px dashed #cdb18e;margin:38px 0 0;padding-top:18px;text-align:left;font-size:15px}.resource-acquisition dt{color:#886642}.resource-acquisition dd{margin:0;flex:1;min-width:100px;white-space:pre-line}.resource-game-facts{display:flex;justify-content:center;flex-wrap:wrap;gap:14px;margin:18px 0}.resource-game-facts>div{background:#e8dac7;padding:5px 14px;border-radius:20px;display:flex;gap:10px}.resource-game-facts dt{font-size:13px}.resource-game-facts dd{margin:0;font-weight:800}.resource-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:20px}.resource-actions button[data-share]{background:#39c2eb;color:#fff;border-color:#2badcd;box-shadow:0 3px 0 #229fc3}.resource-actions button[data-compare][aria-pressed=true]{background:#ffe6a0;border-color:#d8b45f}
.resource-entry>.resource-detail{margin-top:10px;border:2px solid #e8dac7}.resource-enhanced .resource-entry>.resource-detail{display:none}.resource-enhanced .resource-entry summary{min-height:184px}.resource-preview{position:sticky;top:100px;align-self:start;background:#e8dac7;border-radius:28px;padding:14px;max-height:calc(100vh - 130px);overflow:auto;scrollbar-width:thin}.resource-preview-empty{display:grid;place-items:center;min-height:360px;text-align:center;padding:24px;font-size:18px;font-weight:750}.resource-preview .resource-detail{min-height:400px}.resource-preview .resource-game-panel{padding:20px 18px}.resource-preview .resource-portrait.is-large{width:176px;height:176px}.resource-preview .resource-description{font-size:16px}
.resource-catalog-dialog{position:fixed;inset:0;border:0;border-radius:38px;background:var(--resource-paper);width:min(630px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:0;box-shadow:0 8px 0 #6c514833;overflow:hidden}.resource-catalog-dialog::backdrop{background:#40282b99}.resource-dialog-heading{display:flex;align-items:center;justify-content:center;gap:16px;padding:18px 62px 8px;position:relative;min-height:70px}.resource-dialog-heading h2{font-size:26px;text-align:center;line-height:1.35;margin:0;font-weight:850;overflow-wrap:anywhere}.resource-dialog-heading button{position:absolute;right:14px;top:10px;width:44px;height:44px;border:0;background:none;color:#ab9185;font-size:48px;line-height:40px;padding:0}.resource-dialog-content{overflow:auto;max-height:calc(100dvh - 156px);scrollbar-width:thin;padding:0 10px 8px}.resource-dialog-content .resource-detail-heading{display:none}.resource-dialog-content .resource-detail{padding-top:0}.resource-dialog-status{font-size:13px;padding:0 24px 14px;margin:0;text-align:center;overflow-wrap:anywhere}.resource-dialog-status:empty{padding:0;margin:0}.resource-compare-dialog{width:min(960px,calc(100vw - 24px))}.resource-compare-content{overflow:auto;max-height:70vh;padding:16px 22px 24px}.resource-compare-content table{border-collapse:collapse;width:100%;font-size:14px;text-align:left}.resource-compare-content th,.resource-compare-content td{border:1px dashed #ceb494;padding:12px;min-width:110px;white-space:pre-line;vertical-align:top}.resource-compare-content caption{text-align:left;margin-bottom:14px}.resource-compare-open{display:block;margin:8px 22px;background:#ffcb46;border-color:#efb82c;box-shadow:0 3px 0 #d5a11f}
.resource-notes{margin:28px 0 0;padding:22px;border:2px dashed #d2bda0;border-radius:24px;background:#fffaf4;font-size:14px}.resource-notes h2{font-size:18px;margin:10px 0}.resource-notes nav{display:flex;flex-wrap:wrap;gap:12px 20px}.resource-footer{text-align:center;padding:24px 16px;font-size:13px;color:#806b5e}.resource-footer p{margin:8px 0}.resource-shell [hidden],.resource-catalog-dialog [hidden],.resource-preview[hidden]{display:none!important}
@media(min-width:1050px){.resource-enhanced .resource-book[data-resource-layout=shop] .resource-workbench{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:22px}.resource-enhanced .resource-book[data-resource-layout=shop] .resource-list{grid-template-columns:repeat(4,minmax(0,1fr))}.resource-book[data-resource-layout=shop] .resource-entry summary{background:transparent;min-height:178px}.resource-book[data-resource-layout=shop] .resource-entry.is-selected summary{background:#f0ebe3}.resource-book[data-resource-layout=shop] .resource-portrait{width:102px;height:102px}}
@media(max-width:1049px){.resource-list{grid-template-columns:repeat(5,minmax(0,1fr))}.resource-preview{display:none!important}}
@media(max-width:800px){.resource-shell{padding:0 12px;margin:14px auto}.resource-book{border-radius:26px}.resource-book-heading{padding:13px 14px}.resource-book-heading h1,.resource-book-heading h2{font-size:21px;padding:7px 16px}.resource-book-total{font-size:21px}.resource-controls{padding:14px 14px 4px;gap:8px}.resource-controls .resource-search{min-width:100%;flex:1}.resource-controls label{min-width:90px}.resource-status-row{margin:8px 16px;font-size:11px;flex-wrap:wrap;gap:4px}.resource-workbench{padding:8px 14px 20px}.resource-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:15px 10px}.resource-entry summary,.resource-enhanced .resource-entry summary{padding:10px 4px;min-height:170px;border-radius:20px}.resource-entry summary strong{font-size:14px}.resource-portrait{width:90px;height:90px}.resource-notes{padding:18px}}
@media(max-width:420px){.resource-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px}.resource-entry summary,.resource-enhanced .resource-entry summary{min-height:188px;padding:14px 6px}.resource-portrait{width:104px;height:104px}.resource-controls label{min-width:105px}.resource-controls button{flex:1;font-size:13px;padding:8px 10px}.resource-dialog-heading{padding:16px 48px 8px;min-height:66px}.resource-dialog-heading h2{font-size:22px}.resource-catalog-dialog{border-radius:28px}.resource-dialog-content{padding:0 4px 6px}.resource-detail{padding:12px}.resource-portrait.is-large{width:140px;height:140px}.resource-abilities{font-size:15px}.resource-game-panel{padding:22px 16px;min-height:190px}.resource-actions{gap:7px}.resource-actions button{font-size:13px;padding:8px 11px}.resource-book-total{font-size:19px}.resource-book-heading h1,.resource-book-heading h2{font-size:19px;padding:8px 14px}}
@media(max-height:500px) and (min-width:600px){.resource-catalog-dialog .resource-detail{display:grid;grid-template-columns:190px minmax(0,1fr);gap:0 18px;align-items:start}.resource-catalog-dialog .resource-portrait.is-large{grid-column:1;grid-row:1/3;width:126px;height:126px}.resource-catalog-dialog .resource-durability,.resource-catalog-dialog .resource-description{grid-column:1}.resource-catalog-dialog .resource-game-panel{grid-column:2;grid-row:1/5;margin:8px 0;min-height:150px}.resource-catalog-dialog .resource-actions{grid-column:1/-1;margin-top:8px}.resource-dialog-content{max-height:calc(100dvh - 100px)}}
@media(prefers-reduced-motion:no-preference){.resource-entry summary{transition:border-color .15s,background .15s}.resource-actions button:hover{filter:brightness(1.03)}}
/* Keep the existing guide entrance cards and search integration. */
.resource-directory{box-sizing:border-box;max-width:1180px;margin:auto;padding:24px;overflow-wrap:anywhere}.resource-directory-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.resource-directory .resource-directory-card{display:block;padding:18px;background:#fffaf4;border:2px solid #e8dac7;border-radius:20px;color:#6c5148;text-decoration:none;opacity:1;transform:none;min-height:0}.resource-directory-card span{display:block;font-size:12px;margin-top:6px}.resource-directory-card:hover{border-color:#39a3c1}.resource-directory h3{margin-top:20px}.resource-directory [hidden]{display:none!important}@media(max-width:800px){.resource-directory{padding:16px}.resource-directory-links{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:480px){.resource-directory-links{grid-template-columns:1fr}}

.resource-directory-links{--directory-tint:#dff5fb;--directory-border:#bde6f0}.resource-directory-links:nth-of-type(5n+2){--directory-tint:#ecebff;--directory-border:#dad8f5}.resource-directory-links:nth-of-type(5n+3){--directory-tint:#fff0ee;--directory-border:#f3d8d6}.resource-directory-links:nth-of-type(5n+4){--directory-tint:#e9f4df;--directory-border:#d1e4bf}.resource-directory-links:nth-of-type(5n+5){--directory-tint:#fff1d8;--directory-border:#f1dfbb}
.resource-directory .resource-directory-card{background:var(--directory-tint);border:1px solid var(--directory-border);padding:18px 22px 22px;border-radius:24px;color:var(--ink,#294b63)}.resource-directory-card strong{font-size:18px}.resource-directory-card>span:last-child{color:#4f7180}.resource-directory-card .resource-directory-preview{position:relative;display:block;height:154px;margin:0 0 12px;background:transparent;isolation:isolate}.resource-directory-preview img{--tilt:-14deg;--lift:0px;position:absolute;display:block;left:calc(50% - 118px);top:28px;width:104px;height:104px;object-fit:contain;transform:translateY(var(--lift)) rotate(var(--tilt));filter:drop-shadow(0 9px 3px #294b631c);will-change:transform}.resource-directory-preview img:nth-child(2){--tilt:5deg;left:calc(50% - 50px);top:8px;width:112px;height:112px;z-index:2;animation-delay:-1.7s}.resource-directory-preview img:nth-child(3){--tilt:16deg;left:calc(50% + 22px);top:35px;z-index:1;animation-delay:-3.3s}.resource-directory-card:nth-child(even) .resource-directory-preview img:first-child{--tilt:-8deg;top:18px}.resource-directory-card:nth-child(even) .resource-directory-preview img:nth-child(2){--tilt:-6deg;top:19px}.resource-directory-card:nth-child(even) .resource-directory-preview img:nth-child(3){--tilt:10deg;top:29px}
@media(hover:hover) and (prefers-reduced-motion:no-preference){.resource-directory .resource-directory-card:hover{transform:translateY(-5px);box-shadow:0 12px 0 -5px #294b6312;border-color:#72b7ca}.resource-directory-card:hover .resource-directory-preview img{filter:drop-shadow(0 12px 4px #294b6326)}}
@media(prefers-reduced-motion:no-preference){.resource-directory-preview img{animation:directory-item-float 5s ease-in-out infinite}.resource-directory-preview img:nth-child(2){animation-delay:-1.7s;animation-duration:5.6s}.resource-directory-preview img:nth-child(3){animation-delay:-3.3s;animation-duration:4.8s}}
@keyframes directory-item-float{0%,100%{transform:translateY(0) rotate(var(--tilt))}50%{transform:translateY(-9px) rotate(calc(var(--tilt) + 4deg))}}

/* Match the game's shop: item preview on the left, selection grid on the right. */
@media(min-width:1050px){.resource-enhanced .resource-book[data-resource-layout=shop] .resource-workbench{grid-template-columns:350px minmax(0,1fr)}.resource-enhanced .resource-book[data-resource-layout=shop] .resource-workbench>div{grid-column:2;grid-row:1}.resource-enhanced .resource-book[data-resource-layout=shop] .resource-preview{grid-column:1;grid-row:1}}

/* Match the game's shop: item preview on the left, selection grid on the right. */
@media(min-width:1050px){.resource-enhanced .resource-book[data-resource-layout=shop] .resource-workbench{grid-template-columns:350px minmax(0,1fr)}.resource-enhanced .resource-book[data-resource-layout=shop] .resource-workbench>div{grid-column:2;grid-row:1}.resource-enhanced .resource-book[data-resource-layout=shop] .resource-preview{grid-column:1;grid-row:1}}
.resource-entry summary small{display:none}
@media(min-width:1050px){.resource-book[data-resource-layout=shop] .resource-entry.is-selected summary{border-color:transparent;background:transparent}.resource-book[data-resource-layout=shop] .resource-entry.is-selected .resource-portrait{outline:4px solid #20b5e8;outline-offset:2px}}

/* Critter details follow the game encyclopedia appearance panel. */
.resource-appearance p{margin:0;white-space:pre-line;line-height:1.5}.resource-appearance h3{margin:0 0 12px}.resource-appearance-period{margin-top:24px;border-top:2px dashed #cdb18e;padding-top:20px}.resource-appearance-period p{margin:0}.resource-appearance{min-height:220px}
