/* Wormopaedia (ui/wormopaedia.js): the weapon encyclopaedia and the how-to-play pages. Same look as style.css. */
#ui.wormopaedia { justify-content: flex-start; align-items: stretch; padding: calc(var(--st) + 0.6rem) calc(var(--sr) + 0.8rem) calc(var(--sb) + 0.6rem) calc(var(--sl) + 0.8rem); box-sizing: border-box; background: linear-gradient(rgba(30, 14, 50, 0.35), rgba(30, 14, 50, 0.55)); }
#ui.wormopaedia.overlay { background: rgba(20, 8, 30, 0.82); backdrop-filter: blur(3px); }
.wd-tabs { flex: none; }
.wd-tabs button { min-width: 6rem; }
.wd-cols { gap: 0.8rem; }
.wd-list { flex: 1.15; min-width: 0; }
.wd-detail { flex: 1; min-width: 0; }
.wd-how { flex: 1; }
.wd-cols [hidden] { display: none !important; }
.wd-scheme { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; margin-bottom: 0.5rem; flex-wrap: wrap; }
.wd-scheme select { flex: 1; min-width: 8rem; height: 2.75rem; border: 0.16rem solid var(--ink); border-radius: 0.8rem; padding: 0 0.6rem; background: #fff; font-family: "Lilita One", sans-serif !important; font-size: 1rem; box-shadow: 0 0.18rem 0 var(--ink); }
.wd-gh { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 1.05rem; letter-spacing: 0.03em; margin: 0.6rem 0 0.3rem; color: var(--pink2); }
.wd-gh:first-child { margin-top: 0; }
.wd-gh small { font-family: "Fredoka", sans-serif; font-weight: 700; color: var(--ink); opacity: 0.55; margin-left: 0.3rem; }
.wd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr)); gap: 0.4rem; }
.wd-tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0.1rem; min-height: 4.6rem; padding: 0.3rem 0.2rem; border: 0.16rem solid var(--ink); border-radius: 0.8rem; background: #fff; box-shadow: 0 0.18rem 0 rgba(43, 15, 28, 0.3); color: var(--ink); }
.wd-tile canvas { width: 2.4rem; height: 2.4rem; flex: none; }
.wd-tile span { font-size: 0.7rem; font-weight: 700; line-height: 1.05; text-align: center; overflow-wrap: anywhere; }
.wd-tile.super { background: #fff7d0; }
.wd-tile.on { background: linear-gradient(#ffe6ef, #ffc2d6); box-shadow: 0 0.18rem 0 var(--pink2); transform: translateY(-0.05rem); }
.wd-head { display: flex; align-items: center; gap: 0.8rem; }
.wd-icon { width: 4.6rem; height: 4.6rem; flex: none; }
.wd-name { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 1.7rem; margin: 0 0 0.2rem; line-height: 1.05; }
.wd-chips { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.wd-chips span { display: inline-flex; align-items: center; font-weight: 700; font-size: 0.8rem; background: #fff; border: 0.12rem solid var(--ink); border-radius: 1rem; padding: 0.1rem 0.6rem; }
.wd-chips .gold { background: var(--yellow); }
.wd-desc { font-size: 1rem; line-height: 1.4; font-weight: 600; margin: 0.6rem 0 0.4rem; }
.wd-how-line { margin: 0.2rem 0 0.5rem; padding: 0.35rem 0.6rem; background: #d8ffc8; border: 0.14rem solid var(--ink); border-radius: 0.7rem; font-weight: 600; font-size: 0.92rem; }
.wd-how-line b { font-family: "Lilita One", sans-serif; font-weight: 400; margin-right: 0.4rem; }
.wd-facts { width: 100%; border-collapse: collapse; margin: 0.3rem 0 0.4rem; font-size: 0.92rem; }
.wd-facts caption { text-align: left; font-family: "Lilita One", sans-serif; font-size: 0.95rem; color: var(--pink2); padding-bottom: 0.15rem; }
.wd-facts th, .wd-facts td { text-align: left; padding: 0.22rem 0.3rem; border-top: 0.1rem dashed rgba(43, 15, 28, 0.25); vertical-align: top; }
.wd-facts th { font-weight: 700; opacity: 0.75; width: 38%; white-space: nowrap; }
.wd-facts td { font-weight: 700; }
.wd-detail h4 { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 1.05rem; margin: 0.5rem 0 0.2rem; color: var(--pink2); }
.wd-tips { margin: 0; padding-left: 1.1rem; font-weight: 600; font-size: 0.95rem; line-height: 1.4; }
.wd-tips li + li { margin-top: 0.25rem; }
.wd-nav { display: flex; gap: 0.6rem; justify-content: space-between; margin-top: 0.8rem; }
.wd-sec { margin-bottom: 0.8rem; }
.wd-sec h3 { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 1.25rem; margin: 0 0 0.25rem; color: var(--pink2); }
.wd-sec p { margin: 0.25rem 0; font-weight: 600; line-height: 1.4; }
.wd-sec ul { margin: 0.2rem 0; padding-left: 1.2rem; font-weight: 600; line-height: 1.4; }
.wd-sec li + li { margin-top: 0.2rem; }
.wd-how { max-width: 52rem; margin: 0 auto; width: 100%; box-sizing: border-box; }
#stage.sq .wd-cols { flex-direction: column; }
#stage.sq .wd-list { flex: 1; }
#stage.sq .wd-detail { flex: 1.2; }
#stage.short .wd-name { font-size: 1.35rem; }
#stage.short .wd-icon { width: 3.6rem; height: 3.6rem; }
#stage.short .wd-desc { font-size: 0.92rem; }
#stage.short .wd-tabs button { min-width: 4.6rem; }
