/* ═══════════════════════════════════════════════════════════════════════════
   Gamez Codex — the GamezAION database.
   The brand layer is the main site's (site/_build/tailwind.css): void and abyss
   grounds, gold ink, Elyos blue and Asmodian red as the two faction accents,
   Marcellus for display, Sora for reading, JetBrains Mono for numbers.
   Item grade colours are Aion's own, as on the shop's item dialog.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --void: #08070a; --abyss: #131017; --surface: #1c1723; --surface2: #241d2e; --surface3: #2d2538;
  --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .14);
  --gold: #e4983d; --goldhot: #f7bd63; --goldpale: #fbebd2; --ember: #d9743a;
  --elyos: #7fc8f0; --asmo: #d8464a; --parch: #ede6da; --muted: #948a9e; --dim: #6b6375;
  --ok: #69e15e; --bad: #f0a3a5;
  /* grades: junk, common, rare, legend, unique, epic, mythic (mythic lifted for text on a dark ground) */
  --g0: #9d9d9d; --g1: #f1ece4; --g2: #69e15e; --g3: #4ccfff; --g4: #f0b71c; --g5: #f08033; --g6: #b977f2;
  --display: "Marcellus", Georgia, serif;
  --body: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r: 14px; --r-sm: 9px; --header: 66px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--void); scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--void); color: var(--parch);
  font: 15px/1.6 var(--body); overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
::selection { background: rgba(228, 152, 61, .35); color: #fff; }
option { background: #14131b; color: #E9D8A6; }
:focus-visible { outline: 2px solid var(--goldhot); outline-offset: 3px; border-radius: 6px; }

/* ─────────────────────────── atmosphere ─────────────────────────── */
.grain::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient i { position: absolute; border-radius: 50%; filter: blur(130px); animation: floatglow 16s ease-in-out infinite; }
.ambient .a1 { top: -160px; left: 50%; width: 820px; height: 520px; margin-left: -410px; background: rgba(228, 152, 61, .10); }
.ambient .a2 { top: 40%; left: -160px; width: 440px; height: 440px; background: rgba(127, 200, 240, .08); animation-delay: -6s; }
.ambient .a3 { bottom: -60px; right: -160px; width: 460px; height: 460px; background: rgba(216, 70, 74, .08); animation-delay: -11s; }
@keyframes floatglow { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(3%, -4%) scale(1.08); } }
@keyframes shine { 0% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes pulsegold { 0%, 100% { box-shadow: 0 0 0 0 rgba(247, 189, 99, .0); } 50% { box-shadow: 0 0 22px 2px rgba(247, 189, 99, .22); } }

.ink-gold { color: #EBA94B; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .ink-gold { background: linear-gradient(180deg, #fbebd2 0%, #f7bd63 46%, #e4983d 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
}
.glass { background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015)); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 11px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--goldhot); }
.eyebrow::before { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ─────────────────────────── header ─────────────────────────── */
.hdr { position: sticky; top: 0; z-index: 50; height: var(--header); background: rgba(8, 7, 10, .72); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.hdr-in { max-width: 1320px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 18px; padding: 0 20px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { height: 34px; width: auto; }
.brand .word { font: 400 22px/1 var(--display); letter-spacing: .02em; }
.brand .word small { display: block; font: 600 9.5px/1 var(--body); letter-spacing: .32em; color: var(--muted); margin-top: 5px; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav a { position: relative; padding: 8px 11px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: #cfc6d8; transition: color .2s, background .2s; white-space: nowrap; }
.nav a:hover { color: var(--goldhot); background: rgba(255, 255, 255, .04); }
.nav a.on { color: var(--goldhot); }
.nav a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.nav a.ex { color: var(--goldhot); }
.hdr-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.searchbtn { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px 0 12px; min-width: 230px; border-radius: 11px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .035); color: var(--muted); cursor: pointer; transition: border-color .2s, background .2s; }
.searchbtn:hover { border-color: rgba(247, 189, 99, .45); background: rgba(228, 152, 61, .06); color: var(--parch); }
.searchbtn svg { width: 16px; height: 16px; flex-shrink: 0; }
.searchbtn span { flex: 1; text-align: left; font-size: 13px; }
kbd { font: 500 11px/1 var(--mono); padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .05); color: var(--muted); }
.home-link { font-size: 12.5px; color: var(--muted); padding: 8px 10px; border-radius: 10px; white-space: nowrap; }
.home-link:hover { color: var(--goldhot); }
.burger { display: none; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); cursor: pointer; align-items: center; justify-content: center; }
.burger svg { width: 18px; height: 18px; }

/* ─────────────────────────── layout ─────────────────────────── */
main { position: relative; z-index: 2; min-height: calc(100vh - var(--header) - 120px); }
.wrap { max-width: 1320px; margin: 0 auto; padding: 28px 20px 70px; }
.page-enter { animation: rise .45s cubic-bezier(.2, .7, .3, 1); }
.title { font: 400 clamp(30px, 4vw, 44px)/1.08 var(--display); margin: 10px 0 6px; text-wrap: balance; }
.subtitle { color: var(--muted); max-width: 70ch; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--dim); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--goldhot); }
.crumbs i { font-style: normal; opacity: .5; }
.panel { border-radius: var(--r); padding: 18px 20px; }
.section { margin-top: 26px; }
.section > h2, .h2 { font: 400 22px/1.2 var(--display); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.h2 .count { font: 500 12px/1 var(--mono); color: var(--muted); padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line2); }
.grid2 { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 26px; align-items: start; }
.grid2.side { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); }
.grid2.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
footer { position: relative; z-index: 2; border-top: 1px solid var(--line); padding: 26px 20px 40px; color: var(--dim); font-size: 12.5px; }
footer .in { max-width: 1320px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: space-between; }
footer a { color: var(--muted); }
footer a:hover { color: var(--goldhot); }

/* ─────────────────────────── controls ─────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); color: var(--parch); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: border-color .2s, background .2s, color .2s, transform .2s; white-space: nowrap; }
.btn:hover { border-color: rgba(247, 189, 99, .5); color: var(--goldhot); background: rgba(228, 152, 61, .08); }
.btn:active { transform: translateY(1px); }
.btn.gold { position: relative; overflow: hidden; border-color: transparent; color: #1a1206; font-weight: 600; background: linear-gradient(180deg, #f7bd63, #e4983d); box-shadow: 0 10px 26px -12px rgba(228, 152, 61, .7); }
.btn.gold:hover { color: #1a1206; background: linear-gradient(180deg, #fbcb7c, #eba24a); }
.btn.gold::after { content: ""; position: absolute; top: 0; bottom: 0; width: 45%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); transform: translateX(-160%); }
.btn.gold:hover::after { animation: shine .9s ease; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn svg { width: 15px; height: 15px; }
.input { height: 38px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .035); color: var(--parch); outline: none; min-width: 0; transition: border-color .2s, background .2s; }
.input:focus { border-color: rgba(247, 189, 99, .55); background: rgba(228, 152, 61, .05); }
.input.num { width: 72px; text-align: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .03); font-size: 12.5px; cursor: pointer; user-select: none; transition: border-color .2s, background .2s, color .2s; white-space: nowrap; color: #d6cede; }
.chip:hover { border-color: rgba(247, 189, 99, .4); }
.chip.on { border-color: rgba(247, 189, 99, .65); background: rgba(228, 152, 61, .12); color: var(--goldhot); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip img { width: 18px; height: 18px; object-fit: contain; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 11px; overflow: hidden; }
.seg button { height: 34px; padding: 0 12px; background: transparent; border: 0; cursor: pointer; font-size: 12.5px; color: #cfc6d8; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: rgba(228, 152, 61, .14); color: var(--goldhot); }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font: 600 10.5px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line2); color: var(--muted); white-space: nowrap; }
.badge.ex { color: #1a1206; border-color: transparent; background: linear-gradient(180deg, #f7bd63, #e4983d); }
.badge.ely { color: var(--elyos); border-color: rgba(127, 200, 240, .4); background: rgba(127, 200, 240, .08); }
.badge.asmo { color: #f08487; border-color: rgba(216, 70, 74, .45); background: rgba(216, 70, 74, .1); }
.badge.ok { color: var(--ok); border-color: rgba(105, 225, 94, .35); background: rgba(105, 225, 94, .07); }
.badge.warn { color: var(--goldhot); border-color: rgba(247, 189, 99, .4); background: rgba(228, 152, 61, .08); }
.badge.rank { color: #d9c7f5; border-color: rgba(185, 119, 242, .4); background: rgba(185, 119, 242, .08); }

/* ─────────────────────────── grade colours and icons ─────────────────────────── */
.q0 { color: var(--g0); } .q1 { color: var(--g1); } .q2 { color: var(--g2); } .q3 { color: var(--g3); } .q4 { color: var(--g4); } .q5 { color: var(--g5); } .q6 { color: var(--g6); }
.ico { position: relative; flex-shrink: 0; width: 40px; height: 40px; border-radius: 8px; overflow: hidden; background: #0d0b11; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.ico img { width: 100%; height: 100%; object-fit: cover; }
.ico.sm { width: 28px; height: 28px; border-radius: 6px; }
.ico.lg { width: 64px; height: 64px; border-radius: 12px; }
.ico.xl { width: 84px; height: 84px; border-radius: 14px; }
.ico.g2 { box-shadow: inset 0 0 0 1px rgba(105, 225, 94, .55); }
.ico.g3 { box-shadow: inset 0 0 0 1px rgba(76, 207, 255, .6); }
.ico.g4 { box-shadow: inset 0 0 0 1px rgba(240, 183, 28, .65); }
.ico.g5 { box-shadow: inset 0 0 0 1px rgba(240, 128, 51, .7); }
.ico.g6 { box-shadow: inset 0 0 0 1px rgba(185, 119, 242, .75), 0 0 14px -4px rgba(185, 119, 242, .7); }
.ico .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); font: 600 11px/1 var(--mono); }
.ico.npc { display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #2b2234, #120f17); }
.ico.npc svg { width: 58%; height: 58%; opacity: .8; }
/* the game's npc emblems: a little inside the box, so the rating frame still shows around them */
.ico.npc img { width: 86%; height: 86%; object-fit: contain; }
/* the game's quest-type markers are 23 px sprites: shown at their own size, doubled in the big header box */
.ico.qmark img { width: 23px; height: 23px; object-fit: contain; }
.ico.xl.qmark img { width: 46px; height: 46px; }
.qlegend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.qlegend span { display: inline-flex; align-items: center; gap: 6px; }
.qlegend img { width: 18px; height: 18px; }
/* NPC rating as the frame colour: elite blue, heroic gold, legendary violet */
.ico.npc.r-ELITE { color: var(--g3); box-shadow: inset 0 0 0 1px rgba(76, 207, 255, .5); }
.ico.npc.r-HERO { color: var(--g4); box-shadow: inset 0 0 0 1px rgba(240, 183, 28, .55); }
.ico.npc.r-LEGENDARY { color: var(--g6); box-shadow: inset 0 0 0 1px rgba(185, 119, 242, .7), 0 0 14px -4px rgba(185, 119, 242, .7); }

/* ─────────────────────────── item / thing links ─────────────────────────── */
.ilink { display: inline-flex; align-items: center; gap: 9px; min-width: 0; max-width: 100%; vertical-align: middle; }
.ilink .ico { width: 30px; height: 30px; border-radius: 6px; }
.ilink .nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ilink:hover .nm { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ilink .qty { font: 500 12px/1 var(--mono); color: var(--muted); }
.thing { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; border: 1px solid transparent; transition: background .2s, border-color .2s; min-width: 0; }
.thing:hover { background: rgba(255, 255, 255, .035); border-color: var(--line); }
.thing .meta { min-width: 0; }
.thing .meta b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thing .meta small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 4px 10px; }

/* ─────────────────────────── the item card (in-game tooltip) ─────────────────────────── */
.tt { position: relative; width: 100%; border-radius: 12px; padding: 16px 18px 15px; background: linear-gradient(180deg, rgba(31, 25, 38, .97), rgba(15, 12, 19, .97)); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .05); font-size: 13.5px; line-height: 1.55; }
.tt::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: linear-gradient(140deg, var(--gc, rgba(255, 255, 255, .18)), transparent 40%, transparent 70%, var(--gc, rgba(255, 255, 255, .1))); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.tt.g2 { --gc: rgba(105, 225, 94, .55); } .tt.g3 { --gc: rgba(76, 207, 255, .6); } .tt.g4 { --gc: rgba(240, 183, 28, .7); } .tt.g5 { --gc: rgba(240, 128, 51, .75); } .tt.g6 { --gc: rgba(185, 119, 242, .85); }
.tt.g6 { animation: pulsegold 5s ease-in-out infinite; }
.tt-head { display: flex; gap: 13px; align-items: flex-start; }
.tt-name { font: 600 16px/1.3 var(--body); text-wrap: balance; }
.tt-type { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tt-id { font: 500 11px/1 var(--mono); color: var(--dim); margin-top: 6px; }
.tt hr { border: 0; height: 1px; margin: 11px 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent); }
.tt .ln { display: block; }
.tt .good { color: var(--ok); }
.tt .good::before { content: "\2714  "; }
.tt .bad { color: var(--bad); }
.tt .bad::before { content: "\2718  "; }
.tt .gold { color: var(--goldhot); }
.stat { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.stat span:first-child { color: #c8bfd2; }
.stat span:last-child { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--parch); }
.stat.bonus span:last-child { color: var(--ok); }
.tt .desc { color: #e6cf9f; white-space: pre-line; }
.tt .setname { color: var(--g2); font-weight: 600; }
.tt .setpart { color: var(--dim); }
.tt .setpart.have { color: #cfe8c9; }
.tt-foot { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; margin-top: 2px; }
.kinah { display: inline-flex; align-items: center; gap: 4px; }
.kinah::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff4cf, #e4983d 60%, #8a5a1c); box-shadow: 0 0 6px rgba(247, 189, 99, .6); }

/* floating hover tooltip */
#hover { position: fixed; z-index: 90; width: 340px; pointer-events: none; opacity: 0; transform: translateY(6px); transition: opacity .12s, transform .12s; }
#hover.show { opacity: 1; transform: none; }
#hover .tt { font-size: 13px; }

/* ─────────────────────────── home ─────────────────────────── */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; background: url("https://gamezaion.com/templates/gamez/img/homepage-hero.jpg") center/cover no-repeat; opacity: .22; filter: saturate(.8); }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, rgba(8, 7, 10, .2), rgba(8, 7, 10, .92) 70%), linear-gradient(180deg, rgba(8, 7, 10, .3), var(--void)); }
#motes { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-in { position: relative; max-width: 1100px; margin: 0 auto; padding: 86px 20px 70px; text-align: center; }
.hero h1 { font: 400 clamp(46px, 8vw, 96px)/.95 var(--display); margin: 18px 0 14px; letter-spacing: .01em; }
.hero p.lede { color: #cfc6d8; font-size: clamp(15px, 1.6vw, 18px); max-width: 640px; margin: 0 auto; }
.bigsearch { position: relative; max-width: 720px; margin: 34px auto 0; }
.bigsearch .field { display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 20px; border-radius: 18px; border: 1px solid rgba(247, 189, 99, .35); background: rgba(16, 13, 20, .78); backdrop-filter: blur(14px); box-shadow: 0 30px 80px -40px rgba(228, 152, 61, .55), inset 0 1px 0 rgba(255, 255, 255, .05); transition: border-color .2s, box-shadow .2s; }
.bigsearch .field:focus-within { border-color: rgba(247, 189, 99, .8); box-shadow: 0 30px 90px -36px rgba(228, 152, 61, .8), 0 0 0 4px rgba(228, 152, 61, .12); }
.bigsearch svg { width: 22px; height: 22px; color: var(--goldhot); flex-shrink: 0; }
.bigsearch input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 17px; color: var(--parch); }
.bigsearch input::placeholder { color: var(--dim); }
.hints { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; font-size: 12.5px; color: var(--dim); }
.hints a { color: var(--muted); border-bottom: 1px dashed rgba(255, 255, 255, .2); }
.hints a:hover { color: var(--goldhot); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 48px; }
.stat-tile { padding: 14px 12px; border-radius: var(--r); text-align: center; }
.stat-tile b { display: block; font: 400 30px/1 var(--display); }
.stat-tile span { display: block; margin-top: 6px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cattiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 196px), 1fr)); gap: 12px; }
.cattile { position: relative; overflow: hidden; display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-radius: var(--r); transition: transform .35s cubic-bezier(.2, .7, .3, 1), border-color .35s, box-shadow .35s; }
.cattile:hover { transform: translateY(-4px); border-color: rgba(228, 152, 61, .35); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(228, 152, 61, .12); }
.cattile .ico { transition: transform .3s; }
.cattile:hover .ico { transform: scale(1.1) rotate(-3deg); }
.cattile b { display: block; font: 400 17px/1.2 var(--display); }
.cattile small { color: var(--muted); font-size: 12px; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; }
.strip > * { scroll-snap-align: start; }
.strip::-webkit-scrollbar { height: 8px; }
.strip::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 8px; }
.excard { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r); transition: transform .3s, border-color .3s; }
.excard:hover { transform: translateY(-3px); border-color: rgba(247, 189, 99, .4); }
.classrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.classrow.k12 { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.classcard { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: var(--r); text-align: center; font-size: 13px; transition: transform .3s, border-color .3s, background .3s; }
.classcard img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6)); transition: transform .3s; }
.classcard:hover { transform: translateY(-4px); border-color: rgba(247, 189, 99, .4); background: rgba(228, 152, 61, .06); }
.classcard:hover img { transform: scale(1.12); }
@media (min-width: 1100px) {
  .classrow.k11 { grid-template-columns: repeat(11, minmax(0, 1fr)); }
  .classrow.k12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
}
.dice { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 26px 34px; align-items: start; }
.dice > div:last-child { padding-top: 26px; }
.rolls { margin-top: 30px; }
.rolls .list2 { margin-top: 10px; }
.btn.rolling svg { animation: spin .5s linear infinite; }
.flip { perspective: 1200px; }
.flip .tt { transition: transform .6s cubic-bezier(.2, .7, .3, 1), opacity .3s; }
.flip.rolling .tt { transform: rotateY(90deg) scale(.96); opacity: .3; }

/* ─────────────────────────── browser (items, npcs, ...) ─────────────────────────── */
.browse { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
.tree { position: sticky; top: calc(var(--header) + 16px); max-height: calc(100vh - var(--header) - 32px); overflow: auto; padding: 10px; border-radius: var(--r); }
.tree a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 9px; font-size: 13.5px; color: #cfc6d8; }
.tree a:hover { background: rgba(255, 255, 255, .04); color: var(--parch); }
.tree a.on { background: rgba(228, 152, 61, .13); color: var(--goldhot); }
.tree a small { font: 500 11px/1 var(--mono); color: var(--dim); }
.tree a.on small { color: rgba(247, 189, 99, .7); }
.tree .top { font-weight: 600; margin-top: 4px; }
.tree .sub { padding-left: 22px; font-size: 13px; }
.tree::-webkit-scrollbar { width: 6px; }
.tree::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r); }
.filters .grp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filters .lbl { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-right: 2px; }
.filters .grow { flex: 1; min-width: 200px; }
.fmore { display: contents; }
.ftoggle { display: none; }
.ftoggle .n { font: 500 11px/1 var(--mono); color: var(--goldhot); }
.resbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin: 14px 2px 8px; font-size: 13px; color: var(--muted); }
.vlist { position: relative; border-radius: var(--r); border: 1px solid var(--line); background: rgba(16, 13, 21, .55); overflow: hidden; }
.vhead, .vrow { grid-template-columns: var(--cols); }
.vhead { display: grid; align-items: center; gap: 12px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); background: rgba(255, 255, 255, .02); }
.vhead button { background: none; border: 0; padding: 0; cursor: pointer; letter-spacing: inherit; text-transform: inherit; color: inherit; font-size: inherit; text-align: left; }
.vhead button:hover, .vhead button.on { color: var(--goldhot); }
.vbody { position: relative; overflow: auto; height: min(68vh, 760px); }
.vbody::-webkit-scrollbar { width: 10px; }
.vbody::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .09); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
.vrow { position: absolute; left: 0; right: 0; display: grid; align-items: center; gap: 12px; height: 50px; padding: 0 14px; border-bottom: 1px solid rgba(255, 255, 255, .04); cursor: pointer; transition: background .15s; }
.vrow:hover { background: rgba(228, 152, 61, .06); }
.vrow .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.vrow .sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vrow .cell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: #cfc6d8; }
.vrow .race-ely { color: var(--elyos); } .vrow .race-asmo { color: #f08487; }
.icongrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; padding: 12px; }
.icongrid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 11px; text-align: center; font-size: 11px; line-height: 1.25; color: #cfc6d8; transition: background .2s; }
.icongrid a:hover { background: rgba(255, 255, 255, .05); }
.icongrid a span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; font: 400 22px/1.3 var(--display); color: var(--parch); margin-bottom: 6px; }

/* ─────────────────────────── detail pages ─────────────────────────── */
.dhead { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.dhead .ico.xl { box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.dhead h1 { font: 400 clamp(28px, 3.6vw, 40px)/1.1 var(--display); margin: 2px 0 6px; text-wrap: balance; }
.dhead .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { position: relative; height: 40px; padding: 0 14px; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.tabs button:hover { color: var(--parch); }
.tabs button.on { color: var(--goldhot); }
.tabs button.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--ember), var(--goldhot)); }
.tabs button .n { font: 500 11px/1 var(--mono); margin-left: 6px; color: var(--dim); }
.srcgrid { display: grid; gap: 12px; }
/* grid children may shrink below their content, so wide tables scroll inside .tablewrap instead of widening the page */
.srcgrid > *, .grid2 > *, .cmp > * { min-width: 0; }
.src { border-radius: var(--r); padding: 14px 16px; }
.src h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; font: 600 12px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--goldhot); }
.src h3 svg { width: 16px; height: 16px; }
.src h3 .n { margin-left: auto; font: 500 11px/1 var(--mono); color: var(--dim); letter-spacing: 0; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 500; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 7px 10px; border-bottom: 1px solid rgba(255, 255, 255, .04); vertical-align: middle; }
table.t tr:hover td { background: rgba(255, 255, 255, .02); }
table.t td.r, table.t th.r { text-align: right; }
.tablewrap { overflow-x: auto; }
.chance { display: inline-flex; align-items: center; gap: 8px; min-width: 120px; }
.chance .bar { position: relative; flex: 1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; min-width: 50px; }
.chance .bar i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: linear-gradient(90deg, var(--ember), var(--goldhot)); }
.rule { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.rule b { font-weight: 600; }
.rule .w { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.hpbar { position: relative; height: 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); overflow: hidden; margin-top: 6px; }
.hpbar i { position: absolute; inset: 0 auto 0 0; border-radius: 10px; background: linear-gradient(90deg, #8e1f22, var(--asmo) 60%, #ff8a8d); box-shadow: 0 0 12px rgba(216, 70, 74, .55); }
.mapplot { position: relative; border-radius: 12px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 50%, rgba(228, 152, 61, .06), transparent 70%), repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 40px), repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 40px), #0d0b11; aspect-ratio: 1 / 1; overflow: hidden; }
.mapplot > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mapplot .pt { fill: var(--goldhot); filter: drop-shadow(0 0 4px rgba(247, 189, 99, .9)); }
.mapplot .lbl { position: absolute; left: 10px; top: 8px; font-size: 12px; color: var(--muted); }
.skilltl { position: relative; padding-left: 22px; }
.skilltl::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(180deg, rgba(228, 152, 61, .55), rgba(228, 152, 61, .05)); }
.skilltl .lvl { position: relative; margin: 14px 0 6px; font: 600 12px/1 var(--mono); color: var(--goldhot); }
.skilltl .lvl::before { content: ""; position: absolute; left: -18px; top: 1px; width: 9px; height: 9px; border-radius: 50%; background: var(--void); border: 2px solid var(--gold); }
.clsgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 2px 10px; }
.clsrw { position: relative; min-width: 0; }
.clsrw > img { position: absolute; left: 34px; top: 30px; z-index: 1; width: 20px; height: 20px; object-fit: contain; filter: drop-shadow(0 1px 3px #000); pointer-events: none; }
.huntg { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 6px; align-items: start; padding: 4px 0; border-top: 1px solid var(--line); }
.src h3 + .huntg { border-top: 0; }
.huntg .cnt { padding-top: 15px; text-align: center; font-size: 17px; color: var(--goldhot); }
.notice { padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(247, 189, 99, .3); background: rgba(228, 152, 61, .07); color: #f3d9a8; font-size: 13.5px; }

/* skeleton */
.skel { border-radius: 10px; background: linear-gradient(90deg, rgba(255, 255, 255, .04) 25%, rgba(255, 255, 255, .09) 50%, rgba(255, 255, 255, .04) 75%); background-size: 800px 100%; animation: shimmer 1.3s linear infinite; }
.loader { display: flex; align-items: center; gap: 12px; padding: 40px 0; justify-content: center; color: var(--muted); }
.loader i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(247, 189, 99, .2); border-top-color: var(--goldhot); animation: spin .8s linear infinite; }

/* ─────────────────────────── omni search ─────────────────────────── */
#omni { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 9vh 16px 20px; background: rgba(5, 4, 7, .72); backdrop-filter: blur(6px); }
#omni.open { display: flex; animation: rise .2s ease; }
.omni-box { width: min(760px, 100%); border-radius: 18px; overflow: hidden; border: 1px solid rgba(247, 189, 99, .35); background: rgba(18, 15, 23, .97); box-shadow: 0 40px 120px -30px #000, 0 0 0 1px rgba(255, 255, 255, .04); }
.omni-in { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.omni-in svg { width: 20px; height: 20px; color: var(--goldhot); flex-shrink: 0; }
.omni-in input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 17px; }
.omni-tabs { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.omni-res { max-height: 60vh; overflow: auto; padding: 8px; }
.omni-res .grp { padding: 10px 10px 4px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.omni-res a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 11px; }
.omni-res a.sel, .omni-res a:hover { background: rgba(228, 152, 61, .1); }
.omni-res a .meta { min-width: 0; flex: 1; }
.omni-res a b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omni-res a small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omni-res a .kind { font: 500 10.5px/1 var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.omni-foot { display: flex; gap: 16px; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }
mark { background: none; color: var(--goldhot); }

/* ─────────────────────────── compare tray ─────────────────────────── */
#tray { position: fixed; left: 50%; bottom: 16px; z-index: 80; transform: translate(-50%, calc(100% + 40px)); visibility: hidden; transition: transform .35s cubic-bezier(.2, .7, .3, 1), visibility 0s linear .35s; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 16px; border: 1px solid rgba(247, 189, 99, .35); background: rgba(18, 15, 23, .94); box-shadow: 0 24px 60px -20px #000; backdrop-filter: blur(12px); }
#tray.show { transform: translate(-50%, 0); visibility: visible; transition: transform .35s cubic-bezier(.2, .7, .3, 1); }
#tray .slots { display: flex; gap: 8px; }
#tray .slot { position: relative; }
#tray .slot button { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--asmo); color: #fff; font-size: 11px; line-height: 18px; cursor: pointer; padding: 0; }
.cmp { display: grid; gap: 14px; }
.cmp table td.better { color: var(--ok); }
.cmp table td.worse { color: var(--bad); }

/* world: region cards */
.mapgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 14px; }
.mapcard { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #0d0b11; transition: transform .35s cubic-bezier(.2, .7, .3, 1), border-color .35s, box-shadow .35s; }
.mapcard img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); filter: saturate(.85) brightness(.82); transition: transform .9s cubic-bezier(.2, .7, .3, 1), filter .4s; }
.mapcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 7, 10, 0) 38%, rgba(8, 7, 10, .93)); pointer-events: none; }
.mapcard:hover { transform: translateY(-4px); border-color: rgba(247, 189, 99, .45); box-shadow: 0 26px 60px -30px #000, 0 0 0 1px rgba(228, 152, 61, .15); }
.mapcard:hover img { transform: scale(1.14); filter: saturate(1.05) brightness(1); }
.mapcard .mc-in { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 10px; }
.mapcard .mc-in b { display: block; font: 400 18px/1.2 var(--display); text-shadow: 0 2px 12px #000; }
.mapcard .mc-in small { display: block; margin-top: 3px; color: #d6cede; font-size: 11.5px; }
.mapcard .badge.ex { height: 18px; font-size: 9px; vertical-align: 3px; }
.mapcard.plain .ico { position: absolute; left: 50%; top: 42%; width: 54px; height: 54px; transform: translate(-50%, -50%); }
.mapcard.plain:hover .ico { color: var(--goldhot); }

/* the interactive map */
.atlas-head { padding-bottom: 14px; }
.atlas-title { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; justify-content: space-between; margin-top: 8px; }
.atlas-title .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.atlas-title h1 { font: 400 clamp(28px, 3.4vw, 42px)/1.1 var(--display); margin: 8px 0 0; text-wrap: balance; }
.at-jump { display: flex; align-items: center; gap: 8px; }
.at-jump .lbl { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.at-jump select { height: 36px; max-width: 260px; }
.atlas { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; max-width: 1640px; margin: 0 auto; padding: 0 20px; }
.atlas-side, .atlas-view { height: calc(100vh - var(--header) - 150px); min-height: 520px; border-radius: var(--r); }
.atlas-side { display: flex; flex-direction: column; gap: 10px; padding: 12px; overflow: auto; overscroll-behavior: contain; }
.atlas-side::-webkit-scrollbar { width: 6px; }
.atlas-side::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 6px; }
.atlas-view { position: relative; overflow: hidden; border: 1px solid var(--line); background: #07060a; touch-action: none; cursor: grab; outline: none; user-select: none; -webkit-user-select: none; }
.atlas-view:focus-visible { border-color: rgba(247, 189, 99, .6); }
.atlas-view.grabbing { cursor: grabbing; }
.at-stage { position: absolute; left: 0; top: 0; width: 3072px; height: 3072px; transform-origin: 0 0; will-change: transform; }
.at-stage img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; pointer-events: none; -webkit-user-drag: none; }
.at-stage img.hi { opacity: 0; transition: opacity .6s; }
.at-stage img.hi.on { opacity: 1; }
.nomap { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(228, 152, 61, .07), transparent 70%), repeating-linear-gradient(0deg, rgba(255, 255, 255, .04) 0 3px, transparent 3px 128px), repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 3px, transparent 3px 128px), #0d0b11; }
.atlas-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.at-tip { position: absolute; z-index: 3; max-width: 280px; padding: 9px 12px; border-radius: 11px; background: rgba(14, 12, 18, .95); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 14px 40px -14px #000; pointer-events: none; font-size: 13px; }
.at-tip b { display: block; font-weight: 600; }
.at-tip small { display: block; color: var(--muted); font-size: 12px; }
.at-ctrl { position: absolute; z-index: 3; right: 12px; top: 12px; display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; border: 1px solid var(--line2); background: rgba(14, 12, 18, .88); backdrop-filter: blur(8px); }
.at-ctrl button { width: 38px; height: 38px; border: 0; background: none; color: var(--parch); font-size: 18px; line-height: 1; cursor: pointer; }
.at-ctrl button + button { border-top: 1px solid var(--line); }
.at-ctrl button:hover { color: var(--goldhot); background: rgba(228, 152, 61, .1); }
.at-coord { position: absolute; z-index: 3; left: 12px; bottom: 10px; padding: 4px 9px; border-radius: 8px; background: rgba(14, 12, 18, .78); font: 500 12px/1.4 var(--mono); color: #d6cede; pointer-events: none; }
.at-coord:empty { display: none; }
.at-layers-btn { display: none; position: absolute; z-index: 3; left: 12px; top: 12px; }
.at-floors { position: absolute; z-index: 3; left: 50%; top: 12px; transform: translateX(-50%); max-width: calc(100% - 130px); overflow-x: auto; background: rgba(14, 12, 18, .9); backdrop-filter: blur(8px); }
.at-floors button { flex-shrink: 0; white-space: nowrap; }
.at-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .035); flex-shrink: 0; }
.at-search:focus-within { border-color: rgba(247, 189, 99, .55); }
.at-search svg { width: 15px; height: 15px; color: var(--goldhot); flex-shrink: 0; }
.at-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; }
.at-found:empty { display: none; }
.at-found small { display: block; padding: 4px 9px; font-size: 12px; }
.at-sec, .at-kinds, .at-hits { display: grid; gap: 1px; }
.at-hits { max-height: 240px; overflow: auto; }
.at-layer, .at-kind, .at-hits button { display: flex; align-items: center; gap: 9px; width: 100%; min-width: 0; padding: 7px 9px; border-radius: 9px; border: 0; background: none; cursor: pointer; text-align: left; font-size: 13.5px; color: var(--muted); }
.at-layer:hover, .at-kind:hover, .at-hits button:hover { background: rgba(255, 255, 255, .045); }
.at-layer { font-weight: 600; }
.at-layer.on, .at-kind.on, .at-hits button { color: var(--parch); }
.at-layer .n, .at-kind .n, .at-hits .n { margin-left: auto; font: 500 11px/1 var(--mono); color: var(--dim); }
.at-kind .nm, .at-hits .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw { flex-shrink: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px rgba(8, 7, 10, .8); opacity: .3; }
.on > .sw, .at-hits .sw { opacity: 1; }
.sw.square { border-radius: 2px; }
.sw.diamond { border-radius: 1px; transform: rotate(45deg) scale(.82); }
.sw.tri { border-radius: 0; box-shadow: none; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.sw.ring { background: transparent; box-shadow: inset 0 0 0 2.5px var(--c), 0 0 0 1px rgba(8, 7, 10, .8); }
.at-kinds { padding-left: 6px; }
.at-kinds.off { opacity: .45; }
.at-gh { margin: 8px 0 2px 9px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.at-kind { padding: 4px 8px; font-size: 13px; }
.at-kind .ico.sm { width: 24px; height: 24px; border-radius: 5px; }
.at-kind small { font: 500 11px/1 var(--mono); color: var(--dim); }
.at-go { margin-left: 2px; padding: 2px 4px; border-radius: 6px; font-size: 14px; line-height: 1; color: var(--muted); }
.at-go:hover { color: var(--goldhot); background: rgba(228, 152, 61, .12); }
.at-info { position: relative; display: grid; gap: 6px; margin-top: auto; padding: 12px; border-radius: 12px; border: 1px solid rgba(247, 189, 99, .3); background: rgba(228, 152, 61, .06); }
.at-info .at-name { padding-right: 24px; font: 400 19px/1.2 var(--display); }
.at-info small { color: var(--muted); font-size: 12px; }
.at-info small a { color: var(--goldhot); }
.at-info .actions { margin-top: 2px; }
.at-x { position: absolute; right: 8px; top: 6px; width: 26px; height: 26px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.at-x:hover { color: var(--parch); background: rgba(255, 255, 255, .06); }
.at-mats { display: grid; gap: 6px; }
.at-loc { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: #d6cede; }
.mapplot .pt { stroke: rgba(8, 7, 10, .9); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.mapplot .lbl { z-index: 2; padding: 3px 8px; border-radius: 7px; background: rgba(14, 12, 18, .75); }
.mapplot .mm-open { position: absolute; z-index: 2; right: 10px; bottom: 10px; }

/* toast */
#toast { position: fixed; left: 50%; top: 84px; z-index: 120; transform: translate(-50%, -20px); opacity: 0; transition: opacity .2s, transform .2s; padding: 10px 16px; border-radius: 12px; background: rgba(18, 15, 23, .96); border: 1px solid rgba(247, 189, 99, .4); color: var(--goldhot); font-size: 13.5px; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ─────────────────────────── responsive ─────────────────────────── */
@media (max-width: 1180px) {
  .nav a { padding: 8px 8px; font-size: 13px; }
  .searchbtn { min-width: 0; }
  .searchbtn span, .searchbtn kbd { display: none; }
  .home-link { display: none; }
}
@media (max-width: 980px) {
  .nav { display: none; position: absolute; top: var(--header); left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 10px; background: rgba(12, 10, 16, .97); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 15px; }
  .burger { display: inline-flex; }
  .browse, .grid2, .grid2.side, .grid2.even, .dice { grid-template-columns: minmax(0, 1fr); }
  .tree { position: static; max-height: none; display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
  .tree a { flex-shrink: 0; padding: 6px 10px; border: 1px solid var(--line); }
  .tree .top { margin-top: 0; }
  .dice > div:last-child { order: -1; padding-top: 0; }
  .atlas { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
  .atlas-view { order: -1; height: min(66vh, 112vw); min-height: 340px; }
  .atlas-side { height: auto; min-height: 0; overflow: visible; }
  .at-layers-btn { display: inline-flex; }
  .at-floors { top: auto; bottom: 12px; max-width: calc(100% - 24px); }
  .at-floors ~ .at-coord { display: none; }
  .at-jump { width: 100%; }
  .at-jump select { flex: 1; max-width: none; }
  .tree .sub { padding-left: 10px; }
  .tree .kids { display: contents; }
}
@media (max-width: 640px) {
  .wrap { padding: 20px 16px 60px; }
  .hdr-in { padding: 0 16px; gap: 10px; }
  .brand .word small { display: none; }
  .hero-in { padding: 56px 16px 50px; }
  .vrow .hide-s, .vhead .hide-s { display: none; }
  .vhead, .vrow { grid-template-columns: var(--cols-s); }
  #hover { display: none; }
  .filters .grow { flex: 1 1 0; min-width: 0; }
  .ftoggle { display: inline-flex; }
  .filters .fmore { display: none; }
  .filters.open .fmore { display: contents; }
  .cattiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cattile { padding: 12px; gap: 10px; }
  .cattile b { font-size: 15px; }
  .classrow, .classrow.k11, .classrow.k12 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-tile b { font-size: 26px; }
}
@media (max-width: 360px) {
  .cattiles { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
