/* /lib game-data section — dark MapleLegends-style theme */

.lib-catnav {
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	padding: 0;
	margin-top: 0;
	/* Catnav sits above the splash banner (which has its own transform-stacking
	   context) but BELOW the site header (z-index 50) so the GAME / NEWS / etc.
	   mega-menus open over the catnav, not behind it. */
	position: relative;
	z-index: 40;
}
.lib-catnav .container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;            /* center categories in the bar */
	gap: 0;
	padding: 0;
}
.lib-catnav-home,
.lib-catnav-link {
	color: #e0e0e0;
	text-decoration: none;
	padding: 0.5rem 1rem;               /* slimmer bar */
	font-size: 0.88rem;
	letter-spacing: 0.02em;
	transition: background-color 0.15s, color 0.15s;
	border: none;
	background: transparent;
}
.lib-catnav-home {
	color: #ffd166;
	font-weight: 600;
	margin-inline-end: 0.5rem;
}
.lib-catnav-home:hover,
.lib-catnav-link:hover {
	background: #1a1a1a;
	color: #ffd166;
}
.lib-catnav-link.is-active {
	background: #1a1a1a;
	color: #ffd166;
	box-shadow: inset 0 -2px 0 #ffd166;
}
.lib-leaf { display: inline-block; transform: translateY(-1px); }

/* Catnav dropdown (Items, Equips) */
.lib-catnav-dd {
	position: relative;
}
.lib-catnav-dd > .lib-catnav-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}
.lib-catnav-chev {
	transition: transform 0.2s ease;
	opacity: 0.7;
}
.lib-catnav-dd:hover > .lib-catnav-link .lib-catnav-chev,
.lib-catnav-dd:focus-within > .lib-catnav-link .lib-catnav-chev {
	transform: rotate(180deg);
	opacity: 1;
}
.lib-catnav-panel {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 180px;
	background: #141414;
	border: 1px solid #2a2a2a;
	border-top: none;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
	display: flex;
	flex-direction: column;
	padding: 0.4rem 0;
	visibility: hidden;
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
	z-index: 50;
}
.lib-catnav-dd:hover > .lib-catnav-panel,
.lib-catnav-dd:focus-within > .lib-catnav-panel {
	visibility: visible;
	opacity: 1;
	transform: translateY(0);
}
.lib-catnav-sublink {
	color: #d8d8d8;
	text-decoration: none;
	padding: 0.55rem 1rem;
	font-size: 0.92rem;
	transition: background-color 0.15s, color 0.15s;
	white-space: nowrap;
}
.lib-catnav-sublink:hover { background: #1f1f1f; color: #ffd166; }
.lib-catnav-sublink.is-active { color: #ffd166; background: #1f1f1f; }
[dir="rtl"] .lib-catnav-panel { left: auto; right: 0; }

/* Active sub-category pill in the filterbar */
.lib-sub-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4rem 0.7rem;
	background: #2a2a2a;
	border: 1px solid #3a3a3a;
	border-radius: 4px;
	color: #ffd166;
	font-weight: 600;
	font-size: 0.95rem;
}
.lib-sub-clear {
	color: #888;
	text-decoration: none;
	font-size: 1.1rem;
	line-height: 1;
	padding: 0 0.25rem;
	border-radius: 3px;
}
.lib-sub-clear:hover { color: #fff; background: #3a3a3a; text-decoration: none; }

/* Page shell */
.lib-shell {
	max-width: 1200px;
	margin: 1.5rem auto;
	padding: 0 1rem;
}

.lib-card {
	background: #1a1a1a;
	border: 1px solid #2a2a2a;
	border-radius: 8px;
	padding: 1.25rem;
	color: #d8d8d8;
}

.lib-empty {
	text-align: center;
	padding: 3rem 1rem;
	color: #888;
}

/* Filter bar */
.lib-filterbar {
	background: #1a1a1a;
	border: 1px solid #2a2a2a;
	border-radius: 8px;
	padding: 1rem 1.25rem;
	margin-bottom: 1rem;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 0.75rem 1rem;
	align-items: end;
}
.lib-filterbar label {
	display: block;
	font-size: 0.75rem;
	color: #c0c0c0;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: center;
	margin-bottom: 0.25rem;
}
.lib-filterbar select,
.lib-filterbar input[type="text"] {
	width: 100%;
	background: #fff;
	color: #222;
	border: 1px solid #3a3a3a;
	border-radius: 4px;
	padding: 0.45rem 0.65rem;
	font-size: 0.95rem;
}
.lib-filterbar .lib-search-row { grid-column: 1 / -1; display: flex; gap: 0.5rem; align-items: end; }
.lib-filterbar .lib-search-row > .lib-field { flex: 1; }
.lib-btn {
	background: #2a2a2a;
	color: #e0e0e0;
	border: 1px solid #3a3a3a;
	border-radius: 4px;
	padding: 0.5rem 1.5rem;
	font-size: 0.95rem;
	cursor: pointer;
	transition: background-color 0.15s;
}
.lib-btn:hover { background: #3a3a3a; color: #ffd166; }

/* Tables */
.lib-table-wrap {
	background: #1a1a1a;
	border: 1px solid #2a2a2a;
	border-radius: 8px;
	overflow: hidden;
}
.lib-table {
	width: 100%;
	border-collapse: collapse;
	color: #d8d8d8;
}
.lib-table thead th {
	background: #232323;
	color: #ffffff;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 0.85rem 1rem;
	font-size: 0.85rem;
	border-bottom: 1px solid #2a2a2a;
	text-align: center;
}
.lib-table tbody td {
	padding: 0.85rem 1rem;
	border-bottom: 1px solid #232323;
	text-align: center;
	vertical-align: middle;
	font-size: 0.95rem;
}
.lib-table tbody tr:hover { background: #1f1f1f; }
.lib-table tbody tr:last-child td { border-bottom: none; }
.lib-table a { color: #e0e0e0; text-decoration: underline; text-underline-offset: 3px; }
.lib-table a:hover { color: #ffd166; }

/* Image cells */
.lib-table td.lib-img-cell { width: 80px; }
.lib-icon {
	display: inline-block;
	max-width: 48px;
	max-height: 48px;
	width: auto;
	height: auto;
	image-rendering: -webkit-optimize-contrast;
	image-rendering: crisp-edges;
}
.lib-noicon { color: #555; }

/* Equips table: stacked W.Att / M.Att lines + grouped speed/slots */
.lib-attack-cell { font-size: 0.88rem; line-height: 1.45; white-space: nowrap; }
.lib-attack-cell .lib-dash { color: #555; }

/* Cash-items checkbox */
.lib-field--inline { display: flex; align-items: flex-end; }
.lib-checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; user-select: none; color: #d8d8d8; font-size: 0.9rem; padding-bottom: 0.5rem; }
.lib-checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: #4a8fff; cursor: pointer; }

/* Pagination */
.lib-pagination {
	display: flex;
	justify-content: center;
	margin-top: 1.5rem;
}
.lib-pagination ul {
	list-style: none;
	display: flex;
	gap: 0.25rem;
	padding: 0;
	margin: 0;
}
.lib-pagination li a,
.lib-pagination li span {
	display: inline-block;
	min-width: 2.25rem;
	padding: 0.5rem 0.85rem;
	background: #1a1a1a;
	color: #d8d8d8;
	text-align: center;
	border: 1px solid #2a2a2a;
	border-radius: 4px;
	text-decoration: none;
	font-size: 0.9rem;
}
.lib-pagination li a:hover { background: #2a2a2a; color: #ffd166; }
.lib-pagination li.active a {
	background: #ffd166;
	color: #111;
	border-color: #ffd166;
	font-weight: 700;
}
.lib-pagination li.disabled a {
	color: #555;
	pointer-events: none;
	background: #141414;
}

/* Landing splash */
.lib-splash {
	min-height: calc(100vh - 320px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 9rem 1rem 1rem;
}
.lib-splash-inner {
	width: 100%;
	max-width: 820px;
	text-align: center;
}
.lib-splash-banner {
	max-width: 760px;
	width: 95%;
	height: auto;
	display: block;
	margin: 0 auto 1.5rem;           /* sits cleanly above the search bar */
	filter: drop-shadow(0 14px 36px rgba(0, 0, 0, 0.5));
	animation: lib-splash-float 4.2s ease-in-out infinite;
}
@keyframes lib-splash-float {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-6px); }
}
.lib-splash-form {
	display: flex;
	gap: 0.5rem;
	max-width: 700px;
	margin: 0 auto;
}
@media (max-width: 720px) {
	.lib-splash-banner { max-width: 460px; }
}
.lib-splash-input {
	flex: 1;
	background: #fff;
	color: #222;
	border: 1px solid #3a3a3a;
	border-radius: 6px;
	padding: 0.85rem 1.1rem;
	font-size: 1rem;
	outline: none;
	transition: box-shadow 0.2s, border-color 0.2s;
}
.lib-splash-input:focus {
	border-color: #ffd166;
	box-shadow: 0 0 0 3px hsl(212 90% 58% / 0.25);
}
.lib-splash-btn {
	background: #1f1f1f;
	color: #e0e0e0;
	border: 1px solid #2a2a2a;
	border-radius: 6px;
	padding: 0 1.6rem;
	font-size: 1rem;
	cursor: pointer;
	letter-spacing: 0.04em;
	transition: background-color 0.15s, color 0.15s;
}
.lib-splash-btn:hover { background: #2a2a2a; color: #ffd166; }
.lib-splash-updated {
	margin-top: 1rem;
	font-size: 0.78rem;
	color: rgba(224, 224, 224, 0.55);
	letter-spacing: 0.05em;
	text-transform: uppercase;
}
.lib-splash-updated time { color: rgba(255, 209, 102, 0.85); font-weight: 600; }

/* Search results page */
.lib-search-hero {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}
.lib-search-hero input[type="text"] {
	flex: 1;
	background: #fff;
	color: #222;
	border: 1px solid #3a3a3a;
	border-radius: 4px;
	padding: 0.6rem 0.85rem;
	font-size: 0.95rem;
}
.lib-search-summary {
	color: #c0c0c0;
	font-size: 0.95rem;
	margin-bottom: 1rem;
}
.lib-search-summary strong { color: #ffd166; }

.lib-search-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 1rem;
}
.lib-search-group {
	background: #1a1a1a;
	border: 1px solid #2a2a2a;
	border-radius: 8px;
	padding: 1rem 1.1rem 1.25rem;
}
.lib-search-group-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 0.75rem;
	border-bottom: 1px solid #2a2a2a;
	padding-bottom: 0.5rem;
}
.lib-search-group-head h3 {
	margin: 0;
	color: #fff;
	font-size: 1.05rem;
	letter-spacing: 0.02em;
}
.lib-search-viewall {
	color: #ffd166;
	text-decoration: none;
	font-size: 0.85rem;
}
.lib-search-viewall:hover { color: #ffe09c; text-decoration: underline; }
.lib-search-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.lib-search-list li {
	border-bottom: 1px solid #232323;
}
.lib-search-list li:last-child { border-bottom: none; }
.lib-search-list a,
.lib-search-list .lib-search-row-inner {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.55rem 0;
	color: #d8d8d8;
	text-decoration: none;
	font-size: 0.93rem;
}
.lib-search-list .lib-icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	max-width: 24px;
	max-height: 24px;
}
.lib-search-noicon {
	display: inline-block;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}
.lib-search-name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.lib-search-meta {
	color: #888;
	font-size: 0.78rem;
	white-space: nowrap;
}
.lib-search-id {
	color: #555;
	font-size: 0.75rem;
	font-family: monospace;
	white-space: nowrap;
}
.lib-search-more {
	display: block;
	margin-top: 0.5rem;
	color: #888;
	font-size: 0.82rem;
	text-align: end;
	text-decoration: none;
}
.lib-search-more:hover { color: #ffd166; }

/* Old landing grid (kept for legacy callers) */
.lib-home {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
	margin-top: 1rem;
}
.lib-home-card {
	display: block;
	padding: 1.5rem;
	background: #1a1a1a;
	border: 1px solid #2a2a2a;
	border-radius: 8px;
	color: #e0e0e0;
	text-decoration: none;
	transition: transform 0.15s, border-color 0.15s, background-color 0.15s;
	text-align: center;
}
.lib-home-card:hover {
	transform: translateY(-2px);
	border-color: #ffd166;
	background: #1f1f1f;
	color: #ffd166;
	text-decoration: none;
}
.lib-home-card .lib-home-title { display: block; font-size: 1.15rem; font-weight: 700; margin-bottom: 0.4rem; }
.lib-home-card .lib-home-count { font-size: 0.9rem; color: #888; }
.lib-home-card:hover .lib-home-count { color: #d0a040; }

/* Skill / item description cells */
.lib-desc {
	max-width: 520px;
	text-align: start;
	color: #c8c8c8;
	white-space: pre-wrap;
}
.lib-desc-meta { color: #ffd166; font-weight: 600; }
.lib-desc-passive { color: #ffd166; font-weight: 600; }

/* Tag/badge */
.lib-badge {
	display: inline-block;
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	background: #2a2a2a;
	color: #d0d0d0;
	font-size: 0.78rem;
	letter-spacing: 0.04em;
}
.lib-badge.boss { background: #8b1a1a; color: #fff; }

/* Right-to-left adjustments */
[dir="rtl"] .lib-table thead th,
[dir="rtl"] .lib-table tbody td { text-align: center; }
[dir="rtl"] .lib-pagination ul { flex-direction: row-reverse; }

/* Floating mushroom mascot, bottom-right (or bottom-left in RTL) */
.lib-mascot {
	position: fixed;
	right: 1.5rem;
	bottom: 1.5rem;
	z-index: 60;
	display: block;
	width: 140px;
	height: 140px;
	pointer-events: auto;
	filter: drop-shadow(0 8px 18px rgba(0,0,0,0.55));
	transition: transform 0.25s ease;
	animation: lib-mascot-float 3.6s ease-in-out infinite;
}
.lib-mascot:hover {
	transform: translateY(-4px) scale(1.05) rotate(-3deg);
}
.lib-mascot img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	image-rendering: pixelated;
	image-rendering: -moz-crisp-edges;
	image-rendering: crisp-edges;
}
[dir="rtl"] .lib-mascot {
	right: auto;
	left: 1.5rem;
}
@keyframes lib-mascot-float {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-6px); }
}
@media (max-width: 720px) {
	.lib-mascot { width: 90px; height: 90px; right: 0.75rem; bottom: 0.75rem; }
}

/* Quest detail view */
.lib-q-back {
	display: inline-block;
	color: #c0c0c0;
	text-decoration: none;
	margin-bottom: 1rem;
	font-size: 0.9rem;
}
.lib-q-back:hover { color: #ffd166; }

.lib-q-detail {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 1rem;
	align-items: start;
}
@media (max-width: 760px) {
	.lib-q-detail { grid-template-columns: 1fr; }
}
.lib-q-side {
	background: #1a1a1a;
	border: 1px solid #2a2a2a;
	border-radius: 8px;
	padding: 1.25rem;
	text-align: center;
}
.lib-q-title { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 0.25rem; }
.lib-q-parent { font-size: 0.85rem; color: #888; margin-bottom: 1rem; font-style: italic; }
.lib-q-npcblock {
	display: flex; align-items: center; justify-content: center;
	background: #232323; border-radius: 6px; padding: 0.75rem;
	margin: 0.5rem auto; width: 96px; height: 96px;
}
.lib-q-npcblock img { max-width: 80px; max-height: 80px; image-rendering: pixelated; image-rendering: crisp-edges; }
.lib-q-talkbtn {
	display: block;
	margin-top: 0.75rem;
	padding: 0.65rem 1rem;
	background: #232323;
	border: 1px solid #2a2a2a;
	border-radius: 6px;
	color: #d8d8d8;
	text-decoration: none;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.lib-q-talkbtn:hover { background: #2a2a2a; color: #ffd166; border-color: #ffd166; }
.lib-q-talktarget { color: #ffd166; text-decoration: underline; text-underline-offset: 3px; }

.lib-q-main {
	background: #1a1a1a;
	border: 1px solid #2a2a2a;
	border-radius: 8px;
	padding: 1rem 1.25rem 1.5rem;
}
.lib-q-tabs {
	display: flex;
	gap: 0;
	border-bottom: 1px solid #2a2a2a;
	margin-bottom: 1.25rem;
}
.lib-q-tab {
	color: #c0c0c0;
	text-decoration: none;
	padding: 0.85rem 1.25rem;
	font-size: 0.95rem;
	letter-spacing: 0.04em;
	transition: color 0.15s, box-shadow 0.15s;
}
.lib-q-tab:hover { color: #ffd166; }
.lib-q-tab.is-active { color: #ffd166; box-shadow: inset 0 -3px 0 #ffd166; font-weight: 600; }

.lib-q-section {
	font-size: 1.4rem;
	color: #fff;
	margin: 1.25rem 0 0.75rem;
	font-weight: 400;
	letter-spacing: 0.02em;
}

.lib-q-bubble {
	background: #232323;
	border: 1px solid #2a2a2a;
	border-radius: 6px;
	padding: 0.95rem 1.1rem;
	margin: 0.5rem 0 0.6rem;
	color: #d8d8d8;
	line-height: 1.6;
	font-size: 0.95rem;
}
.lib-q-link { color: #ffd166; text-decoration: underline; text-underline-offset: 2px; }
.lib-q-link:hover { color: #ffe09c; }

/* Inline icon in dialogue (e.g. #i4031003# mirror item) */
.lib-q-inline-icon {
	display: inline-block;
	max-width: 24px; max-height: 24px;
	vertical-align: -6px;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
}

/* MapleStory inline colour codes */
.lib-q-blue   { color: #6ab7ff; }
.lib-q-red    { color: #ff7070; }
.lib-q-green  { color: #6cd66c; }
.lib-q-purple { color: #b97cff; }
.lib-q-player { color: #ffd166; font-weight: 600; }
.lib-q-tag    { display: inline-block; padding: 0.05rem 0.4rem; border-radius: 3px; background: #2a2a2a; color: #c8c8c8; font-size: 0.82rem; }
.lib-q-choice { display: block; margin-top: 0.25rem; color: #c0c0c0; }

/* Monster detail — stat table inside the sidebar + drop icon strips on the right */
.lib-mob-side { text-align: center; }
.lib-mob-stats {
	width: 100%;
	margin-top: 0.5rem;
	border-collapse: collapse;
	color: #d8d8d8;
	font-size: 0.88rem;
}
.lib-mob-stats td {
	border: 1px solid #2a2a2a;
	padding: 0.45rem 0.6rem;
	text-align: start;
	background: #232323;
}
.lib-mob-stat-merge { text-align: center !important; font-weight: 600; }
.lib-mob-elements { display: flex; flex-direction: column; gap: 0.2rem; }
.lib-mob-elements div:first-child { color: #ffd166; }

.lib-mob-drop-cat {
	margin: 1rem 0 0.5rem;
	font-size: 1.05rem;
	color: #c0c0c0;
	font-weight: 600;
	letter-spacing: 0.04em;
}
.lib-mob-drops {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #232323;
}
.lib-mob-drop {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: #232323;
	border: 1px solid #2a2a2a;
	border-radius: 4px;
	transition: border-color 0.15s, transform 0.15s;
}
.lib-mob-drop:hover { border-color: #ffd166; transform: translateY(-2px); }
.lib-mob-drop img {
	max-width: 32px;
	max-height: 32px;
	image-rendering: pixelated;
	image-rendering: -moz-crisp-edges;
	image-rendering: crisp-edges;
}

/* Equip detail — sidebar layout: image + reqs side-by-side, then job pills, stats, sell price */
.lib-eq-side { text-align: start; }
.lib-eq-head {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 0.75rem;
	align-items: center;
	margin: 0.5rem 0 0.75rem;
}
.lib-eq-head .lib-q-npcblock { margin: 0; width: 100px; height: 100px; }
.lib-eq-reqs { display: flex; flex-direction: column; gap: 0.2rem; color: #d8d8d8; font-size: 0.92rem; }
.lib-eq-jobs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	margin: 0.5rem 0 0.75rem;
	border: 1px solid #2a2a2a;
	border-radius: 4px;
	overflow: hidden;
}
.lib-eq-job {
	padding: 0.4rem 0.3rem;
	text-align: center;
	font-size: 0.78rem;
	background: #232323;
	color: #5a5a5a;                                /* greyed-out by default */
	border-inline-end: 1px solid #2a2a2a;
	border-block-end: 1px solid #2a2a2a;
}
.lib-eq-job:nth-child(3n) { border-inline-end: none; }
.lib-eq-job:nth-last-child(-n+3) { border-block-end: none; }
.lib-eq-job.is-on { color: #ffd166; font-weight: 600; }
.lib-eq-statsblock {
	background: #232323;
	border: 1px solid #2a2a2a;
	border-radius: 6px;
	padding: 0.75rem 1rem;
	color: #d8d8d8;
}
.lib-eq-stat { padding: 0.18rem 0; font-size: 0.92rem; }
.lib-eq-stat strong { color: #c0c0c0; margin-inline-end: 0.25rem; }
.lib-eq-range { color: #888; font-size: 0.86rem; }
.lib-eq-price {
	margin-top: 0.75rem;
	padding: 0.7rem 1rem;
	background: #232323;
	border: 1px solid #2a2a2a;
	border-radius: 6px;
	text-align: center;
	color: #ffd166;
	font-weight: 600;
}

/* Map detail — large preview image inside the side card */
.lib-mapdetail-img {
	background: #232323;
	border-radius: 6px;
	padding: 0.75rem;
	margin: 0.5rem 0 1rem;
	text-align: center;
}
.lib-mapdetail-img img {
	max-width: 100%;
	max-height: 240px;
	height: auto;
	image-rendering: pixelated;
	image-rendering: -moz-crisp-edges;
	image-rendering: crisp-edges;
}

/* Map detail — BGM card with custom warm-gold audio player */
.lib-bgm {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	text-align: start;
	background: linear-gradient(135deg, rgba(54, 32, 8, 0.55), rgba(28, 18, 6, 0.65));
	border: 1px solid rgba(255, 184, 77, 0.28);
	box-shadow: 0 0 0 1px rgba(255, 184, 77, 0.06) inset, 0 4px 18px rgba(0, 0, 0, 0.35);
}
.lib-bgm-head {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.lib-bgm-label {
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #ffd166;
	font-size: 0.78rem;
}
.lib-bgm-track {
	color: #f0d9a8;
	font-size: 0.85rem;
	word-break: break-all;
}
.lib-bgm-player {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.5rem 0.6rem;
	border-radius: 999px;
	background: linear-gradient(135deg, #2a1b08, #1a1208);
	box-shadow: inset 0 0 0 1px rgba(255, 184, 77, 0.35),
				0 0 14px rgba(255, 170, 50, 0.15);
}
.lib-bgm-btn {
	flex: 0 0 auto;
	width: 36px; height: 36px;
	border: none;
	border-radius: 50%;
	background: linear-gradient(145deg, #ffd166 0%, #f4a32c 55%, #c87a14 100%);
	color: #2a1b08;
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 8px rgba(255, 170, 50, 0.45),
				inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.lib-bgm-btn:hover {
	transform: scale(1.06);
	box-shadow: 0 3px 14px rgba(255, 200, 80, 0.6),
				inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.lib-bgm-btn:active { transform: scale(0.96); }
.lib-bgm-icon-pause { display: none; }
.lib-bgm-player.is-playing .lib-bgm-icon-play { display: none; }
.lib-bgm-player.is-playing .lib-bgm-icon-pause { display: block; }
.lib-bgm-bar {
	position: relative;
	flex: 1 1 auto;
	height: 6px;
	background: rgba(255, 184, 77, 0.18);
	border-radius: 999px;
	cursor: pointer;
	outline: none;
}
.lib-bgm-bar:focus-visible {
	box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.5);
}
.lib-bgm-bar-fill {
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 0%;
	background: linear-gradient(90deg, #ffd166, #ffa726);
	border-radius: 999px;
	box-shadow: 0 0 8px rgba(255, 184, 77, 0.6);
}
.lib-bgm-bar-thumb {
	position: absolute;
	top: 50%;
	left: 0%;
	transform: translate(-50%, -50%);
	width: 12px; height: 12px;
	border-radius: 50%;
	background: #fff3d4;
	box-shadow: 0 0 10px rgba(255, 209, 102, 0.9),
				0 0 0 2px rgba(255, 170, 50, 0.5);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.15s ease;
}
.lib-bgm-player.is-ready .lib-bgm-bar-thumb,
.lib-bgm-bar:hover .lib-bgm-bar-thumb { opacity: 1; }
.lib-bgm-time {
	flex: 0 0 auto;
	color: #ffd166;
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
	min-width: 72px;
	text-align: right;
	text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Item-detail "Dropped By" — wrapped, comma-separated mob list. */
.lib-droplist {
	color: #d8d8d8;
	line-height: 2.0;
	word-spacing: 0.15rem;
}
.lib-droplist .lib-q-link { padding: 0.05rem 0.1rem; }

/* Global drops table — one row per source, items as a wrapped icon strip. */
.lib-droptable td { vertical-align: middle; }
.lib-source-link { display: inline-flex; align-items: center; gap: 0.5rem; color: inherit; text-decoration: none; }
.lib-source-link:hover .lib-source-name { color: #ffd166; }
.lib-source-name { font-weight: 600; }
.lib-drop-strip {
	display: flex; flex-wrap: wrap; gap: 0.25rem;
	padding: 0.25rem 0;
}
.lib-drop-cell {
	display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 0.25rem;
	transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}
.lib-drop-cell:hover {
	background: rgba(255, 209, 102, 0.12);
	border-color: rgba(255, 209, 102, 0.45);
	transform: scale(1.08);
}
.lib-drop-cell img { display: block; }

.lib-q-metalist { list-style: none; padding: 0; margin: 0.5rem 0; }
.lib-q-metalist li {
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid #232323;
	color: #d8d8d8;
}
.lib-q-metalist li:last-child { border-bottom: none; }
.lib-q-metalist li strong { color: #ffd166; margin-inline-end: 0.5rem; }
.lib-q-emptymeta { color: #888; padding: 0.5rem 0.25rem; font-style: italic; }

/* Map page: full-row image (MapleLegends style — large map render in the
   left column rather than a 32px icon). */
.lib-table td.lib-map-img {
	width: 50%;
	padding: 1rem;
}
.lib-map-img img {
	max-width: 100%;
	max-height: 280px;
	height: auto;
	display: block;
	margin: 0 auto;
	image-rendering: pixelated;
	image-rendering: -moz-crisp-edges;
	image-rendering: crisp-edges;
}
