/*
 * AIDB.ru - site styles.
 * Re-layout of the original 2010 design (template/base.css, layout.css by csscoder.ru)
 * with CSS grid; colours, header art, menu bar and table look are kept.
 */

:root {
    --c-text: #000;
    --c-muted: #6b6b6b;
    --c-faint: #8a8a8a;
    --c-link: #1d76b8;          /* old #2c8fd6, darkened for 4.5:1 contrast */
    --c-link-hover: #0f5a92;
    --c-bg: #fff;
    --c-panel: #f2f2f2;
    --c-dark: #1e1e1e;
    --c-dark-2: #2d2d2d;
    --c-line: #c9c9c9;
    --c-row-hover: #e7e8e8;
    --c-input-border: #8fb0c6;
    --c-ok: #267110;
    --c-no: #767676;
    --c-red: #c91717;
    /* item quality (old inline colours, darkened where needed for contrast on white) */
    --q-common: #767676;
    --q-rare: #267110;
    --q-legend: #1d76b8;
    --q-unique: #9a6f00;
    --q-epic: #c2510f;
    --q-junk: #000;
    --font: Verdana, Tahoma, Arial, Helvetica, sans-serif;
    --fs: 12px;
    --site-max: 1480px;
    --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font: var(--fs)/1.5 var(--font);
}

img { max-width: 100%; height: auto; border: 0; }
img.icon { vertical-align: middle; }
a { color: var(--c-link); }
a:hover { color: var(--c-link-hover); text-decoration: none; }
:focus-visible { outline: 2px solid #f0a500; outline-offset: 2px; }
h1, h2, h3, h4 { font-weight: normal; line-height: 1.3; margin: 0 0 .6em; }
h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
table { border-collapse: collapse; }
dialog { border: 0; padding: 0; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
    position: absolute; left: 8px; top: -60px; z-index: 1000;
    padding: 8px 14px; background: var(--c-dark); color: #fff; border-radius: var(--radius);
}
.skip-link:focus { top: 8px; }

.fz10 { font-size: 10px; }
.tac { text-align: center; }
.muted { color: var(--c-muted); }
.nowrap { white-space: nowrap; }
.yes { color: var(--c-ok); font-weight: bold; font-size: 10px; }
.no { color: var(--c-no); font-size: 10px; }
.red { color: var(--c-red); }

/* item quality */
.q-common { color: var(--q-common) !important; }
.q-rare { color: var(--q-rare) !important; }
.q-legend { color: var(--q-legend) !important; }
.q-unique { color: var(--q-unique) !important; }
.q-epic { color: var(--q-epic) !important; }
.q-junk { color: var(--q-junk) !important; }
.q-default { color: var(--c-text) !important; }

/* ------------------------------------------------------------------ */
/* site grid                                                           */
/* ------------------------------------------------------------------ */
.site {
    max-width: var(--site-max);
    margin: 0 auto;
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
}
.site > * { min-width: 0; }

/* header: characters art + logo (as on the old site) + search on the right */
.head { position: relative; z-index: 50; }
.head-top {
    position: relative;
    height: 260px;
    background: url("../img/head.d11ece343f40.jpg") no-repeat 26px 0;
}
.logo {
    position: absolute;
    top: 78px;
    left: 395px;
    display: block;
    width: 227px;
    height: 104px;
    background: url("../img/logo.692d8c7fa6fd.png") no-repeat 0 0;
}
.burger { display: none; }

/* header search with autocomplete (no submit button: Enter opens /search/) */
.search {
    position: absolute;
    right: 26px;
    bottom: 26px;
    z-index: 80;
    display: flex;
    align-items: center;
    width: min(560px, calc(100% - 680px));
}
.search .input {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    padding: 0 40px 0 40px;
    border: 1px solid #cfd8df;
    border-radius: 20px;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
    color: #1b1b1b;
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
}
.search .input:focus { outline: none; border-color: #e8b13c; box-shadow: 0 0 0 3px rgba(232, 177, 60, .25); }
.search .input::-webkit-search-cancel-button { cursor: pointer; }
.search-ico { position: absolute; left: 14px; color: #8a96a0; pointer-events: none; }
.search-kbd {
    position: absolute; right: 12px; padding: 0 6px; border: 1px solid #d5dbe0; border-radius: 4px;
    background: #f6f8fa; color: #8a96a0; font: 11px/18px var(--font); pointer-events: none;
}
.search .input:focus ~ .search-kbd, .search .input:not(:placeholder-shown) ~ .search-kbd { display: none; }
.suggest {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    overflow: hidden; border: 1px solid #e3e3e3; border-radius: 14px;
    background: #fff; box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
}
.suggest-item {
    display: flex; align-items: center; gap: 11px; padding: 8px 14px;
    color: #1b1b1b; text-decoration: none; cursor: pointer;
}
.suggest-item + .suggest-item { border-top: 1px solid #f3f3f3; }
.suggest-item[aria-selected="true"], .suggest-item:hover { background: #fdf6e6; }
.suggest-item img { flex: none; width: 32px; height: 32px; border: 1px solid #444; border-radius: 6px; background: #000; }
.suggest-text { flex: 1; min-width: 0; }
.suggest-name { display: block; overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.suggest-name mark { background: none; color: inherit; font-weight: bold; }
.suggest-sub { display: block; color: #6b6b6b; font-size: 11px; }
.suggest-label { flex: none; padding: 1px 8px; border-radius: 6px; background: #f1f1f1; color: #666; font-size: 11px; }
.suggest-all { display: block; padding: 10px 14px; background: #fafafa; border-top: 1px solid #eee; color: #8a5c00; font-size: 13px; font-weight: bold; text-decoration: none; }
.suggest-all[aria-selected="true"], .suggest-all:hover { background: #fdf6e6; }
.suggest-empty { padding: 12px 14px; color: #6b6b6b; font-size: 13px; }

/* inputs and buttons (old l-round.gif / l-round-b.png look) */
.input, select.input, .form input[type="text"], .form input[type="number"], .form input[type="search"], .form select {
    height: 24px;
    padding: 2px 8px;
    border: 1px solid var(--c-input-border);
    border-radius: var(--radius);
    background: linear-gradient(#fff, #f3f7fa);
    color: #234;
    font: 12px/1.2 var(--font);
}
.input::placeholder { color: #6f8ea3; opacity: 1; }
.btn, .form button, button.btn {
    display: inline-block;
    height: 22px;
    padding: 0 22px;
    border: 0;
    border-radius: 4px;
    background: linear-gradient(#3a3a3a, #111);
    color: #fff;
    font: 12px/22px var(--font);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}
.btn:hover, .form button:hover { background: linear-gradient(#4b4b4b, #222); color: #fff; }

/* main menu: black bar of tile-like tabs (icon, label, record counter) + tile dropdown groups.
   every tab keeps the same box in every state - highlight is drawn with background/inset shadows only */
.main-menu {
    margin: 0 26px;
    background: linear-gradient(#2e2e2e, #141414);
    border-radius: 10px;
    box-shadow: 0 2px 0 #000, 0 8px 18px rgba(0, 0, 0, .14);
}
.main-menu .menu {
    display: flex;
    align-items: stretch;
    margin: 0;
    padding: 4px 6px;
    list-style: none;
}
.main-menu .menu > li { position: relative; display: flex; flex: 1 1 auto; }
.main-menu .menu > li + li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 1px;
    background: rgba(255, 255, 255, .07);
}
.main-menu .menu > li > a,
.main-menu summary {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 50px;
    margin: 0 2px;
    padding: 0 12px;
    border-radius: 8px;
    color: #ececec;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .15s, box-shadow .15s, color .15s;
}
.main-menu .mi {
    flex: none;
    width: 26px;
    height: 26px;
    border: 1px solid #4d4d4d;
    border-radius: 6px;
    background: #000;
    transition: border-color .15s;
}
.main-menu .mt { display: flex; flex-direction: column; line-height: 1.15; }
.main-menu .ml { font-size: 14px; }
.main-menu .mc { margin-top: 2px; color: #8e8e8e; font-size: 11px; }
.main-menu summary { list-style: none; }
.main-menu summary::-webkit-details-marker { display: none; }
.main-menu summary::after {
    content: "";
    margin-left: 1px;
    border: 4px solid transparent;
    border-top-color: currentColor;
    border-bottom: 0;
    opacity: .6;
    transition: transform .15s;
}
.main-menu details[open] > summary::after { transform: rotate(180deg); }
/* hover / open group: tile lift */
.main-menu .menu > li > a:hover,
.main-menu summary:hover,
.main-menu details[open] > summary {
    background: linear-gradient(#3b3b3b, #242424);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 1px 0 #000;
    color: #ffd36b;
}
.main-menu .menu > li > a:hover .mi, .main-menu summary:hover .mi, .main-menu details[open] > summary .mi { border-color: #8a6d2a; }
/* current section: raised tile with a gold underline */
.main-menu .menu > li.current > a,
.main-menu .menu > li.current > details > summary {
    background: linear-gradient(#4a4a4a, #2b2b2b);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -3px 0 #e8b13c, 0 1px 0 #000;
    color: #ffd36b;
}
.main-menu .menu > li.current .mi { border-color: #e8b13c; }
.main-menu .menu > li.current .mc { color: #cfcfcf; }
.main-menu .menu > li > a:focus-visible, .main-menu summary:focus-visible { outline: 2px solid #ffd36b; outline-offset: -2px; }
.main-menu details { display: flex; flex: 1 1 auto; }
.main-menu .dd-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    gap: 8px;
    margin: 0;
    padding: 12px;
    list-style: none;
    background: #1b1b1b;
    border-radius: 0 10px 10px 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
}
.main-menu .dd-calc { grid-template-columns: repeat(3, minmax(190px, 1fr)); }
.main-menu .dd .dd-menu { left: auto; right: 0; border-radius: 10px 0 10px 10px; }  /* groups sit at the right end of the bar */
.main-menu .mini-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    background: linear-gradient(#2e2e2e, #161616);
    box-shadow: 0 2px 0 #000;
    color: #fff;
    text-decoration: none;
    transition: background-color .12s, transform .12s;
}
.main-menu .mini-tile img { flex: none; width: 32px; height: 32px; border-radius: 6px; border: 1px solid #555; background: #000; }
.main-menu .mini-tile .mt-name { display: block; font-size: 13px; line-height: 1.2; }
.main-menu .mini-tile .mt-count { display: block; margin-top: 2px; color: #b5b5b5; font-size: 11px; }
.main-menu .mini-tile:hover, .main-menu .mini-tile:focus-visible { background: linear-gradient(#3a3a3a, #1d1d1d); }
.main-menu .mini-tile:hover .mt-name, .main-menu .mini-tile:focus-visible .mt-name { color: #ffd36b; }
.menu-backdrop { display: none; }

/* content area: full width */
.content {
    padding: 22px 26px 60px;
    min-width: 0;
}
.content:focus { outline: none; }

/* footer: feather on the right, freezetime + copyright */
.footer {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 40px;
    align-items: flex-start;
    min-height: 138px;
    padding: 34px 250px 24px 26px;
    background: url("../img/pero.062c5c7cfbe6.jpg") no-repeat right 26px bottom;
    border-top: 1px solid #eee;
}
.footer p { margin: 0; }
.copyright p:first-child { font-weight: bold; }
.copyright a { text-decoration: none; color: var(--c-text); }
.copyright a:hover { text-decoration: underline; }
.freeztime {
    padding-left: 70px;
    background: url("../img/f-logo.27240b4d1949.png") no-repeat 0 5px;
    font-size: 11px;
}
.freeztime a { letter-spacing: 1px; text-decoration: none; color: var(--c-text); }
.freeztime a span { text-decoration: underline; }
.freeztime p { color: #767676; }

/* ads */
.ad { margin: 0 auto 20px; text-align: center; min-height: 0; }
.ad-bottom { margin-top: 30px; }

/* ------------------------------------------------------------------ */
/* content blocks                                                      */
/* ------------------------------------------------------------------ */
.page-title, .highlight { font-size: 24px; line-height: 1.3; margin: 0 0 15px; font-weight: normal; }
.page-title a { color: var(--c-link); }
.section-title { font-size: 20px; margin: 25px 0 12px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0 0 12px; padding: 0; list-style: none; color: var(--c-muted); font-size: 12px; line-height: 1.4; }
.breadcrumbs li + li::before { content: "›"; margin-right: 8px; color: #b9b9b9; }
.breadcrumbs a { color: #6b6b6b; text-decoration: none; }
.breadcrumbs a:hover { color: #8a5c00; text-decoration: underline; }
.breadcrumbs [aria-current] { color: #6b6b6b; }

.panel {
    background: var(--c-panel);
    border-radius: var(--radius);
    padding: 12px 15px;
    margin: 0 0 15px;
}
.note { color: var(--c-muted); font-size: 11px; }
.empty { margin: 20px 0; font-weight: bold; }

/* cards: detail page blocks */
.card { background: #fff; border: 1px solid #e3e3e3; border-radius: 8px; padding: 14px 16px; margin: 0 0 18px; min-width: 0; }
.card > .card-title, .card-title { font-size: 18px; margin: 0 0 10px; }
.card .table-wrap:last-child, .card table:last-child, .card p:last-child { margin-bottom: 0; }
.cards-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 18px; }
.page-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.page-toc a { display: inline-block; padding: 4px 12px; border-radius: 14px; background: var(--c-panel); color: var(--c-text); text-decoration: none; font-size: 12px; }
.page-toc a:hover { background: var(--c-dark); color: #fff; }
.filter-box { margin: 0 0 20px; }
.filter-box > summary { display: none; }
@media (max-width: 1023px) {
    .filter-box > summary {
        display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none;
        padding: 10px 14px; border-radius: var(--radius); background: var(--c-panel); font-weight: bold;
    }
    .filter-box > summary::-webkit-details-marker { display: none; }
    .filter-box > summary::after { content: "▾"; }
    .filter-box[open] > summary { border-radius: var(--radius) var(--radius) 0 0; }
    .filter-box[open] > summary::after { content: "▴"; }
    .filter-box .filter { border-radius: 0 0 var(--radius) var(--radius); }
    .filter-box .form { margin: 0; }
    /* collapsed from the first paint on narrow screens (no layout shift when JS closes the <details>) */
    .filter-box[data-collapse-mobile]:not(.js-ready) > .form { display: none; }
}
.obj-head img { flex: none; }
.obj-head .name { font-size: 24px; line-height: 1.1; margin: 0; }
.obj-head .name-en { display: block; color: #6b6b6b; font-size: 14px; margin-top: 4px; }

/* filter form */
.form { margin: 0 0 20px; }
.filter {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px 20px;
    background: var(--c-panel);
    border-radius: var(--radius);
    padding: 14px 15px;
}
.filter .field { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 6px; }
.filter .field > label, .filter .field > .label { font-weight: bold; }
.filter .field select, .filter .field input[type="text"], .filter .field input[type="search"] { width: 100%; }
.filter .range { display: flex; align-items: center; gap: 6px; }
.filter .range input { width: 56px !important; }
.filter .actions { grid-column: 1 / -1; padding-top: 4px; }
.errorlist { color: var(--c-red); margin: 4px 0; padding-left: 1.2em; font-size: 11px; }

/* data tables: black rounded header, dotted rows */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 20px; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; line-height: 1.25; }
table.data th {
    background: var(--c-dark);
    color: #fff;
    font-size: 10px;
    font-weight: normal;
    text-align: center;
    padding: 5px 8px;
    white-space: nowrap;
}
table.data th:first-child { border-radius: 11px 0 0 11px; }
table.data th:last-child { border-radius: 0 11px 11px 0; }
table.data th.l, table.data td.l { text-align: left; }
table.data td {
    padding: 6px 8px;
    border-bottom: 1px dotted var(--c-line);
    vertical-align: middle;
    text-align: center;
    font-size: 12px;
}
table.data td.name { text-align: left; font-size: 12px; }
table.data td.name em, table.data .en { display: block; color: #767676; font-size: 10px; font-style: normal; margin-top: 2px; }
table.data td.icon-cell { width: 46px; padding: 3px; }
table.data tbody tr:hover td { background: var(--c-row-hover); }
table.data td.small { font-size: 10px; }

/* key/value property tables (item characteristics etc.) */
table.props { width: 100%; margin: 0 0 20px; }
table.props th { text-align: left; font-weight: bold; padding: 2px 10px 2px 3px; width: 50%; vertical-align: top; }
table.props td { padding: 2px 3px; vertical-align: top; }

/* rich text from the DB (sanitized at import) */
.rich { overflow-wrap: anywhere; }
.rich img { height: auto; }
.rich img[align="right"] { float: right; margin: 0 0 10px 15px; }
.rich img[align="left"] { float: left; margin: 0 15px 10px 0; }
.rich::after { content: ""; display: table; clear: both; }
.rich table { max-width: 100%; }
.rich td, .rich th { padding: 2px 4px; }

/* lists of links */
.link-list { columns: 3 220px; column-gap: 20px; padding: 0; list-style: none; }
.link-list li { break-inside: avoid; margin: 0 0 4px; padding-left: 12px; background: url("../img/round-1.9b1051c63624.gif") no-repeat 0 7px; }

/* pagination */
.pagination { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 10px 0 20px; padding: 0; list-style: none; }
.pagination a, .pagination span {
    display: inline-block; min-width: 28px; padding: 3px 8px; border-radius: 4px; text-align: center;
    border: 1px solid var(--c-line); text-decoration: none;
}
.pagination .current { background: var(--c-dark); color: #fff; border-color: var(--c-dark); }
.pagination .gap { border: 0; }

/* home page: news feed in the mmoboom.ru manner - post cards in the main column + sidebar,
   recoloured to the site's black/gold */
.home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    align-items: start;
}
.feed-heading {
    display: flex; align-items: center; gap: 10px;
    margin: 4px 0 18px; font-size: 24px; font-weight: bold; color: #1b1b1b;
}
.feed-heading::before { content: ""; width: 5px; height: 24px; border-radius: 3px; background: linear-gradient(#f3c55a, #c98d1a); }
.feed-heading .muted { color: var(--c-muted); font-size: 15px; font-weight: normal; }
.feed { display: flex; flex-direction: column; gap: 22px; }
.post {
    padding: 20px 22px 16px;
    border: 1px solid #e7e4df;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
    transition: box-shadow .2s ease, border-color .2s;
}
.post:hover { border-color: #ddd6c8; box-shadow: 0 10px 26px rgba(0, 0, 0, .09); }
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.post-tag {
    display: inline-block; padding: 2px 9px; border-radius: 6px;
    font-size: 11px; font-weight: bold; line-height: 1.6;
}
.tag-fresh { background: #fff1d2; color: #8a5a00; border: 1px solid #f1d79b; }
.tag-retro { background: #efeafb; color: #4b3a8f; border: 1px solid #d9cff3; }
.tag-site { background: #f0f1f3; color: #4c5560; border: 1px solid #dfe2e6; }
.post-src { color: #6b6b6b; font-size: 11px; }
.post-src::before { content: "•"; margin-right: 8px; color: #c9c9c9; }
.post-title { margin: 0 0 14px; font-size: 22px; line-height: 1.3; font-weight: bold; }
.post-title a { color: #151515; text-decoration: none; }
.post-title a:hover, .post-title a:focus-visible { color: #8a5c00; }
.post-cover { display: block; overflow: hidden; aspect-ratio: 4 / 1.6; border-radius: 10px; background: #1b1b1b; }
.post-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post:hover .post-cover img { transform: scale(1.025); }
.post-lead { margin: 14px 0 0; color: #3f3f3f; font-size: 15px; font-weight: normal; line-height: 1.65; }
.post-foot {
    display: flex; align-items: center; gap: 16px;
    margin-top: 14px; padding-top: 12px; border-top: 1px solid #ececec;
    color: #6b6b6b; font-size: 12px;
}
.post-comments { display: inline-flex; align-items: center; gap: 5px; color: #6b6b6b; text-decoration: none; }
.post-comments:hover { color: #8a5c00; }
.post-more { margin-left: auto; color: #8a5c00; font-weight: bold; font-size: 13px; text-decoration: none; }
.post-more:hover { color: #7d5508; }
.post-more span { display: inline-block; transition: transform .15s; }
.post-more:hover span { transform: translateX(3px); }
.news-feed .pagination { margin-top: 24px; }

/* sidebar */
.home-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 20px; }
.side-box { overflow: hidden; border: 1px solid #e7e4df; border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .05); }
.side-title {
    display: flex; align-items: center; gap: 8px; margin: 0; padding: 13px 16px;
    border-bottom: 1px solid #efefef; background: linear-gradient(#2e2e2e, #161616);
    color: #ffd36b; font-size: 12px; font-weight: bold; letter-spacing: .06em; text-transform: uppercase;
}
.side-list { margin: 0; padding: 6px 0; list-style: none; }
.side-news { display: flex; gap: 11px; padding: 9px 16px; color: #222; text-decoration: none; }
.side-news:hover { background: #faf7f0; }
.side-news img { flex: none; width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #1b1b1b; }
.side-news-title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 13px; line-height: 1.35;
}
.side-news:hover .side-news-title { color: #8a5c00; }
.side-news time, .side-comment time { display: block; margin-top: 3px; color: #6b6b6b; font-size: 11px; }
.side-comment { display: flex; gap: 10px; padding: 10px 16px; }
.side-comment + .side-comment { border-top: 1px solid #f2f2f2; }
.side-comment img { flex: none; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #eee; }
.side-comment-head { display: flex; align-items: baseline; gap: 6px; margin: 0 0 3px; font-size: 13px; }
.side-comment-head time { display: inline; margin: 0; }
.side-comment-text {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    color: #333; font-size: 13px; line-height: 1.4; text-decoration: none;
}
.side-comment-text:hover { color: #8a5c00; }
.side-comment-target { margin: 3px 0 0; overflow: hidden; color: #6b6b6b; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }

@media (max-width: 1099px) {
    .home-layout { grid-template-columns: 1fr; }
    .home-side { position: static; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 699px) {
    .home-side { grid-template-columns: 1fr; }
    .post { padding: 16px 16px 12px; }
    .post-title { font-size: 19px; }
    .post-cover { aspect-ratio: 16 / 8; }
    .post-lead { font-size: 14px; }
    .feed-heading { font-size: 20px; }
}

/* lightbox (site-wide image viewer) */
body.lb-open { overflow: hidden; }
.lightbox {
    width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0;
    border: 0; background: rgba(10, 10, 10, .94); color: #eee;
}
.lightbox::backdrop { background: transparent; }
.lb-stage { position: absolute; inset: 0 0 52px; display: flex; align-items: center; justify-content: center; padding: 16px 64px; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); transition: opacity .2s; }
.lightbox.lb-loading .lb-img { opacity: .25; }
.lightbox.lb-loading .lb-stage::after {
    content: ""; position: absolute; width: 38px; height: 38px; border: 3px solid rgba(255, 255, 255, .25);
    border-top-color: #ffd36b; border-radius: 50%; animation: lb-spin .8s linear infinite;
}
@keyframes lb-spin { to { transform: rotate(360deg); } }
.lb-status { position: absolute; max-width: 420px; margin: 0; color: #ddd; text-align: center; }
.lb-btn {
    position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .1); color: #fff; font-size: 30px; line-height: 1; cursor: pointer;
    transition: background-color .15s;
}
.lb-btn:hover, .lb-btn:focus-visible { background: rgba(255, 211, 107, .9); color: #111; outline: none; }
.lb-close { top: 14px; right: 14px; font-size: 28px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-bar {
    position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 16px;
    height: 52px; padding: 0 20px; background: rgba(0, 0, 0, .55); font-size: 13px;
}
.lb-caption { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lb-counter { color: #aaa; }
.lb-bar a { color: #ffd36b; text-decoration: none; white-space: nowrap; }
.lb-bar a:hover { text-decoration: underline; }
img.zoomable { cursor: zoom-in; }
@media (max-width: 639px) {
    .lb-stage { padding: 10px 6px; }
    .lb-prev, .lb-next { top: auto; bottom: 64px; transform: none; }
    .lb-original { display: none; }
}

/* lightbox: comments panel on the right */
.lb-side {
    position: absolute; top: 0; right: 0; bottom: 52px; width: 380px; overflow-y: auto; padding: 16px;
    background: #f7f7f7; color: #1b1b1b; border-left: 1px solid #000; overscroll-behavior: contain;
}
.lightbox.lb-has-side .lb-stage { right: 380px; }
.lightbox.lb-has-side .lb-next { right: 392px; }
.lightbox.lb-has-side .lb-close { right: 394px; }
.lb-comments-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 12px; font-size: 14px; }
.lb-comments-head a { color: #8a5c00; font-size: 12px; text-decoration: none; }
.lb-comments-empty { color: #6b6b6b; font-size: 13px; }
.lb-side .comment { margin: 0 0 8px; }
@media (max-width: 899px) {
    .lb-side { top: auto; left: 0; bottom: 0; width: auto; height: 42vh; border-left: 0; border-top: 1px solid #000; }
    .lightbox.lb-has-side .lb-stage { right: 0; bottom: calc(42vh + 52px); }
    .lightbox.lb-has-side .lb-next { right: 12px; }
    .lightbox.lb-has-side .lb-close { right: 14px; }
    .lightbox.lb-has-side .lb-bar { bottom: 42vh; }
    .lightbox.lb-has-side .lb-prev, .lightbox.lb-has-side .lb-next { bottom: calc(42vh + 64px); }
}

/* gallery list: tiles with hover caption, open in the lightbox */
.gal-head .muted { margin: -4px 0 18px; color: var(--c-muted); }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 0 0 10px; padding: 0; list-style: none; }
.gal-tile {
    position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3;
    border-radius: 12px; background: #1b1b1b; box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.gal-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, filter .35s; }
.gal-tile:hover img, .gal-tile:focus-visible img { transform: scale(1.05); filter: brightness(.85); }
.gal-over {
    position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 2px;
    padding: 28px 12px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .78));
    color: #fff; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s;
}
.gal-tile:hover .gal-over, .gal-tile:focus-visible .gal-over { opacity: 1; transform: none; }
.gal-name { overflow: hidden; font-size: 13px; font-weight: bold; white-space: nowrap; text-overflow: ellipsis; }
.gal-meta { color: #ddd; font-size: 11px; }
@media (hover: none) { .gal-over { opacity: 1; transform: none; } }
@media (max-width: 639px) { .gal-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } .gal-tile { border-radius: 8px; } }

/* gallery picture page */
.gal-view-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.gal-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #f0f1f3; color: #4c5560; font-size: 12px; text-decoration: none; }
a.chip:hover { background: #e4e6e9; }
.chip-gold { background: #fff1d2; color: #8a5a00; }
a.chip-gold:hover { background: #ffe6ad; }
.gal-stage { position: relative; margin: 0; overflow: hidden; border-radius: 14px; background: #111; text-align: center; }
.gal-stage img { display: block; width: auto; max-width: 100%; height: auto; max-height: 78vh; margin: 0 auto; cursor: zoom-in; }
.gal-arrow {
    position: absolute; top: 50%; display: grid; place-items: center; width: 48px; height: 48px; margin-top: -24px;
    border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; font-size: 32px; text-decoration: none;
    opacity: .75; transition: opacity .15s, background-color .15s;
}
.gal-arrow:hover, .gal-arrow:focus-visible { opacity: 1; background: rgba(232, 177, 60, .95); color: #111; }
.gal-arrow-prev { left: 12px; }
.gal-arrow-next { right: 12px; }
.gal-strip { display: flex; gap: 8px; margin: 12px 0 6px; overflow-x: auto; padding-bottom: 4px; }
.gal-strip a { flex: none; overflow: hidden; width: 110px; aspect-ratio: 4 / 3; border: 2px solid transparent; border-radius: 8px; opacity: .7; transition: opacity .15s, border-color .15s; }
.gal-strip a:hover { opacity: 1; }
.gal-strip a.current { border-color: #e8b13c; opacity: 1; }
.gal-strip img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* home sidebar gallery widget */
.side-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; padding: 12px 14px 4px; list-style: none; }
.side-gallery a { display: block; overflow: hidden; aspect-ratio: 1; border-radius: 8px; background: #1b1b1b; }
.side-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.side-gallery a:hover img { transform: scale(1.08); }
.side-more { display: block; padding: 8px 16px 12px; color: #8a5c00; font-size: 12px; font-weight: bold; text-decoration: none; }
.side-more:hover { color: #7d5508; }

/* sticky header: the hero art scrolls away, the black menu bar stays on top (desktop) */
@media (min-width: 1024px) {
    .head { position: sticky; top: -260px; z-index: 90; padding-bottom: 6px; background: #fff; }
    .head.is-stuck .main-menu { box-shadow: 0 2px 0 #000, 0 10px 24px rgba(0, 0, 0, .22); }
}

/* ===================================================================
   detail pages v2: main column + sticky aside with an in-game tooltip card
   =================================================================== */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "main aside"; gap: 24px; align-items: start; }
.detail-main { grid-area: main; min-width: 0; }
.detail-aside { grid-area: aside; position: sticky; top: 76px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 92px); overflow-y: auto; scrollbar-width: thin; }
.detail-main > .card:first-child, .detail-main > section:first-child { margin-top: 0; }

/* tooltip card: the dark panel of Aion item tooltips, gold hairline frame */
.detail .obj-card {
    margin: 0; padding: 16px 16px 14px; border: 1px solid #5b4a24; border-radius: 10px;
    background: radial-gradient(120% 80% at 0 0, #2a2c33 0, #17181c 60%, #111215 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 211, 107, .08), 0 10px 26px rgba(0, 0, 0, .18);
    color: #d9d9d9;
}
.detail .obj-card .obj-head { display: flex; gap: 12px; align-items: center; margin: 0 0 12px; }
.detail .obj-card .obj-head > img, .detail .obj-card .obj-head .icon {
    flex: none; width: 56px; height: 56px; padding: 3px; border: 1px solid #6d5a2c; border-radius: 8px;
    background: linear-gradient(#0b0b0c, #1e1f23); box-shadow: inset 0 0 8px rgba(0, 0, 0, .8);
}
.detail .obj-card .name { margin: 0; color: #fff; font-size: 19px; font-weight: bold; line-height: 1.2; }
.detail .obj-card .name-en { display: block; margin-top: 3px; color: #9a9ca3; font-size: 12px; }
/* quality colours as the game shows them on dark panels */
.detail .obj-card .q-common { color: #e6e6e6 !important; }
.detail .obj-card .q-rare { color: #5fd93a !important; }
.detail .obj-card .q-legend { color: #4aa8ff !important; }
.detail .obj-card .q-unique { color: #ffcc33 !important; }
.detail .obj-card .q-epic { color: #ff9a2e !important; }
.detail .obj-card a { color: #ffd36b; }
.detail .obj-card a:hover { color: #fff; }
.detail .obj-card .facts, .detail .obj-card .obj-facts {
    display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; padding: 10px 0 0; border-top: 1px solid rgba(255, 255, 255, .08); list-style: none;
}
.detail .obj-card .facts li, .detail .obj-card .obj-facts li {
    display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; background: none; border-radius: 0;
    color: #c9c9c9; font-size: 13px; border-bottom: 1px dotted rgba(255, 255, 255, .08);
}
.detail .obj-card .facts li:last-child, .detail .obj-card .obj-facts li:last-child { border-bottom: 0; }
.detail .obj-card .facts span { margin: 0; color: #8f9198; }
.detail .obj-card .obj-facts li b, .detail .obj-card .facts li b { color: #fff; text-align: right; }
.detail .obj-card table.props { margin: 6px 0 0; max-width: none; }
.detail .obj-card table.props th { width: auto; padding: 3px 10px 3px 0; color: #8f9198; font-weight: normal; }
.detail .obj-card table.props td { padding: 3px 0; color: #fff; text-align: right; }
.detail .obj-card table.props td.rich { text-align: left; }
.detail .obj-card .rich.abil, .detail .obj-card td.abil { color: #5fd93a; }
.detail .obj-card .rich.charge, .detail .obj-card td.charge { color: #ff9a2e; }
.detail .obj-card .rich.descr, .detail .obj-card td.descr { color: #bfc1c7; font-style: italic; }
.detail .obj-card .note { color: #8f9198; }
/* copy the in-game chat link */
.copy-link {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: 12px;
    padding: 8px 12px; border: 1px dashed #6d5a2c; border-radius: 8px; background: rgba(255, 211, 107, .06);
    color: #ffd36b; font: 13px/1.3 var(--font); cursor: pointer; transition: background-color .15s, border-color .15s;
}
.copy-link code { font: bold 13px/1.3 Consolas, "Courier New", monospace; color: #fff; overflow-wrap: anywhere; text-align: left; }
.copy-link span { flex: none; font-size: 11px; color: #c9a24a; }
.copy-link:hover, .copy-link:focus-visible { background: rgba(255, 211, 107, .14); border-color: #e8b13c; }
.copy-link.copied span { color: #5fd93a; }

/* item stats inside the tooltip: game-like lines */
.detail .obj-card table.item-stats { width: 100%; margin-top: 10px; border-top: 1px solid rgba(255, 255, 255, .08); }
.detail .obj-card table.item-stats th, .detail .obj-card table.item-stats td { padding: 4px 0; border-bottom: 1px dotted rgba(255, 255, 255, .07); font-size: 13px; vertical-align: top; }
.detail .obj-card table.item-stats tr:last-child th, .detail .obj-card table.item-stats tr:last-child td { border-bottom: 0; }
.detail .obj-card table.item-stats td.rich { padding-left: 8px; font-size: 12px; line-height: 1.5; }
.item-image img { display: block; max-width: 100%; max-height: 420px; margin: 0 auto; border-radius: 8px; cursor: zoom-in; }

/* tables and property lists inside the main column: calmer, modern links */
.detail-main a, .related a { text-decoration: none; }
.detail-main a:hover { text-decoration: underline; }
.detail-main .rich a { text-decoration: underline; }
.detail-main table.data td a:hover { text-decoration: underline; }
.detail-main table.data td.name a { font-weight: bold; }
.detail-main table.props { width: 100%; }
.detail-main table.props th { width: 38%; padding: 6px 12px 6px 0; color: #6b6b6b; font-weight: normal; border-bottom: 1px solid #f1f1f1; }
.detail-main table.props td { padding: 6px 0; border-bottom: 1px solid #f1f1f1; font-weight: bold; }
.detail-main table.props tr:last-child th, .detail-main table.props tr:last-child td { border-bottom: 0; }

/* craft: race tabs, compact recipe meta, collapsible reagent tree, raw materials total */
.craft-tabs { display: inline-flex; gap: 4px; margin: 0 0 14px; padding: 4px; border-radius: 10px; background: #f1f1f1; }
.craft-tabs button { padding: 6px 14px; border: 0; border-radius: 7px; background: none; color: #555; font: 13px var(--font); cursor: pointer; }
.craft-tabs button[aria-selected="true"] { background: #1b1b1b; color: #ffd36b; }
.craft-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.craft-meta .chip b { color: #1b1b1b; }
.chip-copy { border: 0; font: 12px var(--font); cursor: pointer; }
.chip-copy span { margin-left: 4px; color: #8a5c00; }
.chip-copy.copied span { color: var(--c-ok); }
.craft-combo { margin: 0 0 12px; color: #555; }
.craft-name { margin: 0 0 8px; font-size: 14px; }
.craft-summary .note a { color: #ffd36b; }
.craft-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.tree-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 6px; }
.tree-title { margin: 0; color: #555; font-size: 12px; font-weight: bold; letter-spacing: .05em; text-transform: uppercase; }
.tree-tools { display: inline-flex; gap: 4px; }
.tree-tools button { padding: 3px 9px; border: 1px solid #e3e3e3; border-radius: 6px; background: #fff; color: #666; font: 11px var(--font); cursor: pointer; }
.tree-tools button:hover { border-color: #e8b13c; color: #111; }
.rtree { margin: 0; padding: 0; list-style: none; }
.rtree.nested { margin: 0 0 2px 13px; padding-left: 14px; border-left: 1px solid #e6e1d6; }
.rtree li { margin: 0; }
.rt-row {
    display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 3px 8px 3px 4px;
    border-radius: 7px; list-style: none;
}
.rt-row:hover { background: #faf7f0; }
summary.rt-row { cursor: pointer; }
summary.rt-row::-webkit-details-marker { display: none; }
summary.rt-row::before {
    content: ""; flex: none; width: 14px; height: 14px; margin-right: -2px;
    background: no-repeat center / 8px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M2 1l4 3-4 3z' fill='%23b07a10'/%3E%3C/svg%3E");
    transition: transform .15s;
}
details[open] > summary.rt-row::before { transform: rotate(90deg); }
.rt-leaf::before { content: ""; flex: none; width: 12px; }
.rt-row img { width: 28px; height: 28px; border-radius: 5px; }
.rt-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.rt-qty { flex: none; display: inline-flex; align-items: baseline; gap: 6px; font-size: 13px; }
.rt-qty b { padding: 0 7px; border-radius: 999px; background: #f1f1f1; color: #1b1b1b; font-size: 12px; line-height: 20px; }
.rt-qty small { color: #6b6b6b; font-size: 11px; }
.craft-raw { position: sticky; top: 84px; padding: 12px; border: 1px solid #efe6cf; border-radius: 10px; background: #fffbf1; }
.raw-list { margin: 8px 0 0; padding: 0; list-style: none; }
.raw-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px dashed #efe6cf; font-size: 13px; }
.raw-list li:last-child { border-bottom: 0; }
.raw-list img { width: 24px; height: 24px; border-radius: 4px; }
.raw-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.raw-qty { flex: none; color: #8a5a00; }
@media (max-width: 899px) {
    .craft-grid { grid-template-columns: 1fr; }
    .craft-raw { position: static; }
}
@media (max-width: 479px) {
    .rtree.nested { margin-left: 6px; padding-left: 8px; }
    .rt-row img { width: 24px; height: 24px; }
}

/* lists: "where to get" badges instead of yes/no columns, result counter */
.flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.flags b { padding: 0 7px; border-radius: 999px; font-size: 10px; font-weight: bold; line-height: 17px; }
.f-craft { background: #fff1d2; color: #8a5a00; }
.f-quest { background: #efeafb; color: #4b3a8f; }
.f-drop { background: #fde8e6; color: #a1281b; }
.f-shop { background: #e6f4e3; color: #26631a; }
.list-count { margin: 0 0 8px; color: var(--c-muted); font-size: 12px; }
.list-count b { color: #1b1b1b; }
table.data td.name a { text-decoration: none; font-weight: bold; }
table.data td.name a:hover { text-decoration: underline; }

/* forms v2: taller rounded controls, labels above fields, black/gold buttons */
.input, select.input, .form input[type="text"], .form input[type="number"], .form input[type="search"], .form select {
    height: 36px; padding: 0 10px; border: 1px solid #d3d9df; border-radius: 8px; background: #fff; font-size: 13px;
    transition: border-color .15s, box-shadow .15s;
}
.input:focus, .form input:focus, .form select:focus { outline: none; border-color: #e8b13c; box-shadow: 0 0 0 3px rgba(232, 177, 60, .22); }
.btn, .form button, button.btn {
    height: 36px; padding: 0 20px; border-radius: 8px; background: linear-gradient(#2e2e2e, #141414);
    color: #ffd36b; font: bold 13px/36px var(--font); box-shadow: 0 1px 0 #000;
}
.btn:hover, .form button:hover { background: linear-gradient(#3e3e3e, #1e1e1e); color: #fff; }
.filter { gap: 12px 16px; padding: 16px; border: 1px solid #ebe7de; border-radius: 12px; background: #faf8f4; }
.filter .field { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.filter .field > label, .filter .field > .label { color: #6b6b6b; font-size: 11px; font-weight: bold; letter-spacing: .04em; text-transform: uppercase; }
.filter .field select, .filter .field input[type="text"], .filter .field input[type="search"] { max-width: none; }
.filter .range { gap: 6px; }
.filter .range input { width: 70px !important; }
.filter .actions { display: flex; align-items: center; gap: 14px; }
.reset-link { color: #6b6b6b; font-size: 12px; }
details.hint { margin: 0 0 14px; border: 1px solid #ebe7de; border-radius: 10px; background: #fff; }
details.hint > summary { padding: 9px 14px; color: #6b5a2c; font-size: 13px; cursor: pointer; list-style: none; }
details.hint > summary::-webkit-details-marker { display: none; }
details.hint > summary::before { content: "ⓘ  "; color: #c98d1a; }
details.hint ul { margin: 0; padding: 0 14px 12px 32px; color: #555; }
/* skills of a class: sticky level chips */
.level-nav { position: sticky; top: 72px; z-index: 30; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 8px 0; background: rgba(255, 255, 255, .95); backdrop-filter: blur(4px); }
.level-nav a { min-width: 40px; padding: 5px 10px; border-radius: 999px; background: #f1f1f1; color: #333; font-size: 13px; text-align: center; text-decoration: none; }
.level-nav a:hover { background: #1b1b1b; color: #ffd36b; }
.section-title { display: flex; align-items: center; gap: 10px; font-weight: bold; scroll-margin-top: 130px; }
.section-title::before { content: ""; width: 4px; height: 20px; border-radius: 2px; background: linear-gradient(#f3c55a, #c98d1a); }
@media (max-width: 1023px) { .level-nav { top: 0; } }

/* calculators */
.quick-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 0; color: #6b6b6b; font-size: 12px; }
.quick-pick .chip { text-decoration: none; }
.meter { display: inline-block; width: 60px; height: 6px; margin-right: 6px; overflow: hidden; vertical-align: middle; border-radius: 3px; background: #ececec; }
.meter > span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #e8b13c, #5fa83a); }
.meter-val { color: #555; }

/* maps: zone cards */
.zone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 0 0 18px; padding: 0; list-style: none; }
.zone-card { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 10px; background: #2a241a; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.zone-card img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.zone-card span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); color: #fff; font-size: 13px; font-weight: bold; }
.zone-card:hover img, .zone-card:focus-visible img { transform: scale(1.06); }
.zone-card:hover span { color: #ffd36b; }

/* wide screens: news picture keeps full width but a sane height; paired calculators side by side */
.news-figure img { display: block; width: 100%; max-height: 520px; object-fit: cover; border-radius: 12px; }
#speed-calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(520px, 1fr)); gap: 0 18px; align-items: start; }
@media (max-width: 1099px) { #speed-calc { grid-template-columns: 1fr; } }

/* news detail: no card frame, text sits on the page */
.news-article { margin: 0 0 24px; }
.news-article .page-title { font-size: 28px; font-weight: bold; line-height: 1.25; }
.news-article .rich, .news-article .article-lead { font-size: 15px; line-height: 1.7; }
.news-article .rich p { margin: 0 0 14px; }

/* craft calculator */
.calc-head { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 16px; }
.calc-head > img { flex: none; width: 48px; height: 48px; border-radius: 8px; }
.calc-head .page-title { margin: 0 0 8px; font-size: 22px; }
.calc-head .page-title a { text-decoration: none; }
.craft-calc { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.craft-calc .card { margin: 0; }
.craft-price { width: 110px; text-align: right; }
.craft-summary { position: sticky; top: 84px; padding: 16px; border: 1px solid #5b4a24; border-radius: 12px; background: radial-gradient(120% 80% at 0 0, #2a2c33 0, #17181c 60%, #111215 100%); color: #d9d9d9; }
.craft-summary .field { display: flex; flex-direction: column; gap: 6px; color: #9a9ca3; font-size: 11px; font-weight: bold; letter-spacing: .04em; text-transform: uppercase; }
.craft-summary dl { margin: 14px 0; }
.craft-summary dl div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dotted rgba(255, 255, 255, .1); }
.craft-summary dt { color: #9a9ca3; }
.craft-summary dd { margin: 0; color: #fff; font-weight: bold; }
.craft-summary dd[data-grand] { color: #ffd36b; font-size: 18px; }
.craft-summary button { width: 100%; }
.craft-summary .note { margin: 10px 0 0; color: #8f9198; font-size: 11px; }
@media (max-width: 899px) { .craft-calc { grid-template-columns: 1fr; } .craft-summary { position: static; } }

/* section nav in the aside: scrollspy */
.toc-side { padding: 10px 6px; border: 1px solid #e7e4df; border-radius: 10px; background: #fff; }
.toc-side .page-toc { display: flex; flex-direction: column; gap: 1px; margin: 0; }
.toc-side .page-toc a {
    display: block; padding: 6px 10px; border-radius: 6px; background: none; color: #444; font-size: 13px;
    border-left: 3px solid transparent;
}
.toc-side .page-toc a:hover { background: #f6f3ec; color: #111; }
.toc-side .page-toc a.active { border-left-color: #e8b13c; background: #fbf6e8; color: #111; font-weight: bold; }
.toc-title { margin: 0 0 4px; padding: 0 10px; color: #6b6b6b; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }

/* section cards in the main column */
.detail-main .card { padding: 18px 20px; border-color: #e7e4df; border-radius: 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); scroll-margin-top: 80px; }
.detail-main .card-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: bold; color: #1b1b1b; }
.detail-main .card-title::before { content: ""; flex: none; width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(#f3c55a, #c98d1a); }
.detail-main .card-title .count { margin-left: 2px; color: #6b6b6b; font-size: 13px; font-weight: normal; }
.detail-main .sub-title { margin: 18px 0 8px; color: #555; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
#comments { scroll-margin-top: 80px; }

/* related links */
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.related li, .related a > span { min-width: 0; }
.related a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #ececec; border-radius: 8px; color: #222; text-decoration: none; }
.related a:hover { border-color: #e8b13c; background: #fffaf0; }
.related img { flex: none; width: 32px; height: 32px; border-radius: 6px; }
.related .r-name { display: block; overflow: hidden; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.related .r-sub { display: block; color: #6b6b6b; font-size: 11px; }

/* long tables collapse behind "show all" */
tr.is-collapsed { display: none; }
.show-all { display: block; width: 100%; margin: 8px 0 0; padding: 8px; border: 1px dashed #d8d8d8; border-radius: 8px; background: #fafafa; color: #8a5c00; font: bold 12px var(--font); cursor: pointer; }
.show-all:hover { border-color: #e8b13c; background: #fffaf0; }
/* sortable table headers */
table.data th[data-sort] { cursor: pointer; user-select: none; }
table.data th[data-sort]::after { content: " ↕"; opacity: .45; font-size: 10px; }
table.data th[data-sort][aria-sort="ascending"]::after { content: " ↑"; opacity: 1; }
table.data th[data-sort][aria-sort="descending"]::after { content: " ↓"; opacity: 1; }

/* toast + back to top */
.toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 300; padding: 9px 16px; border-radius: 999px;
    background: #1b1b1b; color: #fff; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    transform: translate(-50%, 20px); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.to-top {
    position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; place-items: center; width: 42px; height: 42px;
    border: 0; border-radius: 50%; background: linear-gradient(#3a3a3a, #141414); color: #ffd36b; font-size: 18px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25); cursor: pointer; opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; pointer-events: none;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

@media (max-width: 1099px) {
    .detail { grid-template-columns: 1fr; grid-template-areas: "aside" "main"; gap: 16px; }
    .detail-aside { position: static; max-height: none; overflow: visible; }
    .toc-side { position: sticky; top: 0; z-index: 40; padding: 6px; border-radius: 0 0 10px 10px; box-shadow: 0 4px 10px rgba(0, 0, 0, .06); }
    .toc-title { display: none; }
    .toc-side .page-toc { flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; }
    .toc-side .page-toc a { flex: none; padding: 5px 12px; border-left: 0; border-radius: 999px; background: #f3f3f3; white-space: nowrap; }
    .toc-side .page-toc a.active { background: #1b1b1b; color: #ffd36b; font-weight: normal; }
}
@media (max-width: 639px) {
    .detail-main .card { padding: 14px; }
    .detail .obj-card .name { font-size: 17px; }
}

/* location map with CSS markers */
.loc-map { position: relative; display: inline-block; max-width: 100%; line-height: 0; background: #ddd; }
.loc-map img { display: block; }
.loc-map .marker {
    position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
    background: #ff2a00; border: 1px solid #fff; box-shadow: 0 0 2px #000;
}
.loc-map .map-missing { display: block; padding: 40px 20px; line-height: 1.4; text-align: center; color: var(--c-muted); }
.map-dialog { max-width: min(96vw, 1100px); max-height: 96vh; padding: 0; background: #000; }
.map-dialog::backdrop { background: rgba(0, 0, 0, .7); }
.map-dialog .close { position: absolute; top: 6px; right: 6px; z-index: 2; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; margin-bottom: 20px; }
.map-grid figure { margin: 0; }
.map-grid figcaption { margin-top: 4px; }

/* tooltip (item/skill) */
.tooltip {
    position: absolute; z-index: 9999; max-width: 320px; padding: 8px 10px;
    background: rgba(18, 18, 18, .96); color: #eee; border: 1px solid #555; border-radius: var(--radius);
    font-size: 11px; line-height: 1.4; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.tooltip .tt-name { font-size: 13px; font-weight: bold; margin-bottom: 4px; }
.tooltip .q-common { color: #ddd !important; }
.tooltip .q-rare { color: #5fd03f !important; }
.tooltip .q-legend { color: #4bb0ff !important; }
.tooltip .q-unique { color: #ffc103 !important; }
.tooltip .q-epic { color: #ff8033 !important; }
.tooltip .q-junk, .tooltip .q-default { color: #eee !important; }
.tooltip .tt-row { color: #ccc; }
.tooltip .tt-muted { color: #aaa; }
@media (hover: none) { .tooltip { display: none !important; } }

/* gallery */

/* ------------------------------------------------------------------ */
/* responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 1359px) {
    .main-menu .menu > li > a .mi, .main-menu summary .mi { display: none; }
    .main-menu .menu > li > a, .main-menu summary { padding: 0 8px; }
}

@media (max-width: 1279px) {
    .head-top { background-position: -90px 0; }
    .logo { left: 300px; }
    .search { width: min(480px, calc(100% - 560px)); }
}

@media (max-width: 1023px) {
    :root { --fs: 13px; }
    .head-top {
        height: auto;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas: "logo burger" "search search";
        gap: 10px;
        align-items: center;
        padding: 10px 16px 12px;
        background: linear-gradient(#fff, #f3f3f3);
        border-bottom: 1px solid #ddd;
    }
    .logo { position: static; grid-area: logo; width: 150px; height: 69px; background-size: contain; }
    .burger {
        grid-area: burger;
        display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
        width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 8px;
        background: linear-gradient(#2e2e2e, #151515); cursor: pointer;
    }
    .burger span { display: block; height: 3px; background: #fff; border-radius: 2px; }
    .search { position: relative; right: auto; bottom: auto; grid-area: search; width: 100%; }
    .search .input { height: 42px; font-size: 16px; }
    .search-kbd { display: none; }

    /* the black bar becomes a slide-in drawer */
    .main-menu {
        position: fixed; inset: 0 0 0 auto; z-index: 200;
        width: min(310px, 86vw); margin: 0; border-radius: 0; overflow-y: auto;
        background: #1b1b1b; box-shadow: -4px 0 18px rgba(0, 0, 0, .4);
        transform: translateX(105%); visibility: hidden; transition: transform .2s ease, visibility .2s;
    }
    .nav-open .main-menu { transform: none; visibility: visible; }
    .nav-open .menu-backdrop { display: block; position: fixed; inset: 0; z-index: 150; background: rgba(0, 0, 0, .45); }
    .main-menu .menu { flex-direction: column; padding: 12px 0 30px; }
    .main-menu .menu > li { display: block; }
    .main-menu .menu > li > a, .main-menu summary { margin: 0; min-height: 50px; padding: 0 18px; border-radius: 0; font-size: 16px; border-bottom: 1px solid #2c2c2c; }
    .main-menu .menu > li > a .mi, .main-menu summary .mi { display: block; width: 28px; height: 28px; margin-right: 12px; }
    .main-menu .menu > li > a, .main-menu summary { justify-content: flex-start; gap: 0; margin: 0; }
    .main-menu .menu > li + li::before { display: none; }
    .main-menu .mt { flex: 1; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 10px; }
    .main-menu .ml { font-size: 16px; }
    .main-menu .mc { margin: 0; color: #6b6b6b; font-size: 12px; }
    .main-menu summary::after { margin-left: 10px; }
    .main-menu details { display: block; }
    .main-menu .menu > li.current > a,
    .main-menu .menu > li.current > details > summary { box-shadow: inset 4px 0 0 #e8b13c; }
    .main-menu .dd-menu, .main-menu .dd-calc { position: static; display: grid; grid-template-columns: 1fr; gap: 6px; min-width: 0; padding: 8px 12px 12px; border-radius: 0; box-shadow: none; background: #121212; }
    .main-menu .mini-tile { padding: 8px 10px; }

    .content { padding: 18px 16px 40px; }
    .footer { padding: 22px 16px 130px; background-position: right 16px bottom; background-size: 150px auto; }
    .link-list { columns: 2 160px; }
}

@media (max-width: 639px) {
    h1, .page-title, .highlight { font-size: 20px; }
    .filter { grid-template-columns: 1fr; }
    .filter .field { grid-template-columns: 110px minmax(0, 1fr); }
    .filter .field select, .filter .field input[type="text"], .filter .field input[type="search"] { max-width: none; }
    table.data .hide-sm { display: none; }
    table.props th { width: auto; }
    .obj-head .name { font-size: 20px; }
}

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

/* === content: news, articles, Q&A, gallery, search === */
.entry-list { margin: 0 0 10px; padding: 0; list-style: none; }
.entry-list.cards-2 { gap: 0 18px; }
.entry { display: flex; flex-direction: column; gap: 4px; }
.entry-date { display: block; font-size: 11px; color: var(--c-muted); margin: 0 0 4px; }
.entry-title { font-size: 16px; margin: 0; line-height: 1.35; }
.reading { max-width: none; }
.reading .page-title { margin-bottom: 6px; }
.reading .rich { font-size: 13px; line-height: 1.6; }
.more-link { margin: 10px 0 20px; }
.qa-body { margin: 10px 0 15px; font-size: 13px; overflow-wrap: anywhere; }
.search-page { display: flex; gap: 10px; margin-bottom: 14px; }
.search-page .input { flex: 1 1 auto; min-width: 0; height: 28px; font-size: 13px; }
.search-page .btn { height: 28px; line-height: 28px; }
.search-group { scroll-margin-top: 12px; }
.search-group .count { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 10px; background: var(--c-dark); color: #fff; font-size: 11px; line-height: 18px; text-align: center; vertical-align: middle; }
.search-group .more-link { margin: 8px 0 0; }
.search-links { margin: 0; }
.search-group td.name, .qa-list td.name { overflow-wrap: anywhere; }
/* === gamedb items === */
.reset-link { margin-left: 10px; line-height: 22px; }
.obj-card .obj-head { margin: 0 0 10px; }
.obj-card .facts { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0; padding: 0; list-style: none; }
.obj-card .facts li { background: var(--c-panel); border-radius: 12px; padding: 3px 10px; font-size: 12px; }
.obj-card .facts span { color: #6b6b6b; margin-right: 4px; }
.sub-title { font-size: 14px; font-weight: bold; margin: 14px 0 8px; }
.card > .sub-title:first-of-type { margin-top: 0; }
table.props td.descr, .rich.descr { color: #6b6b6b; }
table.props td.abil { color: #b85f0c; }
table.props td.charge { color: #c2510f; }
.set-parts { list-style: none; margin: 0 0 10px; padding: 0; }
.set-parts li { margin: 0 0 3px; }
table.data td .small, table.data td span.small { display: block; color: #6b6b6b; font-size: 10px; margin-top: 2px; }
table.data td.components { text-align: left; white-space: normal; }
table.data td.components a { display: inline-block; margin: 1px; }
table.data td.components .qty { font-size: 10px; color: #6b6b6b; margin-right: 4px; }
table.data td.small.l { text-align: left; }
table.data .set-bonus { margin-top: 4px; }
table.set-stats td.best { color: var(--c-red); font-weight: bold; }
table.set-stats td.sum { color: #1475b3; }
@media (max-width: 479px) {
    table.data .hide-xs { display: none; }
    table.data td.components img { width: 28px; height: 28px; }
}


/* === gamedb world: npcs, quests, skills, titles, gather, zones === */
.npc-props { display: flex; flex-wrap: wrap; gap: 15px 30px; align-items: flex-start; }
.npc-props > div { flex: 1 1 320px; min-width: 0; }
.mob-range { position: relative; width: 340px; max-width: 100%; height: 100px; margin-bottom: 10px; background: no-repeat 0 0; }
.mob-range img { position: absolute; left: 37px; top: 31px; }
.mob-photo img { display: block; border: 1px solid #000; max-width: 200px; }
.xp-table th, .xp-table td { min-width: 48px; }
.race-asmo { color: #7a2a96; display: block; font-size: 10px; }
.race-elyos { color: #b0473d; display: block; font-size: 10px; }
.en2 { display: block; color: #8a6400; }
.level-nav { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 10px; }
.level-nav a { display: inline-block; min-width: 26px; padding: 1px 4px; background: var(--c-dark); color: #fff; font-weight: bold; text-align: center; text-decoration: none; border-radius: 3px; }
.level-nav a:hover { background: #555; color: #fff; }
.class-tree { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px 20px; margin: 25px 0; }
.class-group { text-align: center; }
.class-node { padding: 5px; }
.class-node img { display: block; margin: 0 auto 4px; }
.class-root { padding-bottom: 14px; border-bottom: 1px solid #21568a; margin: 0 25% ; }
.class-children { display: grid; grid-template-columns: 1fr 1fr; position: relative; }
.class-children.single { grid-template-columns: 1fr; }
.class-children > .class-node { border-top: 1px solid transparent; position: relative; padding-top: 14px; }
.class-children > .class-node::before { content: ""; position: absolute; top: 0; left: 50%; height: 12px; border-left: 1px solid #21568a; }
/* a class with one subclass: no horizontal bar, a straight line from the parent down to the child */
.class-group:has(> .class-children.single) .class-root { border-bottom-color: transparent; }
.class-children.single > .class-node::before { top: -14px; height: 26px; }
.class-links { display: block; }
.gather-drops { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.gather-drops > span { display: inline-flex; flex-direction: column; align-items: center; }
.gath-proc { font-size: 10px; }
.loc-figure { margin: 0; }
.loc-figure .loc-map { border: 2px solid #344966; }
.loc-map-empty { display: block; width: 100%; max-width: 450px; aspect-ratio: 450 / 356; }
.loc-map-big { border: 0; }
.loc-map-big img { max-height: 90vh; width: auto; }
.map-dialog .close { padding: 0 10px; font-size: 18px; }
.map-grid.loc-maps { grid-template-columns: repeat(auto-fill, minmax(min(454px, 100%), 1fr)); justify-items: start; }
.npc-props > div { flex: 0 1 640px; }

/* === tools: calculators and world map === */
.calc-card .filter { background: transparent; padding: 0; }
.calc-grid { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 14px; align-items: start; }
.calc-grid > label { font-weight: bold; padding-top: 3px; }
.calc-grid select { max-width: 100%; }
.calc-stack { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.calc-row { display: flex; flex-wrap: wrap; gap: 6px; }
.calc-result { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 16px 0 0; }
.calc-out { display: inline-block; min-width: 3.5em; padding: 1px 6px; border: 1px solid var(--c-input-border); border-radius: 4px; color: var(--c-link); font-weight: bold; text-align: center; }
.form button[type="reset"].btn { background: linear-gradient(#777, #555); }
.translator textarea { display: block; width: 100%; height: auto; min-height: 100px; resize: vertical; }
.translator-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 10px 0; }
.craft-price { width: 70px; text-align: center; }
.abyss-total { font-size: 24px; margin: 0 0 15px; }
.abyss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 20px; margin: 10px 0 15px; }
.abyss-cell { display: flex; gap: 8px; align-items: center; }
.abyss-cell .input { width: 120px; margin-top: 3px; }
.abyss-gap { margin-top: 10px; }
.abyss-form .input { height: 24px; }

/* stigma calculator (old .stigma-* look) */
.stigma-toolbar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 10px; }
.stigma-toolbar #race1, .stigma-toolbar #race2 { padding: 1px 4px; border-radius: 3px; text-decoration: none; }
.stigma-link { display: flex; gap: 8px; align-items: center; margin: 0 0 4px; }
.input-stigmalink { flex: 1; min-width: 0; font-size: 11px; }
.stigma-summary { padding: 4px 0; }
.stigma-summarytable { border: solid 1px #d7d7d7; background-color: #edf2f6; padding: 2px; border-collapse: separate; }
.stigma-summarytable td { padding: 2px; }
.stigmaname { font-size: 11px; font-weight: bold; }
.stigmalevel { font-size: 11px; background: #fff; display: inline-table; border: 1px solid #000; text-align: center; line-height: 18px; }
.stigma-hint { margin: 8px 0; }
.stigma-board-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 10px; }
.stigma-board { position: relative; width: 375px; height: 270px; margin: 0 auto; }
.stigma-board-19 { width: 365px; }
.stigma-slot { position: absolute; width: 82px; height: 78px; z-index: 2; background: url("../img/normalstigma_unused.df6e8dfd5313.png") no-repeat; }
.stigma-slot.slot-adv { background-image: url("../img/advancedstigma_unused.a8f4da03cc46.png"); }
.stigma-slot-icon { position: absolute; width: 46px; height: 45px; z-index: 3; cursor: pointer; }
.highlight5 { font-family: "Times New Roman", Times, serif; color: #2f7fb5; font-size: 24px; font-weight: normal; margin: 8px 0 4px; }
.stigma-items { display: flex; flex-wrap: wrap; }
.stigma-items img, .stigma-trees img[id] { box-sizing: content-box; }
.stigma-adv { max-width: 100%; overflow-x: auto; }
.stigma-trees { display: flex; flex-wrap: wrap; gap: 10px 30px; }
.noborder-table { border-collapse: collapse; }
.noborder-table td { padding: 0; vertical-align: middle; }
.noborder-table td.r { text-align: right; }
.stigma-tree .arrow-top { padding-top: 10px; }
.tooltip hr.aion_tooltip_hr { border: 0; border-top: 1px solid #555; margin: 4px 0; }

/* world map */
.worldmap-select { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.worldmap-select select { min-width: 180px; max-width: 100%; }
.worldmap-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 6px 16px; }
.worldmap-title { font-size: 24px; margin: 0; }
.worldmap-actions { margin: 0; }
.worldmap-container { width: 100%; aspect-ratio: 768 / 608; margin: 10px auto; border: 3px solid #b3b3b3; background: #fff; }
.worldmap-container.is-shaded .leaflet-image-layer { filter: brightness(.55); }
.worldmap-missing { padding: 40px 10px; text-align: center; color: var(--c-muted); background: var(--c-panel); border-radius: var(--radius); }
.worldmap-field { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 6px 12px; align-items: start; }
.worldmap-field label { text-align: right; }
.worldmap-copy { display: flex; gap: 8px; }
.worldmap-copy .input, .worldmap-field textarea { width: 100%; min-width: 0; }
.worldmap-field textarea { height: auto; font-size: 11px; }

@media (max-width: 639px) {
    .calc-grid { grid-template-columns: 1fr; gap: 4px; }
    .calc-grid > label { padding-top: 8px; }
    .calc-grid select, .calc-stack select { width: 100%; }
    .worldmap-field { grid-template-columns: 1fr; }
    .worldmap-field label { text-align: left; }
    .worldmap-copy { flex-direction: column; }
    .card { padding: 12px; }
}
/* gamedb world: header card facts */
.obj-card .obj-head { margin: 0 0 8px; }
.obj-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; list-style: none; color: var(--c-muted); }
.obj-facts b { color: var(--c-text); }
@media (max-width: 479px) { table.data .hide-xs { display: none; } }
.worldmap-container.leaflet-container { background: #fff; }
@media (max-width: 420px) {
    .stigma-board { zoom: .78; }
}

/* === AI news (home cards, news pages) === */
.news-figure { margin: 0 0 14px; }
.news-figure img { display: block; width: 100%; height: auto; border-radius: 8px; background: #1b1b1b; }
.news-figure figcaption { margin-top: 5px; color: var(--c-muted); font-size: 11px; }
.article-lead { font-size: 14px; font-weight: bold; }
.news-sources { margin: 0 0 12px; }
.ai-note { margin-top: 14px; font-style: italic; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--c-panel); font-size: 11px; }


/* === comments archive (plan §15) === */
.comments .note { margin: -4px 0 12px; }
.comment { display: flex; gap: 12px; margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; background: var(--c-panel); }
.comment-avatar { flex: none; width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: #ddd; }
.comment-main { min-width: 0; flex: 1; }
.comment-meta { margin: 0 0 4px; font-size: 11px; color: var(--c-muted); }
.comment-meta b { color: var(--c-text); font-size: 12px; }
.comment-body { overflow-wrap: anywhere; }
.comment-body blockquote { margin: 4px 0; padding: 4px 10px; border-left: 3px solid #bbb; background: #fff; color: #444; }
.comment-body img { max-width: 100%; }
.comments-more > summary { cursor: pointer; margin: 6px 0 10px; color: var(--c-link); font-weight: bold; }
