/* RO Database — styled to sit alongside the OpleRO main site:
   pastel pink/lavender ground, white translucent panels, pink gradient pills, dark plum footer.
   Single light theme by choice (the main site is light-only). Kanit headings · Noto Sans Thai body. */
:root {
  color-scheme: light;
  --bg: #fffafc;
  --panel: rgba(255, 255, 255, .88);
  --panel-solid: #ffffff;
  --soft: #fbf0f6;          /* pink tint (tabs, chips) */
  --soft-2: #f7f4fa;        /* lavender zebra */
  --ink: #514967;
  --ink-2: #625a71;
  --muted: #9a91a2;
  --line: #f0e7ee;
  --line-2: #f5c9df;
  --pink: #ec609c;
  --pink-deep: #c25791;
  --pink-grad: linear-gradient(#f78eb7, #e75a95);
  --pink-soft-grad: linear-gradient(135deg, #fff3f9, #f9ddeb);
  --blue-grad: linear-gradient(#6cdafa, #369eea);
  --blue-soft-grad: linear-gradient(135deg, #edf9ff, #dcedfc);
  --purple: #7970a4;
  --lav: #8772b2;
  --gold: #ac7719;
  --gold-soft: #fff4d6;
  --boss: #8a5cc0;
  --boss-soft: #f2eafb;
  --card: #2f9c6b;
  --card-soft: #e5f6ee;
  --shadow: 0 4px 18px rgba(183, 139, 173, .08);
  --shadow-pill: 0 3px 9px rgba(231, 112, 163, .2);
  --face-grad: linear-gradient(150deg, #f6eafa, #e6f3ff 55%, #fff5f5);
  --face-mvp: linear-gradient(150deg, #fff3d4, #ffe9f2 60%, #fff7e6);
  --face-boss: linear-gradient(150deg, #efe6fb, #f6eafa 55%, #e9f0ff);
  --plum: #2a1a3d;

  --el-neutral: #b3abba; --el-water: #63aee8; --el-earth: #c09156; --el-fire: #f0697a; --el-wind: #5cc6ad;
  --el-poison: #a36bc7; --el-holy: #e8bb45; --el-dark: #6c6585; --el-ghost: #a7a0e0; --el-undead: #869c72;

  --f-head: "Kanit", "Noto Sans Thai", Tahoma, sans-serif;
  --f-body: "Noto Sans Thai", Tahoma, sans-serif;
  --r: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 15px/1.6 var(--f-body);
  background:
    radial-gradient(1200px 500px at 85% -120px, rgba(236, 96, 156, .10), transparent 70%),
    radial-gradient(900px 420px at 0% 0%, rgba(121, 112, 164, .10), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--pink-deep); text-decoration: none; }
a:hover { filter: brightness(1.06); }
img { max-width: 100%; }
code { font: 12px ui-monospace, Consolas, monospace; color: var(--muted); }
[hidden] { display: none !important; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #9569c8; outline-offset: 3px; border-radius: 6px; }
.num, .stats dd, .counts dd, .tbl .r, .dr { font-variant-numeric: tabular-nums; }

.wrap {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- header (translucent like the main site) ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(255, 249, 252, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(94, 65, 111, .06);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: #fff9fc; }
.top-in {
  max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 26px; min-height: 74px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.brand { display: grid; justify-items: center; line-height: 1; }
.brand:hover { filter: none; }
.brand img { max-height: 52px; width: auto; }
.brand b, .foot-brand b {
  font: italic 700 32px/1 Georgia, "Times New Roman", serif; letter-spacing: -1.5px; color: #db74a5;
  text-shadow: 1px 2px 0 #fff, 2px 3px 0 #76638d; white-space: nowrap;
}
.brand b span, .foot-brand b span { color: #8177b8; }
.brand small, .foot-brand small { font: 8px Tahoma, sans-serif; letter-spacing: 2px; color: #675378; margin-top: 4px; }
.nav-links { display: flex; gap: 24px; align-items: center; flex: 1; justify-content: center; }
.nav-links a { font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 8px 0; white-space: nowrap; position: relative; display: inline-flex; gap: 6px; align-items: center; }
.nav-links a i { font-style: normal; font-size: 12px; opacity: .8; }
.nav-links a.active { color: var(--pink); }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--pink-grad); }
.rates { display: flex; gap: 6px; }
.rates span { font-size: 12px; font-weight: 600; color: #fff; background: var(--pink-grad); border-radius: 24px; padding: 6px 13px; box-shadow: var(--shadow-pill); white-space: nowrap; }
.rates span + span { background: var(--blue-grad); box-shadow: 0 3px 9px rgba(54, 158, 234, .2); }
.rates b { font-weight: 700; }

/* ---------- panels ---------- */
.finder, .mob, .tbl-wrap.item-tbl, .empty {
  background: var(--panel); border: 1px solid #f4edf2; border-radius: var(--r); box-shadow: var(--shadow);
}
.finder { margin: 26px 0 16px; }
.finder-hd { display: flex; justify-content: space-between; align-items: center; gap: 14px 28px; flex-wrap: wrap; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
h1 { margin: 0; font: 600 24px/1.25 var(--f-head); color: #62456d; text-wrap: balance; display: flex; align-items: center; gap: 10px; }
.h-ic { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--pink-grad); color: #fff; font-size: 15px; box-shadow: var(--shadow-pill); }
.sub { margin: 4px 0 0 44px; color: var(--muted); font-size: 13.5px; }
.counts { display: flex; gap: 8px; margin: 0; flex-wrap: wrap; }
.counts div { display: grid; text-align: center; padding: 8px 16px; border-radius: 12px; background: var(--soft-2); min-width: 92px; }
.counts div:first-child { background: var(--soft); }
.counts dt { font-size: 11.5px; color: var(--muted); }
.counts dd { margin: 0; font: 600 20px/1.3 var(--f-head); color: #62456d; }

/* ---------- filters ---------- */
.filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; padding: 18px 22px 22px; }
.f { display: grid; gap: 6px; min-width: 0; align-content: start; margin: 0; padding: 0; border: 0; }
.f > span, .f > legend { font-size: 12.5px; font-weight: 700; color: var(--ink-2); padding: 0; }
.f-wide { grid-column: span 2; }
.f-seg { grid-column: span 2; }
.f-check { display: flex; align-items: center; gap: 8px; grid-column: span 2; align-self: end; padding-bottom: 9px; }
.f-check span { font-weight: 500; color: var(--ink); font-size: 14px; }
input, select {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--panel-solid); border: 1px solid #efdde8;
  border-radius: 20px; height: 40px; padding: 0 14px; width: 100%; min-width: 0;
}
select { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23c25791' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
input::placeholder { color: #b9afc0; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--pink); }
input:focus, select:focus { outline: none; border-color: #f2a3c6; box-shadow: 0 0 0 4px rgba(236, 96, 156, .12); }
.range { display: flex; align-items: center; gap: 6px; }
.range i { color: var(--muted); font-style: normal; }
.range input { padding: 0 8px; text-align: center; }

.seg { display: flex; background: var(--soft); border-radius: 22px; padding: 3px; gap: 2px; }
.seg label { flex: 1; min-width: 0; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg span { display: block; text-align: center; border-radius: 20px; padding: 7px 6px; font-size: 13px; font-weight: 600; color: #8e7696; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.seg span:hover { color: var(--pink-deep); }
.seg input:checked + span { background: var(--pink-grad); color: #fff; box-shadow: var(--shadow-pill); }
.seg input:focus-visible + span { outline: 3px solid #9569c8; outline-offset: 1px; }

.f-actions { display: flex; gap: 8px; align-items: end; grid-column: span 2; }
.btn {
  font: 600 15px var(--f-body); height: 40px; padding: 0 26px; border-radius: 24px; border: 0; cursor: pointer;
  background: var(--pink-grad); color: #fff; box-shadow: var(--shadow-pill); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn::after { content: "›"; font-size: 17px; line-height: 1; }
.btn.ghost { background: var(--pink-soft-grad); color: #aa477b; border: 1px solid var(--line-2); box-shadow: 0 2px 5px rgba(199, 133, 165, .1), inset 0 1px 0 #fff; }
.btn.ghost::after { content: none; }

.result-bar { display: flex; justify-content: space-between; align-items: center; margin: 4px 4px 12px; color: var(--muted); font-size: 14px; }
.result-bar p { margin: 0; }
.result-bar b { color: var(--pink-deep); font-weight: 700; }
.empty { padding: 34px; text-align: center; color: var(--muted); }

/* ---------- monster card ---------- */
.mob-list { display: grid; gap: 14px; }
.mob { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 320px); overflow: hidden; scroll-margin-top: 90px; }
.mob.t-mvp { border-color: #f6dfa6; box-shadow: 0 4px 18px rgba(214, 160, 60, .12); }
.mob.t-boss { border-color: #e2d3f4; }
.mob-face { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 8px 16px; background: var(--face-grad); border-right: 1px solid var(--line); }
.t-mvp .mob-face { background: var(--face-mvp); }
.t-boss .mob-face { background: var(--face-boss); }
.sprite { width: 96px; height: 96px; display: grid; place-items: center; }
.sprite img { max-width: 96px; max-height: 96px; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(98, 69, 109, .18)); }
.sprite-fb {
  width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; font: 600 20px var(--f-head); color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 55%), var(--elc, var(--el-neutral));
  border: 3px solid #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--elc, var(--el-neutral)) 40%, transparent);
  text-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.mob-id { order: -1; font-size: 12px; font-weight: 600; color: var(--muted); }
.mob-lv { font: 600 13px var(--f-head); color: #62456d; padding: 2px 12px; border-radius: 99px; background: #fff; box-shadow: 0 2px 6px rgba(183, 139, 173, .15); }

.mob-main { padding: 15px 20px 16px; min-width: 0; display: grid; gap: 9px; align-content: start; }
.mob-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mob-hd h2 { margin: 0; font: 600 20px/1.25 var(--f-head); color: #62456d; }
.badge { font: 700 11px/1 var(--f-body); font-style: normal; letter-spacing: .04em; padding: 5px 9px; border-radius: 6px; color: #fff; }
.b-mvp { background: linear-gradient(#ffcf6b, #e8a23a); text-shadow: 0 1px 1px rgba(150, 90, 0, .35); }
.b-boss { background: linear-gradient(#b99be6, #8a5cc0); }
.aegis { font-size: 11.5px; letter-spacing: .06em; color: #b0a6b8; margin-top: -7px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12.5px; font-weight: 600; padding: 3px 11px; border-radius: 99px; background: var(--soft-2); color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.tag i { width: 9px; height: 9px; border-radius: 50%; background: var(--elc); box-shadow: 0 0 0 2px #fff; }
.tag.el { background: color-mix(in srgb, var(--elc) 14%, #fff); }

[data-el="Neutral"] { --elc: var(--el-neutral); } [data-el="Water"] { --elc: var(--el-water); } [data-el="Earth"] { --elc: var(--el-earth); }
[data-el="Fire"] { --elc: var(--el-fire); } [data-el="Wind"] { --elc: var(--el-wind); } [data-el="Poison"] { --elc: var(--el-poison); }
[data-el="Holy"] { --elc: var(--el-holy); } [data-el="Dark"] { --elc: var(--el-dark); } [data-el="Ghost"] { --elc: var(--el-ghost); }
[data-el="Undead"] { --elc: var(--el-undead); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); margin: 0; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stats div { padding: 6px 11px; min-width: 0; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.stats dt { font-size: 11px; color: var(--muted); font-weight: 600; }
.stats dd { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.stats .xp dd { color: #4f8fd0; }
.stats .mvp dd { color: var(--gold); }
.stats.small { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.stats.small div:nth-child(-n+6) { background: var(--soft-2); }

.where { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lbl { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-right: 2px; }
.map-chip { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 16px; background: var(--blue-soft-grad); color: #5384b0; border: 1px solid #c6e1f5; }
.map-chip small { opacity: .75; font-weight: 500; }

.mob-drops { border-left: 1px solid var(--line); padding: 13px 12px 14px; min-width: 0; background: rgba(255, 255, 255, .6); }
.dh { font: 600 14px var(--f-head); color: #62456d; padding: 0 6px 6px; display: flex; align-items: center; gap: 6px; }
.dh small { font: 600 11px var(--f-body); color: #fff; background: var(--pink-grad); border-radius: 10px; padding: 1px 7px; }
.none { color: var(--muted); font-size: 13px; margin: 4px 6px; }
.dlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.drop {
  width: 100%; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; text-align: left;
  font: inherit; font-size: 13.5px; color: var(--ink); background: none; border: 0; border-radius: 8px; padding: 4px 8px; cursor: pointer;
}
.drop:hover:not(:disabled) { background: var(--soft); }
.drop:disabled { cursor: default; opacity: .6; }
.di { width: 24px; height: 24px; display: grid; place-items: center; }
.di img { max-width: 24px; max-height: 24px; image-rendering: pixelated; }
.ipop-ic img { width: 24px; height: 24px; image-rendering: pixelated; }
.icon-fb { width: 18px; height: 18px; border-radius: 6px; background: #eadfe8; }
.icon-fb[data-t="Card"] { background: linear-gradient(#7fd6ad, var(--card)); border-radius: 3px; width: 14px; }
.icon-fb[data-t="Weapon"], .icon-fb[data-t="Armor"], .icon-fb[data-t="Shadowgear"] { background: linear-gradient(#a9cdf2, #6b9fd6); }
.icon-fb[data-t="Healing"], .icon-fb[data-t="Usable"], .icon-fb[data-t="Delayconsume"] { background: linear-gradient(#f8b3c9, #e7779d); border-radius: 50%; }
.icon-fb[data-t="Cash"] { background: linear-gradient(#ffdc8a, #e8a23a); border-radius: 50%; }
.dn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn em { font: 700 10px var(--f-body); font-style: normal; color: var(--gold); }
.dr { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.drop.card .dn { color: var(--card); font-weight: 700; }
.drop.card .dr { color: var(--card); }
.drop.mvpd { background: var(--gold-soft); }

.more { grid-column: 1 / -1; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .5); }
.more summary { cursor: pointer; padding: 9px 20px; font-size: 13px; font-weight: 600; color: var(--purple); list-style: none; display: flex; align-items: center; gap: 8px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.more[open] summary::before { transform: rotate(45deg); }
.more summary:hover { color: var(--pink); }
.more-in { padding: 4px 20px 20px; display: grid; gap: 14px; }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-solid); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl caption { text-align: left; font: 600 14px var(--f-head); color: #62456d; padding: 10px 14px 6px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; color: #8e7696; background: var(--soft); padding: 7px 14px; white-space: nowrap; }
.tbl td { padding: 7px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:nth-child(even) td { background: #fcfafd; }
.tbl .r { text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
small.muted { display: block; font-size: 12px; }

/* items page */
.tbl.items td { padding: 6px 14px; }
.tbl.items tbody tr:hover td { background: var(--soft); }
.item-btn { grid-template-columns: 26px minmax(0, 1fr); padding: 4px 0; min-width: 220px; }
.item-btn:hover:not(:disabled) { background: none; }
.item-btn .dn { white-space: normal; font-weight: 700; color: #62456d; }
.item-btn .dn small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.from { font-size: 13px; }
.from a { display: inline-block; margin: 2px 6px 2px 0; white-space: nowrap; padding: 1px 9px; border-radius: 12px; background: var(--soft); }
.from small { color: var(--muted); }

/* ---------- pager (main-site pill buttons) ---------- */
.pager { display: flex; justify-content: center; gap: 6px; margin: 24px 0 8px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0 10px; border-radius: 20px; font-size: 14px; font-weight: 700; }
.pager a { background: var(--pink-soft-grad); border: 1px solid var(--line-2); color: #aa477b; box-shadow: 0 2px 5px rgba(199, 133, 165, .1), inset 0 1px 0 #fff; }
.pager a:hover { box-shadow: 0 3px 10px rgba(189, 138, 180, .23); }
.pager .on { background: var(--pink-grad); color: #fff; box-shadow: var(--shadow-pill); }
.pager .off { color: #e6d6e0; }
.pager .gap { color: var(--muted); min-width: 20px; }

/* ---------- footer (dark plum) ---------- */
.foot { margin-top: 44px; background: linear-gradient(180deg, #4a3462, var(--plum)); color: #fff4fb; }
.foot-in { display: grid; justify-items: center; gap: 8px; text-align: center; padding-block: 30px 36px; }
.foot-brand { display: grid; justify-items: center; line-height: 1; }
.foot-brand b { font-size: 26px; text-shadow: 1px 2px 0 rgba(0,0,0,.25); }
.foot-brand small { color: #d9c6e6; }
.foot p { margin: 4px 0 0; font-size: 13px; color: #d9c6e6; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.foot-links a { color: #ffd9ec; font-size: 13px; font-weight: 600; }

/* ---------- item popup ---------- */
.ipop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.ipop-bg { position: absolute; inset: 0; background: rgba(42, 26, 61, .45); backdrop-filter: blur(3px); }
.ipop-box { position: relative; width: min(520px, 100%); max-height: min(86vh, 760px); overflow: auto; background: #fff; border: 1px solid #f4edf2; border-radius: 16px; padding: 0 20px 20px; box-shadow: 0 20px 60px rgba(42, 26, 61, .25); display: grid; gap: 14px; }
.ipop-x { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border: 0; background: rgba(255,255,255,.8); font-size: 22px; color: #aa477b; cursor: pointer; border-radius: 50%; z-index: 1; }
.ipop-x:hover { background: var(--soft); }
.ipop-hd { display: flex; gap: 12px; align-items: center; margin: 0 -20px; padding: 18px 54px 16px 20px; background: var(--face-grad); border-bottom: 1px solid var(--line); }
.ipop-ic { width: 46px; height: 46px; border-radius: 12px; background: #fff; box-shadow: 0 2px 8px rgba(183, 139, 173, .2); display: grid; place-items: center; flex: none; }
.ipop-ic .icon-fb { width: 22px; height: 22px; }
.ipop-n { font: 600 19px/1.25 var(--f-head); color: #62456d; }
.ipop-id { font-size: 12px; color: var(--muted); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.kv div { padding: 6px 12px; min-width: 0; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.kv .w { grid-column: 1 / -1; }
.kv dt { font-size: 11px; font-weight: 600; color: var(--muted); }
.kv dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.ch { font: 600 14px var(--f-head); color: #62456d; margin: 0 0 6px; }
.ipop pre { margin: 0 0 10px; padding: 10px 12px; background: #fbf7fc; border: 1px solid var(--line); border-radius: 10px; font: 12.5px/1.6 ui-monospace, Consolas, monospace; color: #5d4f6e; white-space: pre-wrap; overflow-wrap: anywhere; }
.from-list { display: flex; flex-wrap: wrap; gap: 6px; }
.from-list a { font-size: 13px; font-weight: 600; padding: 3px 11px; border-radius: 16px; background: var(--soft); }
.from-list small { opacity: .8; font-weight: 500; }


/* ---------- map banner / thumbs / skill icons ---------- */
.map-banner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; margin: 0 0 16px; padding: 16px; background: var(--panel); border: 1px solid #f4edf2; border-radius: var(--r); box-shadow: var(--shadow); }
.map-art { width: 168px; height: 168px; border-radius: 12px; overflow: hidden; background: var(--face-grad); display: grid; place-items: center; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(98, 69, 109, .15); }
.map-img.big { width: 100%; height: 100%; object-fit: contain; }
.map-body { min-width: 0; display: grid; gap: 4px; align-content: center; }
.map-body h2 { margin: 0; font: 600 22px/1.25 var(--f-head); color: #62456d; }
.map-body code { font-size: 12.5px; }
.map-kind { justify-self: start; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--blue-grad); border-radius: 10px; padding: 2px 10px; }
.map-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.map-stats div { padding: 5px 14px; border-radius: 12px; background: var(--soft-2); }
.map-stats dt { font-size: 11px; color: var(--muted); font-weight: 600; }
.map-stats dd { margin: 0; font: 600 15px var(--f-head); color: #62456d; }
.map-stats .mvp { background: var(--gold-soft); } .map-stats .mvp dd { color: var(--gold); }
.map-stats .boss { background: var(--boss-soft); } .map-stats .boss dd { color: var(--boss); }
.map-fb.big { width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle, #fff 0 30%, transparent 31%), var(--blue-grad); opacity: .55; }

.map-cell { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.map-cell span { display: grid; line-height: 1.3; }
.map-cell code { font-size: 11px; }
.map-img.thumb, .map-fb.thumb { width: 40px; height: 40px; flex: none; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: var(--face-grad); }
.map-img.thumb { object-fit: cover; }

.skill-cell { display: inline-flex; align-items: center; gap: 10px; }
.skill-cell > span { display: grid; line-height: 1.3; }
.skill-cell code { font-size: 11px; }
.skill-img { width: 24px; height: 24px; flex: none; image-rendering: pixelated; }
.skill-fb { width: 24px; height: 24px; flex: none; border-radius: 6px; background: linear-gradient(135deg, #e9dcf7, #cdb8ec); }
@media (max-width: 720px) {
  .map-banner { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 12px; }
  .map-art { width: 96px; height: 96px; }
  .map-body h2 { font-size: 18px; }
}


/* ---------- world map ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wm-tools { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding: 16px 22px 18px; }
.wm-search { flex: 1 1 320px; max-width: 560px; }
.wm-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.wm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 2px solid; }
.lg.mvp { border-color: #e8a23a; background: var(--gold-soft); }
.lg.boss { border-color: var(--boss); background: var(--boss-soft); }
.lg.town { border-color: #d9cfe0; background: #f3eff5; }
.lg.soon { border-color: #ddd5e1; border-style: dashed; background: repeating-linear-gradient(135deg, #f6f2f7 0 3px, #ebe4ee 3px 6px); }

.wm-panel { margin: 0 0 18px; padding: 18px 20px 20px; background: var(--panel); border: 1px solid #f4edf2; border-radius: var(--r); box-shadow: var(--shadow); }
.wm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.wm-head h2 { margin: 0; font: 600 18px var(--f-head); color: #62456d; display: flex; align-items: center; gap: 8px; }
.wm-head h2 span { color: var(--pink); }
.wm-head small { font: 700 11px var(--f-body); letter-spacing: .14em; color: #e6b3cd; }
.wm-empty { margin: 0; color: var(--muted); font-size: 13px; }

.wm-scroll { overflow-x: auto; border-radius: 12px; }
.wm-canvas {
  position: relative; width: 100%; min-width: 640px; border-radius: 12px;
  background:
    radial-gradient(circle at 1px 1px, rgba(194, 87, 145, .13) 1px, transparent 0) 0 0 / 18px 18px,
    linear-gradient(160deg, #fff7fb, #f4f0fb 50%, #eef6fd);
  border: 1px solid #f0e2ec;
}
.mt {
  position: absolute; display: block; padding: 2px; border-radius: 6px; background: #fff; color: var(--ink);
  border: 1.5px solid #ead9e6; box-shadow: 0 1px 3px rgba(98, 69, 109, .12);
  transition: transform .12s, box-shadow .12s, opacity .15s; overflow: hidden;
}
.mt:hover, .mt:focus-visible { transform: scale(1.12); z-index: 5; box-shadow: 0 6px 16px rgba(98, 69, 109, .28); border-color: var(--pink); filter: none; }
.mt .map-img.tile, .mt .map-fb.tile { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.mt .map-fb.tile { background: var(--face-grad); }
.mt.has-mvp { border-color: #e8a23a; box-shadow: 0 0 0 2px rgba(232, 162, 58, .25); }
.mt.has-boss { border-color: var(--boss); box-shadow: 0 0 0 2px rgba(138, 92, 192, .2); }
.mt.none { margin: 0; cursor: default; background: #f6f2f7; border-color: #e3dae6; }
.mt.none .map-img.tile { opacity: .55; filter: grayscale(.5); }
.mt.none:hover { transform: scale(1.06); border-color: #cdbfd3; }
.mt.town .map-fb.tile { background: linear-gradient(135deg, #f7e6f0, #ece6f8); }
.mt.none.town .map-img.tile { opacity: .95; filter: saturate(.85); }
.mt.town { border-color: #f2b6d2; }
.mt-l {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 2px; text-align: center;
  font-size: clamp(7px, .72vw, 10px); font-weight: 700; line-height: 1.25; color: #fff; letter-spacing: -.01em;
  background: linear-gradient(transparent, rgba(60, 35, 70, .78)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mt.town .mt-l { background: rgba(194, 87, 145, .85); top: auto; }
.mt-boss { position: absolute; right: 1px; top: 1px; width: 44%; height: 44%; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .88); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.mt-boss img { max-width: 92%; max-height: 92%; }
.mt-boss .sprite-fb { width: 80%; height: 80%; font-size: 8px; border-width: 1px; }
.mt.soon { cursor: default; background: #f6f2f7; border: 1.5px dashed #d8cede; box-shadow: none; }
.mt.soon .map-img.tile { opacity: .35; filter: grayscale(1); }
.mt.soon:hover { transform: scale(1.06); border-color: #c4b5cb; box-shadow: 0 4px 10px rgba(98, 69, 109, .15); }
.mt.soon .mt-l { background: linear-gradient(transparent, rgba(120, 105, 128, .7)); }
.mt-soon {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) rotate(-12deg);
  padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, .92); border: 1px solid #d8cede;
  font: 800 clamp(6px, .62vw, 9px)/1.3 var(--f-body); letter-spacing: .08em; color: #9a8aa2; white-space: nowrap; pointer-events: none;
}
.dun-floors .mt-soon { font-size: 9px; }
.wt-soon { padding: 8px 4px 4px; color: var(--muted); font-size: 12.5px; }
.wt-soon b { display: block; font: 700 14px var(--f-head); color: #9a8aa2; letter-spacing: .04em; margin-bottom: 2px; }
.mt.dim { opacity: .18; }
.mt.hit { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(236, 96, 156, .35); z-index: 3; }

.dun-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dun-grid > .dun { min-width: 0; }
.dun-grid > .dun.big { grid-column: 1 / -1; }
.dun { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; }
.dun.dim { opacity: .35; }
.dun-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.dun-h h3 { margin: 0; font: 600 15px var(--f-head); color: #62456d; }
.dun-h span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dun-floors { display: flex; flex-wrap: wrap; gap: 8px; }
.dun-floors .mt { position: relative; flex: 0 0 76px; width: 76px; height: 76px; }
.dun-floors .mt-l { font-size: 10px; }

.wm-tip {
  position: fixed; z-index: 60; width: 290px; pointer-events: none; opacity: 0; transform: translateY(4px);
  transition: opacity .12s, transform .12s; background: #fff; border: 1px solid #f0dce8; border-radius: 12px;
  box-shadow: 0 12px 34px rgba(42, 26, 61, .22); overflow: hidden;
}
.wm-tip.on { opacity: 1; transform: none; }
.wt-h { padding: 9px 12px; background: var(--face-grad); border-bottom: 1px solid var(--line); display: grid; }
.wt-h b { font: 600 14px var(--f-head); color: #62456d; }
.wt-h span { font-size: 11px; color: var(--muted); }
.wt-b { padding: 4px 0; }
.wt-r { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; gap: 8px; padding: 3px 12px; font-size: 12.5px; align-items: center; }
.wt-ic { width: 30px; height: 28px; display: grid; place-items: center; }
.wt-ic img { max-width: 30px; max-height: 28px; }
.wt-ic .sprite-fb { width: 22px; height: 22px; font-size: 9px; border-width: 1.5px; box-shadow: none; }
.wt-r .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-r .n small { color: var(--muted); font-size: 10.5px; margin-left: 3px; }
.wt-r .a { font-weight: 700; color: var(--pink-deep); }
.wt-r .t { color: var(--muted); font-size: 11px; white-space: nowrap; }
.wt-r.mvp { background: var(--gold-soft); } .wt-r.mvp .n { color: var(--gold); font-weight: 700; }
.wt-r.boss { background: var(--boss-soft); } .wt-r.boss .n { color: var(--boss); font-weight: 700; }
.wt-none { padding: 10px 12px; color: var(--muted); font-size: 12.5px; }
.wt-f { padding: 6px 12px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); background: #fcfafd; }
@media (max-width: 720px) {
  .wm-tools { padding: 14px; }
  .wm-panel { padding: 14px 12px; }
  .dun-grid { grid-template-columns: 1fr; }
  .dun-floors .mt { flex-basis: calc((100% - 24px) / 4); width: auto; height: auto; aspect-ratio: 1; }
}


/* ---------- items ---------- */
.f-cats { grid-column: 1 / -1; }
.seg-wrap { flex-wrap: wrap; border-radius: 18px; }
.seg-wrap label { flex: 1 1 auto; }
.seg-wrap span small { font-size: 11px; font-weight: 600; opacity: .7; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 12px; }
.icard {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px;
  background: var(--panel); border: 1px solid #f4edf2; border-radius: var(--r); box-shadow: var(--shadow); color: var(--ink);
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.icard:hover { border-color: #f2b6d2; box-shadow: 0 6px 20px rgba(183, 139, 173, .18); transform: translateY(-1px); filter: none; }
.icard-ic { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; background: var(--face-grad); border: 1px solid var(--line); }
.icard-ic img { width: 48px; height: 48px; image-rendering: pixelated; }
.icard-ic .icon-fb { width: 28px; height: 28px; }
.t-card .icard-ic { background: linear-gradient(150deg, #e9f8f0, #f3fbf6); }
.t-weapon .icard-ic, .t-armor .icard-ic { background: linear-gradient(150deg, #eaf3ff, #f6eafa); }
.icard-body { display: grid; gap: 4px; min-width: 0; }
.icard-name { font: 600 16px/1.3 var(--f-head); color: #62456d; }
.icard-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12px; color: var(--ink-2); }
.ibadge { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 8px; background: var(--soft); color: var(--pink-deep); }
.ibadge.soft { background: var(--soft-2); color: var(--purple); }
.ibadge.drop { background: var(--card-soft); color: var(--card); }
.t-card .ibadge { background: var(--card-soft); color: var(--card); }
.t-weapon .ibadge, .t-armor .ibadge { background: #e6f1fc; color: #4f7fae; }
.icard-stats { display: flex; flex-wrap: wrap; gap: 4px; }
.icard-stats span { font-size: 11.5px; color: var(--muted); padding: 1px 7px; border-radius: 6px; background: var(--soft-2); }
.icard-stats b { color: var(--ink); font-weight: 700; }
.icard-desc { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icard-desc small { color: var(--pink-deep); font-weight: 700; }
.icard-from { font-size: 12px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.icard-from i { font-style: normal; color: var(--muted); }
.icard-from span { white-space: nowrap; }
.icard-from small { color: var(--muted); }

.crumbs { margin: 22px 4px 0; font-size: 13px; color: var(--muted); }
.ihero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; margin: 12px 0 16px; padding: 20px 22px; background: var(--panel); border: 1px solid #f4edf2; border-radius: var(--r); box-shadow: var(--shadow); }
.ihero-ic { width: 96px; height: 96px; border-radius: 20px; display: grid; place-items: center; background: var(--face-grad); border: 3px solid #fff; box-shadow: 0 6px 18px rgba(98, 69, 109, .15); }
.ihero-ic img { width: 72px; height: 72px; image-rendering: pixelated; }
.ihero-ic .icon-fb { width: 40px; height: 40px; }
.ihero h1 { font-size: 26px; margin: 4px 0 2px; }
.ihero-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.ihero-id { margin: 0; color: var(--muted); font-size: 13px; }
.idetail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ipanel { margin: 0 0 16px; padding: 18px 20px 20px; background: var(--panel); border: 1px solid #f4edf2; border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.ipanel h2 { margin: 0 0 12px; font: 600 17px var(--f-head); color: #62456d; display: flex; align-items: center; gap: 8px; }
.ipanel h2 small { font: 600 11px var(--f-body); color: #fff; background: var(--pink-grad); border-radius: 10px; padding: 1px 8px; }
.ipanel h3 { margin: 16px 0 8px; font: 600 14px var(--f-head); color: #62456d; }
.kv-3 { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.jobs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.job { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 14px; background: var(--blue-soft-grad); color: #5384b0; border: 1px solid #c6e1f5; }
.job.all { background: var(--pink-soft-grad); color: #aa477b; border-color: var(--line-2); }
.job.no { background: #f6f2f7; color: var(--muted); border-color: #e3dae6; }
.abil { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.abil li { padding: 7px 12px; border-radius: 10px; background: var(--soft-2); font-size: 14px; line-height: 1.5; }
.abil li.raw { background: #fbf7fc; }
.abil li code { font-size: 12px; color: var(--ink-2); white-space: pre-wrap; }
.abil .cond { display: inline-block; margin-right: 8px; font-size: 11px; font-weight: 700; color: #fff; background: var(--blue-grad); border-radius: 8px; padding: 1px 8px; vertical-align: 1px; }
.rawscript { margin-top: 14px; }
.rawscript summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--purple); }
.rawscript pre { margin: 6px 0 10px; padding: 10px 12px; background: #fbf7fc; border: 1px solid var(--line); border-radius: 10px; font: 12.5px/1.6 ui-monospace, Consolas, monospace; color: #5d4f6e; white-space: pre-wrap; overflow-wrap: anywhere; }
.dropby .mob-cell { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.dropby .mob-cell > span:last-child { display: grid; line-height: 1.3; }
.dropby code { font-size: 11px; }
.mini-sprite { width: 44px; height: 44px; display: grid; place-items: center; flex: none; }
.mini-sprite img { max-width: 44px; max-height: 44px; }
.mini-sprite .sprite-fb { width: 34px; height: 34px; font-size: 12px; border-width: 2px; }
.dropby .rate { color: var(--pink-deep); }
.dropby .maps { display: flex; flex-wrap: wrap; gap: 4px; }
.dropby tr.t-mvp td { background: var(--gold-soft) !important; }
.mvp-tag { font-style: normal; font: 700 10px var(--f-body); color: var(--gold); }
.ipop-more { justify-self: start; }
.ipop .desc { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ipop .desc li { padding: 5px 10px; border-radius: 8px; background: var(--soft-2); font-size: 13px; }
@media (max-width: 820px) { .idetail { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .ihero { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 16px; }
  .ihero-ic { width: 72px; height: 72px; border-radius: 16px; }
  .ihero-ic img { width: 48px; height: 48px; }
  .ihero h1 { font-size: 21px; }
  .ipanel { padding: 14px; }
}

/* live search */
#results { transition: opacity .15s; }
#results.busy { opacity: .45; pointer-events: none; }
.f input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .nav-links { gap: 16px; justify-content: flex-start; }
  .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mob { grid-template-columns: 104px minmax(0, 1fr); }
  .mob-drops { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .dlist { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); column-gap: 10px; }
}
@media (max-width: 720px) {
  .top { position: sticky; }
  .top-in { flex-wrap: wrap; gap: 4px 16px; padding-block: 10px; min-height: 0; }
  .brand b { font-size: 26px; }
  .nav-links { order: 3; flex: 1 0 100%; overflow-x: auto; gap: 18px; justify-content: flex-start; }
  .rates { margin-left: auto; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; gap: 12px; }
  .finder-hd { padding: 16px 14px 14px; }
  .sub { margin-left: 0; }
  .f-wide, .f-actions, .f-check, .f-seg { grid-column: 1 / -1; }
  .mob { grid-template-columns: 1fr; }
  .mob-face { flex-direction: row; gap: 12px; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sprite { width: 56px; height: 56px; }
  .sprite img { max-width: 56px; max-height: 56px; }
  .sprite-fb { width: 48px; height: 48px; font-size: 16px; }
  .mob-lv { order: 2; } .mob-id { order: 3; margin-left: auto; }
  .mob-main { padding: 12px 14px; }
  .more summary, .more-in { padding-left: 14px; padding-right: 14px; }
  .counts div { min-width: 0; padding: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
