/* hotfix468：怪物 modal／道具卡 共用樣式（卷軸頁、怪物圖鑑頁）。原 hotfix466/467 在 items.html 裡 */
.mm{position:fixed;inset:0;z-index:70;background:rgba(0,0,0,.72);display:flex;align-items:center;justify-content:center;padding:20px}
.mm[hidden]{display:none}
.mm .box{width:min(720px,100%);max-height:min(82vh,760px);background:var(--panel);border:1px solid var(--line);border-radius:14px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.6)}
.mm .hd{display:flex;align-items:center;gap:14px;padding:14px 16px;border-bottom:1px solid var(--line)}
.mm .hd .mi{flex:none;width:96px;height:84px;display:flex;align-items:center;justify-content:center;border-radius:8px;background:rgba(255,255,255,.04)}
.mm .hd .mi img,.mm .hd .mi canvas{max-width:96px;max-height:84px;image-rendering:pixelated}
.mm .hd h3{margin:0;font-size:18px;color:#fff}
.mm .hd h3 small{font-size:12.5px;color:#8d9ab3;margin-left:8px;font-weight:400}
.mm .hd .maps{color:#b9c3d8;font-size:12.5px;line-height:1.5;margin-top:4px}
.mm .hd .x{margin-left:auto;align-self:flex-start;background:none;border:0;color:var(--dim);font-size:20px;cursor:pointer;padding:2px 6px}
.mm .bd{overflow:auto;padding:10px 16px 16px}
.mm .grp{font-size:12px;color:var(--dim);margin:12px 0 6px}
.mm .grp:first-child{margin-top:4px}
.mm .it{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--cw,150px),1fr));gap:6px}   /* hotfix476：--cw 由 JS 依最長名字給 */
.mm .it a{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:7px;border:1px solid #2c3652;background:rgba(255,255,255,.03);color:var(--text);font-size:12.5px;text-decoration:none;min-width:0}
.mm .it a img{width:26px;height:26px;object-fit:contain;image-rendering:pixelated;flex:none}
.mm .it a .ph{width:26px;height:26px;flex:none;border-radius:4px;background:rgba(255,255,255,.06)}
.mm .it a span{min-width:0;line-height:1.3;white-space:nowrap}   /* hotfix476：不換行、不截（格寬夠放） */
.mm .it{align-items:stretch}
.mm .it a.site{border-color:rgba(255,159,46,.5);cursor:pointer}
.mm .it a.site:hover{background:rgba(255,159,46,.1);color:var(--maple)}
.mm .it a.norec{opacity:.7;border-style:dashed} .mm .it a.norec img{filter:grayscale(1);opacity:.6}
.mm .it a .nr{flex:none;margin-left:auto;font-style:normal;font-size:10px;line-height:1;padding:3px 5px;border-radius:4px;background:rgba(255,255,255,.08);color:#8d9ab3;white-space:nowrap}
.mm .ft{padding:8px 16px 12px;color:var(--dim);font-size:11.5px;border-top:1px solid var(--line)}
.mm .ft b{color:var(--maple);font-weight:600}
.mm .it a.info{cursor:pointer} .mm .it a.info:hover{background:rgba(255,255,255,.07)}
.mm .desc{color:#b9c3d8;font-size:13px;line-height:1.6;white-space:pre-line;margin:4px 0 10px}
.mm .mobgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(108px,1fr));gap:8px}
.mm .mobgrid .mob{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 6px;border-radius:8px;border:1px solid #2c3652;background:rgba(255,255,255,.03);cursor:pointer;color:#fff;font-size:12.5px;text-align:center}
.mm .mobgrid .mob:hover{border-color:#4a5880}
.mm .mobgrid .mob .mi{width:84px;height:64px;display:flex;align-items:center;justify-content:center} .mm .mobgrid .mob .mi img{max-width:84px;max-height:64px;image-rendering:pixelated}
.mm .mobgrid .mob small{color:#8d9ab3;font-size:11px}
.mm .hd .mi.ic img{max-width:48px;max-height:48px;image-rendering:pixelated}
@media (max-width:640px){ .mm{padding:0;align-items:flex-end} .mm .box{max-height:88vh;border-radius:14px 14px 0 0} .mm .it{grid-template-columns:repeat(auto-fill,minmax(var(--cw,136px),1fr))} }
.mm .hd .maps .st{display:flex;flex-wrap:wrap;gap:4px 12px;margin-bottom:4px;color:#8d9ab3;font-size:12px}
.mm .hd .maps .st b{color:#dfe5f3;font-weight:600}
.mm .hd .maps{max-height:none}
.mm .hd .maps .mp .full{display:none} .mm .hd .maps.open .mp .full{display:inline} .mm .hd .maps.open .mp .short{display:none}
.mm .hd .maps .more{color:var(--maple);font-size:11.5px;margin-left:4px;cursor:pointer}
.mm .stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:2px 16px;margin:4px 0 12px;font-size:12.5px}
.mm .stats div{display:flex;justify-content:space-between;gap:8px;padding:3px 0;border-bottom:1px dashed #243026}
.mm .stats div span{color:#8d9ab3} .mm .stats div b{color:#dfe5f3;font-weight:600;text-align:right} .mm .stats div b small{color:var(--maple);font-weight:400;font-size:11px}
.mm .hd .back{flex:none;align-self:flex-start;margin-left:auto;background:rgba(255,255,255,.06);border:1px solid #3a4666;color:#dfe5f3;border-radius:7px;padding:4px 10px;font-size:12.5px;line-height:1.4;cursor:pointer;font-family:inherit}
.mm .hd .back:hover{background:rgba(255,255,255,.12)} .mm .hd .back[hidden]{display:none}
.mm .hd .back:not([hidden]) ~ .x{margin-left:2px}   /* hotfix473：返回鈕在 ✕ 左邊，一起靠右 */
