/* shared by every page: black & white theme (home.css adds the landing-page sections) */
:root {
	--bg: #ffffff;
	--fg: #0a0a0a;
	--muted: #71717a;
	--muted2: #a1a1aa;
	--line: #e4e4e7;
	--soft: #f4f4f5;
	--soft2: #fafafa;
	--radius: 14px;
	--max: 1280px;
	--head: 84px;
	--ease: cubic-bezier(.22, 1, .36, 1);
	color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: 'Inter', 'Noto Sans Thai', system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.15; font-weight: 600; }
p { margin: 0; }
code, kbd { font-family: ui-monospace, Consolas, monospace; font-size: .9em; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: .05em .4em; color: var(--fg); }
kbd { box-shadow: inset 0 -1px 0 var(--line); }
svg.i { width: 1em; height: 1em; flex: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
@media (min-width: 1024px) { .wrap { padding: 0 32px; } }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* ------------------------------------------------------------ black pill button */
.mbtn {
	position: relative; display: inline-flex; flex: none; padding: 4px; border-radius: 999px; background: #fff;
	box-shadow: inset -.5px -.5px 1px 0 rgba(0, 0, 0, .6);
	transition: box-shadow .5s;
}
.mbtn:hover { box-shadow: inset 0 -2px 4px 0 rgba(0, 0, 0, .6); }
.mbtn > a, .mbtn > button {
	position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 40px; padding: 0 24px; border: 0; border-radius: 999px; background: #000; color: #fff;
	font: inherit; font-size: 1rem; font-weight: 500; white-space: nowrap; cursor: pointer;
	transition: box-shadow .5s;
}
.mbtn > a::before, .mbtn > button::before {
	content: ''; position: absolute; inset: 0; border-radius: 999px; pointer-events: none;
	box-shadow: inset 0 2px 4.5px 0 rgba(255, 255, 255, .6);
}
.mbtn > a:hover, .mbtn > button:hover { box-shadow: inset 0 -6px 8px -1px rgba(255, 255, 255, .45); }
.mbtn > button[disabled] { opacity: .5; cursor: not-allowed; }
.mbtn svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.mbtn:hover svg.up-right { transform: translate(2px, -2px); }
.mbtn.icon > a, .mbtn.icon > button { width: 40px; padding: 0; }
.mbtn.lg > a, .mbtn.lg > button { height: 48px; padding: 0 28px; font-size: 1.05rem; }
.mbtn.block { display: flex; width: 100%; }
.mbtn.block > a, .mbtn.block > button { width: 100%; }
.mbtn.light { background: #0a0a0a; box-shadow: inset -.5px -.5px 1px 0 rgba(255, 255, 255, .6); }
.mbtn.light > a { background: #fff; color: #000; }
.mbtn.light > a::before { box-shadow: inset 0 -2px 4.5px 0 rgba(0, 0, 0, .25); }

.btn-ghost, .btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 999px;
	border: 1px solid var(--line); background: #fff; color: var(--fg); font: inherit; font-weight: 500; cursor: pointer;
	transition: border-color .3s, transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn-ghost:hover, .btn:hover { border-color: var(--fg); transform: translateY(-2px); box-shadow: 0 10px 24px -16px rgba(10, 10, 10, .35); }
.btn-ghost.dark { background: transparent; color: #fff; border-color: #3f3f46; }
.btn-ghost.dark:hover { border-color: #fff; }

/* ------------------------------------------------------------ header */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--head); transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.header.scrolled { background: rgba(255, 255, 255, .78); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom-color: var(--line); }
.header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { width: 32px; height: 32px; border-radius: 6px; background: var(--fg); color: #fff; display: grid; place-items: center; }
.brand .logo svg { width: 20px; height: 20px; }
.brand b { font-family: 'Orbitron', sans-serif; font-size: 1.5rem; font-weight: 700; letter-spacing: .01em; line-height: 1; }
.navpill {
	position: relative; display: flex; align-items: center; gap: 24px; margin: 0; padding: 12px 28px; list-style: none;
	border: 2px solid #fff; outline: 1px solid var(--line); border-radius: 999px;
}
.navpill::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 999px; background: rgba(10, 10, 10, .05); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.navpill a { position: relative; color: var(--muted); font-weight: 500; transition: color .2s; white-space: nowrap; }
.navpill a:hover, .navpill a:focus-visible, .navpill a.active { color: var(--fg); outline: none; }
.navpill a.active::after { content: ''; position: absolute; left: 50%; bottom: -8px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--fg); }
.head-actions { display: flex; align-items: center; gap: 12px; }
.only-sm { display: none; }
@media (max-width: 1023px) { .navpill { display: none; } .only-sm.menu { display: inline-flex; } }
@media (max-width: 639px) { .head-actions .play-full { display: none; } .only-sm.play { display: inline-flex; } .brand b { font-size: 1.25rem; } }

/* mobile sheet */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .4); opacity: 0; pointer-events: none; transition: opacity .3s; }
.sheet { position: fixed; top: 0; bottom: 0; left: 0; z-index: 61; width: 300px; max-width: 85vw; background: #fff; border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform .4s var(--ease); display: flex; flex-direction: column; }
.sheet-open .sheet-bg { opacity: 1; pointer-events: auto; }
.sheet-open .sheet { transform: none; }
.sheet .top { display: flex; justify-content: space-between; align-items: center; padding: 16px; }
.sheet .top .brand b { font-size: 1.2rem; }
.sheet .x { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1.1rem; color: var(--fg); }
.sheet nav { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.sheet nav a { padding: 10px 12px; border-radius: 6px; font-size: .95rem; }
.sheet nav a:hover, .sheet nav a.active { background: var(--soft); }
.sheet .bottom { margin-top: auto; padding: 16px; }

/* ------------------------------------------------------------ inner pages */
main.page { padding: calc(var(--head) + 40px) 16px 0; }
@media (min-width: 640px) { main.page { padding-inline: 24px; } }
@media (min-width: 1024px) { main.page { padding-inline: 32px; } }
main.page > * { animation: page-in .8s var(--ease) both; }
main.page > *:nth-child(2) { animation-delay: .08s; }
main.page > *:nth-child(3) { animation-delay: .16s; }
main.page > *:nth-child(n+4) { animation-delay: .24s; }
@keyframes page-in { from { opacity: 0; transform: translateY(20px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
main.page section { margin: 0 0 72px; }
main.page h1, main.page h2, main.page h3, main.page h4 { margin: 0 0 .5em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 16px; }
.eyebrow::before { content: ''; width: 6px; height: 6px; background: var(--fg); border-radius: 1px; }
.page-head { margin-bottom: 40px; max-width: 760px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -.035em; margin-bottom: 12px; }
.page-head p { color: var(--muted); font-size: 1.08rem; }
.page-head.center { margin-inline: auto; text-align: center; }
main.page h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); letter-spacing: -.03em; margin-bottom: 16px; }
main.page h3 { font-size: 1.1rem; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: border-color .3s, box-shadow .4s var(--ease), transform .4s var(--ease); }
.grid > .card:hover { border-color: #d4d4d8; transform: translateY(-3px); box-shadow: 0 20px 40px -24px rgba(10, 10, 10, .2); }
.card.dark { background: var(--fg); color: #fff; border-color: var(--fg); }
.card.dark .muted { color: var(--muted2); }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }


/* numbered list (guide) */
.steplist { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.steplist li { counter-increment: step; position: relative; padding: 20px 0 20px 64px; border-bottom: 1px solid var(--line); color: var(--muted); }
.steplist li b { color: var(--fg); font-weight: 600; }
.steplist li a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.steplist li::before { content: '0' counter(step); position: absolute; left: 0; top: 20px; font-family: 'Orbitron', sans-serif; font-weight: 600; font-size: .9rem; color: var(--muted2); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--soft2); font-weight: 500; font-size: .9rem; color: var(--muted); white-space: nowrap; }
td { color: #3f3f46; }
td b { color: var(--fg); font-weight: 600; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: var(--soft2); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* guide */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 48px; }
.toc a { border: 1px solid var(--line); padding: 7px 16px; border-radius: 999px; font-size: .92rem; font-weight: 500; transition: background .2s, color .2s, border-color .2s; }
.toc a:hover { background: var(--fg); color: #fff; border-color: var(--fg); }
.guide section { scroll-margin-top: calc(var(--head) + 16px); }
.cmd { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 6px 18px; padding: 16px 20px; border-bottom: 1px solid var(--line); transition: background .2s; }
.cmd:hover { background: var(--soft2); }
.cmd:last-child { border-bottom: 0; }
.cmd .name code { font-size: .98rem; background: var(--fg); color: #fff; border-color: var(--fg); }
.cmd .ex { color: var(--muted); font-size: .9rem; margin-top: 4px; }
@media (max-width: 600px) { .cmd { grid-template-columns: 1fr; } }
.note { border-left: 3px solid var(--fg); background: var(--soft2); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 16px 0; color: #3f3f46; }
.note b { color: var(--fg); }
.path { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.path span { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 500; font-size: .95rem; background: #fff; }
.path span:last-child { background: var(--fg); color: #fff; border-color: var(--fg); }
.path i { color: var(--muted2); font-style: normal; }

/* ------------------------------------------------------------ forms */
.form { max-width: 520px; margin: 0 auto; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 500; margin-bottom: 6px; }
.field .hint { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.field .err { font-size: .87rem; color: #dc2626; margin-top: 6px; display: none; }
.field.bad .err { display: block; }
.field.bad input, .field.bad select { border-color: #dc2626; }
input, select { width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--fg); font: inherit; transition: border-color .2s, box-shadow .2s; }
input[type=checkbox], input[type=radio] { width: auto; height: auto; accent-color: var(--fg); }
input:focus, select:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px rgba(10, 10, 10, .08); }
.radio-row { display: flex; gap: 10px; }
.radio-row label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; margin: 0; transition: border-color .2s, background .2s; }
.radio-row label:has(input:checked) { border-color: var(--fg); background: var(--soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; display: none; font-size: .95rem; }
.alert.show { display: block; animation: page-in .4s var(--ease) both; }
.alert.error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.success { text-align: center; }
.success .big { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--fg); color: #fff; display: grid; place-items: center; font-size: 1.8rem; animation: pop .6s var(--ease) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------------------------------------------ monsters */
.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 860px) { .filters { grid-template-columns: 1fr 1fr; } .filters .q { grid-column: 1 / -1; } }
.filter-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 20px; color: var(--muted); font-size: .95rem; }
.filter-row label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.filter-row input[type=number] { height: 36px; }
.filter-row .count { margin-left: auto; color: var(--fg); font-weight: 500; }
.mob-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mob { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; color: var(--fg); font: inherit; display: block; width: 100%; animation: page-in .5s var(--ease) both; transition: border-color .25s, transform .35s var(--ease), box-shadow .35s var(--ease); }
.mob:hover { border-color: var(--fg); transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgba(10, 10, 10, .3); }
.mob .t { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.mob .nm { font-weight: 600; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mob .lv { font-family: 'Orbitron', sans-serif; font-size: .8rem; font-weight: 600; white-space: nowrap; color: var(--muted); }
.mob .meta { color: var(--muted); font-size: .85rem; margin-top: 3px; }
.tag { display: inline-block; font-size: .72rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); margin-right: 4px; vertical-align: middle; font-weight: 600; color: var(--muted); }
.tag.mvp { color: #fff; background: var(--fg); border-color: var(--fg); }
.tag.boss { color: var(--fg); border-color: var(--fg); }
.tag.ag { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.more { text-align: center; margin-top: 24px; }
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(10, 10, 10, .35); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal.open { display: flex; }
.modal .box { background: #fff; border: 1px solid var(--line); border-radius: 20px; width: 100%; max-width: 860px; padding: 28px; position: relative; box-shadow: 0 40px 80px -30px rgba(10, 10, 10, .4); animation: page-in .45s var(--ease) both; }
.modal .close { position: absolute; top: 14px; right: 14px; background: #fff; border: 1px solid var(--line); color: var(--fg); border-radius: 999px; width: 38px; height: 38px; font-size: 1rem; cursor: pointer; transition: background .2s, color .2s; }
.modal .close:hover { background: var(--fg); color: #fff; }
.modal h2 { padding-right: 48px; margin-bottom: 6px !important; }
.modal h3 { margin-top: 24px !important; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; margin: 20px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kv div { padding: 10px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.kv b { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.kv span { font-variant-numeric: tabular-nums; font-weight: 600; }
.drops td:first-child { width: 100%; }
.rate { color: var(--fg); font-weight: 700; font-variant-numeric: tabular-nums; }
.rate.lo { color: #52525b; font-weight: 600; }
.rate.vlo { color: var(--muted2); font-weight: 500; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; grid-column: 1 / -1; }

/* 404 */
.notfound { text-align: center; padding: 60px 0; }
.notfound h1 { font-family: 'Orbitron', sans-serif; font-size: clamp(5rem, 18vw, 10rem); font-weight: 900; color: var(--fg); opacity: .12; letter-spacing: 0; margin: 0; line-height: 1; }
.notfound p { color: var(--muted); font-size: 1.15rem; margin: 8px 0 28px; }
.notfound .actions { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* ------------------------------------------------------------ footer */
footer { border-top: 1px solid var(--line); margin-top: 112px; padding: 40px 0 48px; font-size: .9rem; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer nav a:hover { color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
