/* Wiki DofusFM — misma paleta que style.css */
#wiki-view {
    --bg: #cabf9f;
    --bg-light: #ddd3a8;
    --bg-dark: #b8aa78;
    --hdr: #524a3c;
    --hdr-light: #9a8858;
    --hdr-dark: #3b3421;
    --gold: #e6af4d;
    --tx: #1e180a;
    --txl: #4a3c1c;
    --row-a: #b4ac8f;
    --row-b: #cabf9f;
    --tab-sel: #7a7248;
    --tab-unsel: #cbc290;
    --slot-bg: #bdb99a;
    --slot-bd: #908862;
    --orange: #e87018;
    --orange-h: #f08830;
    --orange-bd: #b85010;
    --link: #6b3a00;
    --neg: #a01c0c;
    --pos: #1d5a12;
    --e-N: #6d6458; --e-E: #7a4f1d; --e-F: #b3330c; --e-W: #1f5f9e; --e-A: #2f7a3a;
}
#wiki-view, #wiki-view * { box-sizing: border-box; }
#wiki-view {
    width: 830px; max-width: 100vw; margin: 0 auto 12px;
    color: var(--tx); font-family: Verdana, Tahoma, sans-serif;
    font-size: 12px; line-height: 1.45;
}
#wiki-view a { color: var(--link); text-decoration: none; }
#wiki-view a:hover { text-decoration: underline; }
#wiki-view img { image-rendering: auto; }
#wiki-view button, #wiki-view input, #wiki-view select, #wiki-view textarea, #wiki-view table { font-family: inherit; font-size: inherit; }

/* ── Contenedor (debajo del selector de vista del simulador) ── */
#wk-shell {
    width: 100%; margin: 0;
    border: 3px solid #fff; border-radius: 12px; background: var(--bg);
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
#wk-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: var(--hdr); border-radius: 9px 9px 0 0; padding: 6px 10px;
    border-bottom: 2px solid var(--gold); position: relative; z-index: 20;
}
#wk-bar .wk-search { flex: 1 1 240px; margin-left: auto; max-width: 380px; }
.wk-search { position: relative; flex: 1; max-width: 560px; }
.wk-search input {
    width: 100%; padding: 7px 10px 7px 32px;
    border: 1px solid var(--slot-bd); border-radius: 4px;
    background: var(--bg-light); color: var(--tx); font: inherit;
}
.wk-search input:focus { outline: 2px solid var(--gold); }
.wk-search-ico { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; opacity: .7; }
#wk-results {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px);
    background: var(--bg); border: 1px solid var(--hdr); border-radius: 4px;
    box-shadow: 0 6px 20px rgba(0,0,0,.5);
    max-height: 70vh; overflow-y: auto; z-index: 40;
}
#wk-results .wk-r-group { background: var(--hdr); color: var(--gold); font-size: 11px; padding: 3px 8px; text-transform: uppercase; letter-spacing: .5px; }
#wk-results a { display: flex; align-items: center; gap: 8px; padding: 4px 8px; color: var(--tx); }
#wk-results a:nth-child(odd) { background: var(--row-a); }
#wk-results a.sel, #wk-results a:hover { background: var(--bg-light); text-decoration: none; }
#wk-results .wk-r-empty { padding: 10px; color: var(--txl); }
/* ── Navegación de secciones ──────────────── */
#wk-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; }
.wk-nav-btn {
    display: flex; align-items: center; gap: 7px; cursor: pointer;
    padding: 5px 12px 5px 6px; border-radius: 6px; border: 1px solid transparent;
    background: rgba(255,255,255,.06); color: #f3e7c4; font-weight: bold; font-size: 12px; line-height: 1.15; text-align: left;
}
.wk-nav-btn:hover, .wk-dd.open > .wk-nav-btn { background: rgba(230,175,77,.18); border-color: rgba(230,175,77,.5); text-decoration: none; }
.wk-nav-btn.on, .wk-dd.on > .wk-nav-btn { background: #fe6c0f; color: #fff; border-color: #fff; }
.wk-nav-btn small { display: block; font-weight: normal; font-size: 10px; opacity: .85; }
.wk-sico { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 1px 1px rgba(0,0,0,.45)); }
.wk-caret { width: 0; height: 0; border: 4px solid transparent; border-top-color: currentColor; margin: 4px 0 0 2px; transition: transform .15s; flex-shrink: 0; }
.open > button > .wk-caret { transform: rotate(180deg); margin-top: -4px; }
.wk-dd { position: relative; }
.wk-menu {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 290px;
    background: var(--bg-light); border: 1px solid var(--hdr); border-radius: 8px; padding: 5px;
    box-shadow: 0 10px 26px rgba(0,0,0,.35); z-index: 30;
}
.wk-dd.open > .wk-menu { display: grid; gap: 2px; }
.wk-menu a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; color: var(--tx); }
.wk-menu a:hover { background: #e9dfb8; text-decoration: none; }
.wk-menu a.on { background: var(--hdr); color: var(--gold); }
.wk-menu a.on small { color: #e8dcb5; }
.wk-menu .wk-sico { width: 34px; height: 34px; background: var(--slot-bg); border: 1px solid var(--slot-bd); border-radius: 6px; padding: 2px; }
.wk-menu b { display: block; font-size: 12px; }
.wk-menu small { display: block; color: var(--txl); font-size: 11px; }

/* ── Contenido ────────────────────────────── */
#wk-main {
    width: 100%; background: var(--bg); padding: 14px 18px 24px; border-radius: 0 0 9px 9px;
}
.wk-loading { padding: 40px; text-align: center; color: var(--txl); }
h1.wk-h1 {
    font-size: 1.5em; font-weight: bold; margin: 0 0 4px;
    color: var(--hdr-dark);
}
.wk-sub { color: var(--txl); margin: 0 0 12px; }
.wk-crumbs { font-size: 17px; font-weight: bold; color: var(--txl); margin-bottom: 12px; }
#wiki-view .wk-crumbs a { color: var(--txl); text-decoration: underline; text-underline-offset: 3px; }
h2.wk-h2 {
    background: var(--hdr); color: var(--gold);
    font-size: 13px; margin: 18px 0 0; padding: 5px 10px; border-radius: 4px 4px 0 0;
}
.wk-box { background: var(--row-b); border: 1px solid var(--slot-bd); border-top: 0; padding: 8px 10px; border-radius: 0 0 4px 4px; }
.wk-box.flush { padding: 0; }
.wk-muted { color: var(--txl); }
.wk-small { font-size: 11px; }

/* Portada */
.wk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 12px; }
.wk-card {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-light); border: 1px solid var(--slot-bd); border-radius: 6px;
    padding: 10px; color: var(--tx);
}
.wk-card:hover { text-decoration: none; border-color: var(--hdr); background: #e6ddb6; }
.wk-card img { width: 40px; height: 40px; object-fit: contain; }
.wk-card b { display: block; }
.wk-card small { color: var(--txl); }

/* Filtros */
.wk-filters {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    background: var(--bg-dark); border: 1px solid var(--slot-bd); border-radius: 4px; padding: 8px;
    margin-bottom: 10px;
}
.wk-filters input, .wk-filters select {
    font: inherit; padding: 4px 6px; border: 1px solid var(--slot-bd); border-radius: 3px;
    background: var(--bg-light); color: var(--tx); max-width: 100%;
}
.wk-filters input[type=search] { flex: 1 1 180px; min-width: 140px; }
.wk-filters input[type=number] { width: 70px; }
.wk-filters label { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.wk-count { font-size: 11px; color: var(--txl); margin: 0 0 6px; }

/* Listas */
.wk-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--slot-bd); border-radius: 4px; overflow: hidden; }
.wk-list li { display: flex; align-items: center; gap: 10px; padding: 5px 8px; }
.wk-list li:nth-child(odd) { background: var(--row-a); }
.wk-list li:nth-child(even) { background: var(--row-b); }
.wk-list .wk-name { flex: 1; min-width: 0; }
.wk-list .wk-name a { font-weight: bold; }
.wk-list .wk-lvl { flex-shrink: 0; font-size: 11px; color: var(--txl); min-width: 52px; text-align: right; }
.wk-list .wk-fx-mini { font-size: 11px; color: var(--txl); }
.wk-more { display: block; margin: 10px auto 0; }

.wk-btn {
    background: var(--orange); border: 1px solid var(--orange-bd); color: #fff;
    padding: 5px 14px; border-radius: 4px; font: inherit; font-weight: bold; cursor: pointer;
}
.wk-btn:hover { background: var(--orange-h); }

/* Iconos */
.wk-ico { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; background: var(--slot-bg); border: 1px solid var(--slot-bd); border-radius: 4px; padding: 2px; }
.wk-ico.sm { width: 26px; height: 26px; }
.wk-ico.lg { width: 96px; height: 96px; padding: 6px; }
.wk-ico.mon { background: transparent; border: 0; }
.wk-ico.mon.lg { width: 200px; height: 200px; }
.wk-spell {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; flex-shrink: 0; border-radius: 6px;
    background: #7a5420;
    border: 1px solid #3b2a10; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.wk-spell.b2 { background: #2c5a87; }
.wk-spell.b3 { background: #6a2f85; }
.wk-spell img { width: 74%; height: 74%; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.wk-spell.lg { width: 72px; height: 72px; border-radius: 10px; }
.wk-spell.sm { width: 26px; height: 26px; border-radius: 4px; }

/* Ficha */
.wk-head { display: flex; gap: 16px; align-items: flex-start; }
.wk-head-info { flex: 1; min-width: 0; }
.wk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.wk-tag { background: var(--hdr); color: var(--gold); border-radius: 3px; padding: 1px 7px; font-size: 11px; }
.wk-tag a { color: var(--gold); }
.wk-desc { font-style: italic; color: var(--txl); margin: 8px 0 0; }
.wk-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.wk-cols > div { min-width: 0; }
.wk-cols.wk-cols-1, .wk-cols:has(> div:last-child:empty) { grid-template-columns: 1fr; }
.wk-cols > div:last-child:empty { display: none; }

.wk-fx { list-style: none; margin: 0; padding: 0; }
.wk-fx li { padding: 3px 8px; display: flex; gap: 6px; align-items: center; }
.wk-fx li:nth-child(odd) { background: var(--row-a); }
.wk-fx li.neg { color: var(--neg); }
.wk-fx li.dmg { font-weight: bold; }
.wk-fx li img { width: 16px; height: 16px; }
.wk-fx .e-N { color: var(--e-N); } .wk-fx .e-E { color: var(--e-E); } .wk-fx .e-F { color: var(--e-F); }
.wk-fx .e-W { color: var(--e-W); } .wk-fx .e-A { color: var(--e-A); }

.wk-kv { display: grid; grid-template-columns: max-content 1fr; }
.wk-kv > * { padding: 3px 8px; }
.wk-kv > :nth-child(4n+1), .wk-kv > :nth-child(4n+2) { background: var(--row-a); }
.wk-kv dt { font-weight: bold; color: var(--txl); }
.wk-kv dd { margin: 0; }

table.wk-t { width: 100%; border-collapse: collapse; font-size: 12px; }
table.wk-t th { background: var(--hdr-light); color: #fff; padding: 4px 6px; text-align: left; font-weight: bold; white-space: nowrap; }
table.wk-t td { padding: 4px 6px; vertical-align: middle; }
table.wk-t tr:nth-child(even) td { background: var(--row-a); }
table.wk-t td.c, table.wk-t th.c { text-align: center; }
table.wk-t img.res { width: 16px; height: 16px; vertical-align: middle; }
.wk-tscroll { overflow-x: auto; }

.wk-chip { display: inline-flex; align-items: center; gap: 4px; margin: 2px 6px 2px 0; white-space: nowrap; }
.wk-chip img { width: 22px; height: 22px; object-fit: contain; }
.wk-inline-ico { display: inline-flex; align-items: center; gap: 6px; }

.wk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.wk-grid > a, .wk-grid > div { display: flex; align-items: center; gap: 8px; background: var(--row-a); padding: 5px 8px; border-radius: 4px; color: var(--tx); }
.wk-grid > a:hover { background: var(--bg-light); text-decoration: none; }

.wk-lvtabs { display: flex; gap: 2px; flex-wrap: wrap; margin: 8px 0 0; }
.wk-lvtabs button { font: inherit; font-weight: bold; padding: 4px 12px; border: 1px solid var(--slot-bd); border-bottom: 0; background: var(--tab-unsel); border-radius: 4px 4px 0 0; cursor: pointer; }
.wk-lvtabs button.on { background: var(--hdr); color: var(--gold); }

.wk-swatch { display: inline-block; width: 18px; height: 18px; border: 1px solid #0006; border-radius: 3px; vertical-align: middle; margin-right: 2px; }
.wk-note { background: var(--bg-light); border-left: 3px solid var(--orange); padding: 6px 10px; margin: 10px 0; font-size: 12px; }

/* Pie */
#wk-footer { background: transparent; color: #bfb48f; margin: 0; text-align: center; font-size: 11px; padding: 12px 16px; }
#wk-footer p { margin: 3px 0; }
#wk-footer a { color: var(--gold); }


/* ── Diseño visual: portada ───────────────── */
.wk-hero {
    position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px;
    background: var(--hdr); color: #f3e7c4;
    border: 2px solid var(--gold); border-radius: 10px; padding: 18px 20px; margin-bottom: 6px;
}
.wk-hero h1.wk-h1 { color: var(--gold); font-size: 1.9em; text-shadow: 0 2px 0 #0008; }
.wk-hero p { margin: 0 0 12px; max-width: 620px; }
.wk-hero-art { display: grid; grid-template-columns: repeat(3, 64px); gap: 2px; flex-shrink: 0; }
.wk-hero-art img { width: 64px; height: 64px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.55)); }
.wk-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.wk-stat { display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,.25); border: 1px solid rgba(230,175,77,.4); border-radius: 20px; padding: 3px 12px 3px 4px; }
.wk-stat img { width: 24px; height: 24px; object-fit: contain; }
.wk-stat b { color: var(--gold); font-size: 1.15em; }
.wk-stat span { font-size: 11px; opacity: .85; }
.wk-card { transition: transform .12s, box-shadow .12s; }
.wk-card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.wk-card img { width: 48px; height: 48px; background: var(--slot-bg); border: 1px solid var(--slot-bd); border-radius: 8px; padding: 3px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
.wk-h2 + .wk-cards { margin-top: 8px; }
h2.wk-h2 { display: flex; align-items: center; gap: 7px; }
h2.wk-h2 > img { width: 20px; height: 20px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.wk-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.wk-classes a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 8px; background: var(--bg-light); border: 1px solid var(--slot-bd); color: var(--tx); text-align: center; transition: transform .12s; }
.wk-classes a:hover { transform: translateY(-2px); text-decoration: none; border-color: var(--hdr); }
.wk-classes img { width: 70px; height: 70px; }
.wk-classes small { color: var(--txl); font-size: 10px; }
.wk-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 8px; }
.wk-box.wk-tiles { margin-top: 0; }
.wk-tile { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; padding: 8px 4px; border-radius: 8px; background: var(--bg-light); border: 1px solid var(--slot-bd); color: var(--tx); font-size: 11px; }
.wk-tile:hover { text-decoration: none; border-color: var(--hdr); background: #e9dfb8; }
.wk-tile .wk-ico { width: 56px; height: 56px; }
.wk-tile small { color: var(--txl); }

/* ── Filtros con desplegables ─────────────── */
.wk-filters { background: var(--bg-dark); position: relative; z-index: 10; }
.wk-lvl-in img { width: 16px; height: 16px; }
.wk-sel { position: relative; }
.wk-sel-btn {
    display: flex; align-items: center; gap: 6px; cursor: pointer; min-height: 28px; max-width: 240px;
    padding: 3px 8px 3px 4px; border: 1px solid var(--slot-bd); border-radius: 5px; background: var(--bg-light); color: var(--tx);
}
.wk-sel-btn > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-sel-btn img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.wk-sel.set > .wk-sel-btn { border-color: var(--orange-bd); background: #f3e2b0; font-weight: bold; }
.wk-sel-btn:hover { border-color: var(--hdr); }
.wk-sel-pop {
    display: none; position: absolute; top: calc(100% + 4px); left: 0; min-width: 230px; max-width: 320px;
    background: var(--bg-light); border: 1px solid var(--hdr); border-radius: 8px; box-shadow: 0 10px 26px rgba(0,0,0,.35); z-index: 40; padding: 4px;
}
.wk-sel.open > .wk-sel-pop { display: block; }
.wk-sel-q { width: 100%; margin-bottom: 4px; }
.wk-sel-list { max-height: 320px; overflow-y: auto; display: grid; gap: 1px; }
.wk-sel-list button { display: flex; align-items: center; gap: 8px; text-align: left; padding: 4px 6px; border: 0; border-radius: 5px; background: transparent; color: var(--tx); cursor: pointer; }
.wk-sel-list button[hidden] { display: none; }
.wk-sel-list button:hover { background: #e9dfb8; }
.wk-sel-list button.on { background: var(--hdr); color: var(--gold); }
.wk-sel-list img { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }
.wk-sel-dot { width: 24px; height: 24px; flex-shrink: 0; display: grid; place-items: center; }
.wk-sel-dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hdr-light); }
.wk-view { display: flex; margin-left: auto; border: 1px solid var(--slot-bd); border-radius: 5px; overflow: hidden; }
.wk-view button { width: 30px; height: 28px; border: 0; background: var(--bg-light); cursor: pointer; display: grid; place-items: center; }
.wk-view button.on { background: var(--hdr); }
.wk-view i { display: block; width: 14px; height: 14px; }
.wk-i-grid { background: conic-gradient(from 90deg, currentColor 25%, transparent 0 50%, currentColor 0 75%, transparent 0) 0 0 / 8px 8px; color: var(--hdr); }
.wk-i-list { background: repeating-linear-gradient(180deg, var(--hdr) 0 3px, transparent 3px 5.5px); }
.wk-view button.on .wk-i-grid { color: var(--gold); }
.wk-view button.on .wk-i-list { background: repeating-linear-gradient(180deg, var(--gold) 0 3px, transparent 3px 5.5px); }

/* ── Filas y tarjetas ─────────────────────── */
.wk-list li:has(> .wk-row) { padding: 0; }
.wk-row { display: flex; align-items: center; gap: 10px; padding: 5px 8px; color: var(--tx); width: 100%; min-width: 0; }
.wk-row:hover { background: rgba(255,255,255,.22); text-decoration: none; }
.wk-row .wk-name b { color: var(--link); }
.wk-row:hover .wk-name b { text-decoration: underline; }
.wk-row .wk-name small { display: block; font-size: 11px; color: var(--txl); }
.wk-row .wk-lvl, .wk-list .wk-row .wk-lvl {
    min-width: 0; background: var(--hdr); color: var(--gold); border-radius: 10px; padding: 1px 8px; font-weight: bold; font-size: 11px;
}
.wk-row .wk-lvl::before { content: "Nv. "; font-weight: normal; opacity: .8; }
.wk-fxm { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 2px; font-size: 11px; }
.wk-fxm span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.wk-fxm img { width: 14px; height: 14px; object-fit: contain; }
.wk-fxm .neg { color: var(--neg); }
.wk-row.mon .wk-ico { width: 48px; height: 48px; }

.wk-list.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; border: 0; overflow: visible; }
.wk-list.grid.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.wk-list.grid li, .wk-list.grid li:nth-child(odd), .wk-list.grid li:nth-child(even) {
    background: var(--bg-light); border: 1px solid var(--slot-bd); border-radius: 8px; overflow: hidden; transition: transform .12s, box-shadow .12s;
}
.wk-list.grid li:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,.18); border-color: var(--hdr); }
.wk-list.grid .wk-row { position: relative; align-items: flex-start; padding: 8px; height: 100%; }
.wk-list.grid .wk-row:hover { background: transparent; }
.wk-list.grid .wk-ico { width: 52px; height: 52px; border-radius: 8px; }
.wk-list.grid .wk-row.mon .wk-ico { width: 64px; height: 64px; }
.wk-list.grid .wk-lvl { position: absolute; top: 6px; right: 6px; }
.wk-list.grid .wk-name { padding-right: 52px; }
.wk-list.grid .wk-fxm { display: grid; gap: 1px; margin-top: 4px; }
.wk-mosaic { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.wk-mosaic .wk-ico { width: 32px; height: 32px; }
.wk-list.grid .wk-mosaic .wk-ico { width: 34px; height: 34px; border-radius: 5px; }
.wk-mosaic.lg { display: grid; grid-template-columns: repeat(4, 52px); gap: 4px; margin: 0; flex-shrink: 0; }
.wk-mosaic.lg .wk-ico { width: 52px; height: 52px; border-radius: 6px; }
.wk-mosaic.lg.mon { grid-template-columns: repeat(2, 64px); }
.wk-mosaic.lg.mon .wk-ico { width: 64px; height: 64px; }

/* ── Cabecera de ficha ────────────────────── */
.wk-head {
    background: var(--hdr); color: #f3e7c4;
    border: 2px solid var(--gold); border-radius: 10px; padding: 14px; align-items: center; margin-bottom: 4px;
}
.wk-head h1.wk-h1 { color: var(--gold); text-shadow: 0 2px 0 #0008; }
.wk-head .wk-desc, .wk-head .wk-muted { color: #d9cba0; }
.wk-head a { color: #ffd27a; }
.wk-head > .wk-ico.lg, .wk-head-ico .wk-ico.lg { background: var(--bg-light); border: 0; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.45); }
.wk-head > .wk-ico.mon.lg, .wk-head-ico .wk-ico.mon.lg { background: transparent; border: 0; box-shadow: none; filter: drop-shadow(0 4px 4px rgba(0,0,0,.6)); }
.wk-head-ico { flex-shrink: 0; }
.wk-head .wk-mosaic .wk-ico { background: var(--bg-light); border-color: transparent; }
.wk-head .wk-mosaic.mon .wk-ico { background: transparent; }
.wk-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 4px; border-radius: 12px; border: 1px solid rgba(230,175,77,.45); }
.wk-tag:not(:has(img)) { padding-left: 9px; }
.wk-tag img { width: 16px; height: 16px; object-fit: contain; }
.wk-head .wk-tag { background: rgba(0,0,0,.3); }
.wk-head .wk-tag, .wk-head .wk-tag a, .wk-wiki .wk-head a.wk-tag { color: #ffd27a !important; font-weight: bold; }
.wk-head a.wk-tag:hover, .wk-head .wk-tag a:hover { background: rgba(0,0,0,.45); text-decoration: none; color: #fff3d2 !important; }
table.wk-t td .pos { color: var(--pos); font-weight: bold; }
table.wk-t td .neg { color: var(--neg); font-weight: bold; }
.wk-mounts > a { align-items: center; }
.wk-mount-dot { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--hdr); flex-shrink: 0;  }
.wk-mount-dot.lg { display: block; width: 96px; height: 96px; border-color: var(--gold); }

/* ── Móvil ────────────────────────────────── */
@media (max-width: 1319px) {
    #wk-bar .wk-search { order: -1; flex-basis: 100%; max-width: none; }
    #wk-main { padding: 10px 10px 20px; }
    .wk-cols { grid-template-columns: 1fr; }
    .wk-head { flex-direction: column; align-items: center; text-align: center; }
    .wk-head .wk-tags { justify-content: center; }
    .wk-ico.mon.lg { width: 160px; height: 160px; }
    h1.wk-h1 { font-size: 18px; }
    .wk-list .wk-fx-mini { display: none; }
    #wk-nav { padding: 6px 8px; gap: 4px; }
    .wk-nav-btn { padding: 4px 8px 4px 4px; font-size: 11px; }
    .wk-nav-btn small { display: none; }
    .wk-dd { position: static; }
    .wk-menu { left: 8px; right: 8px; min-width: 0; }
    .wk-hero { flex-direction: column; text-align: center; padding: 14px; }
    .wk-hero-art { grid-template-columns: repeat(6, 44px); }
    .wk-hero-art img { width: 44px; height: 44px; }
    .wk-stats { justify-content: center; }
    .wk-list.grid, .wk-list.grid.wide { grid-template-columns: 1fr; }
    .wk-sel-btn { max-width: 170px; }
    .wk-sel-pop { min-width: 210px; }
    .wk-view { margin-left: 0; }
    .wk-mosaic.lg { grid-template-columns: repeat(4, 44px); }
    .wk-mosaic.lg .wk-ico { width: 44px; height: 44px; }
}

/* Menú de la wiki: textos blancos (el color de enlace de #wiki-view no aplica aquí) */
#wiki-view .wk-nav-btn, #wiki-view .wk-nav-btn:hover,
#wiki-view .wk-nav-btn.on, #wiki-view .wk-dd.on > .wk-nav-btn { color: #fff; text-decoration: none; }

/* Barra de la wiki centrada: menú arriba y buscador debajo, ambos al centro */
#wk-bar { justify-content: center; }
#wk-nav { justify-content: center; flex-basis: 100%; }
#wk-bar .wk-search { margin: 0 auto; flex: 0 1 560px; max-width: 100%; }

/* Buscador en blanco */
#wiki-view .wk-search input { background: #fff; border-color: #fff; color: var(--tx); }

/* ── Carga: loader propio, entrada escalonada del contenido y shimmer de imágenes ── */
#wiki-view .wk-loading { padding: 70px 20px 60px; display: flex; justify-content: center; }
#wiki-view .wk-r-loading { padding: 18px; display: flex; justify-content: center; }
#wiki-view .wk-r-loading .dfm-ld { --ld-size: 38px; }

#wk-main.wk-enter > * { animation: wkIn .4s ease-out both; }
#wk-main.wk-enter > *:nth-child(2) { animation-delay: .04s; }
#wk-main.wk-enter > *:nth-child(3) { animation-delay: .08s; }
#wk-main.wk-enter > *:nth-child(4) { animation-delay: .12s; }
#wk-main.wk-enter > *:nth-child(5) { animation-delay: .16s; }
#wk-main.wk-enter > *:nth-child(n+6) { animation-delay: .2s; }
#wiki-view .wk-pg.wk-enter > * { animation: wkIn .3s ease-out both; }
@keyframes wkIn { from { opacity: 0; } to { opacity: 1; } }

#wiki-view img.wk-ico:not(.ld),
#wiki-view .wk-spell img:not(.ld),
#wiki-view .wk-sel img:not(.ld) {
    background-image: linear-gradient(100deg, rgba(255,255,255,0) 25%, rgba(255,240,210,.75) 50%, rgba(255,255,255,0) 75%);
    background-size: 220% 100%;
    animation: wkShimmer 1.05s linear infinite;
    border-radius: 4px;
}
#wiki-view img.wk-ico.mon:not(.ld) { background-color: rgba(82,74,60,.18); }
#wiki-view img.ld { animation: dfmImgIn .32s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes wkShimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

@media (prefers-reduced-motion: reduce) {
    #wk-main.wk-enter > *, #wiki-view .wk-pg.wk-enter > *, #wiki-view img.ld { animation: none; }
}
#wiki-view .dfm-ld > img { animation: dfmLdPulse 1.1s ease-in-out infinite alternate; background: none; filter: brightness(.32); }

/* Ficha de objeto: secciones a todo el ancho, set en lista */
.wk-ico.md { width: 40px; height: 40px; }
table.wk-t td .wk-inline-ico { gap: 8px; }
.wk-grid.wk-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wk-set-name { padding: 6px 8px; font-weight: bold; }
.wk-list.wk-list-flat { border: 0; border-radius: 0; }
.wk-list li.cur .wk-row { background: var(--bg-light); }
.wk-h2-lvl { color: var(--hdr-light, #e6af4d); font-size: 12px; font-weight: normal; opacity: .9; }
@media (max-width: 1319px) {
    .wk-grid.wk-grid-2 { grid-template-columns: 1fr; }
    .wk-ico.md { width: 32px; height: 32px; }
}

/* Sin botones de sección (móvil y escritorio): solo buscador.
   En la portada va dentro del bloque principal, bajo las cápsulas. */
#wk-nav { display: none !important; }
#wk-bar.wk-bar-empty { display: none !important; }
.wk-hero { flex-wrap: wrap; }
.wk-hero { justify-content: center; row-gap: 12px; }
.wk-hero > .wk-hero-txt { flex: 1 1 0; min-width: 0; max-width: 760px; text-align: left; }
.wk-hero > .wk-hero-txt p { margin-bottom: 10px; }
.wk-hero-art.wk-hero-book { display: block; flex: 0 0 auto; }
.wk-hero-art.wk-hero-book img { width: 96px; height: 96px; object-fit: contain; }
@media (max-width: 1319px) {
    .wk-hero { display: grid !important; grid-template-columns: 60px 1fr; column-gap: 12px; row-gap: 8px; align-items: center; text-align: left !important; }
    .wk-hero > .wk-hero-txt { display: contents; }
    .wk-hero-art.wk-hero-book { display: block !important; grid-column: 1; grid-row: 1 / 3; align-self: center; }
    .wk-hero-art.wk-hero-book img { width: 60px; height: 60px; }
    .wk-hero > .wk-hero-txt .wk-h1 { grid-column: 2; grid-row: 1; margin: 0; text-align: left; }
    .wk-hero > .wk-hero-txt p { grid-column: 2; grid-row: 2; margin: 0; text-align: left; }
    .wk-hero > .wk-hero-txt .wk-stats { grid-column: 1 / -1; justify-content: center; gap: 6px; }
    .wk-hero .wk-hero-search { grid-column: 1 / -1; margin: 0; }
    .wk-hero .wk-hero-tabs { grid-column: 1 / -1; min-width: 0; margin: 2px 0 0; }
}
.wk-hero-search { display: block; width: 100%; margin: 12px 0 0; }
.wk-hero-search .wk-search { margin: 0; max-width: 560px; flex: none; width: 100%; text-align: left; }
.wk-hero:has(.wk-hero-search .wk-search) { overflow: visible; position: relative; z-index: 30; }
.wk-hero-search #wk-results { max-height: 55vh; }
@media (max-width: 1319px) {
    .wk-hero-search { margin-top: 2px; }
    .wk-hero-search .wk-search { max-width: none; flex-basis: 100%; }
}

/* Header persistente */
#wk-top { background: var(--bg); padding: 14px 18px 0; position: relative; z-index: 30; }
#wk-top .wk-hero { margin-bottom: 0; }
#wk-top .wk-h1 a { color: inherit; text-decoration: none; }
a.wk-hero-book { cursor: pointer; transition: transform .15s ease, filter .15s ease; }
a.wk-hero-book:hover { transform: scale(1.06) rotate(-3deg); filter: brightness(1.1); }
a.wk-hero-book:active { transform: scale(.96); }
@media (max-width: 1319px) { #wk-top { padding: 10px 10px 0; } }
/* Sin borde dorado en header y cabeceras de ficha */
.wk-hero, .wk-head { border: none !important; }
/* Apartados más grandes (texto e imágenes) */
h2.wk-h2 { font-size: 15px; padding: 7px 12px; }
h2.wk-h2 img { width: 24px; height: 24px; }
.wk-box { font-size: 14px; padding: 10px 12px; }
.wk-box .wk-small, .wk-box .wk-muted.wk-small { font-size: 12px; }
.wk-fx li { padding: 5px 10px; gap: 8px; font-size: 14px; }
.wk-fx li img { width: 22px; height: 22px; }
.wk-box .wk-chip { gap: 6px; margin: 3px 8px 3px 0; }
.wk-box .wk-chip img, .wk-box .wk-ico.sm { width: 34px; height: 34px; }
.wk-box .wk-ico { width: 44px; height: 44px; }
.wk-list li { font-size: 14px; }
.wk-row .wk-name small, .wk-list .wk-lvl { font-size: 12px; }
/* Iconos en encabezados de tabla */
table.wk-t th .wk-th-ico { width: 20px; height: 20px; object-fit: contain; vertical-align: middle; margin: -3px 6px 0 0; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
/* Hechizos con icono a color: la imagen ya trae marco y fondo */
.wk-spell.wk-spell-c { background: transparent; border: 0; box-shadow: none; }
.wk-spell.wk-spell-c img { width: 100%; height: 100%; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); border-radius: 4px; }
/* Subtítulo de cabecera legible sobre fondo oscuro */
.wk-head .wk-sub { color: #e6c98a; font-size: 14px; font-weight: bold; margin: 0 0 6px; opacity: 1; }
/* Separación entre el título de sección y su contenido */
h2.wk-h2 + .wk-list.grid, h2.wk-h2 + .wk-cards { margin-top: 10px; }
/* Tarjetas: la cápsula de nivel va en su propia fila sobre el nombre (no se encima con textos largos) */
.wk-list.grid .wk-row { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 10px; row-gap: 3px; align-items: start; }
.wk-list.grid .wk-row > :first-child { grid-row: 1 / 3; grid-column: 1; align-self: center; }
.wk-list.grid .wk-row > .wk-lvl { position: static; grid-row: 1; grid-column: 2; justify-self: start; }
.wk-list.grid .wk-row > .wk-name { grid-row: 2; grid-column: 2; padding-right: 0; }
/* Clases: aspecto base sobre el emblema */
.wk-cls-em { position: relative; display: inline-block; width: 70px; height: 70px; }
.wk-classes .wk-cls-em img.wk-cls-g { position: absolute; right: 2px; bottom: 0; width: auto; height: 52px; max-width: 40px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.45)); pointer-events: none; }
/* Sprites de combate: no estirar, mantener proporción */
img.wk-ico.mon { object-fit: contain; }

/* Banderas de idioma (arriba a la derecha del bloque «Wiki Dofus 1.29») */
.wk-flags { position: absolute; top: 10px; right: 12px; display: flex; gap: 6px; z-index: 2; }
.wk-flags .wk-flag { width: 34px; height: 24px; padding: 0; border: 1px solid rgba(230,175,77,.35); border-radius: 5px; overflow: hidden; background: none; cursor: pointer; opacity: .55; filter: saturate(.6); transition: opacity .15s, transform .12s, filter .15s, border-color .15s; }
.wk-flags .wk-flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wk-flags .wk-flag:hover { opacity: .9; transform: translateY(-1px); }
.wk-flags .wk-flag.active { opacity: 1; filter: none; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
@media (max-width: 1319px) {
    .wk-flags { top: 8px; right: 8px; gap: 4px; }
    .wk-flags .wk-flag { width: 26px; height: 18px; }
    .wk-hero > .wk-hero-txt .wk-h1 { padding-right: 92px; }
}
@media (max-width: 1319px) {
    .wk-flags { position: static; grid-column: 1 / -1; grid-row: 1; justify-content: flex-end; margin: -4px -4px 0 0; }
    .wk-hero-art.wk-hero-book { grid-row: 2 / 4; }
    .wk-hero > .wk-hero-txt .wk-h1 { grid-row: 2; padding-right: 0; }
    .wk-hero > .wk-hero-txt p { grid-row: 3; }
}

/* ── Recomendados: destacado de jefes + carruseles por categoría ── */
.wk-rec { margin: 4px 0 6px; }
.wk-rec-skel { height: 300px; border-radius: 14px; background: linear-gradient(90deg, var(--bg-light) 0%, #e6ddb6 50%, var(--bg-light) 100%); background-size: 200% 100%; animation: wk-skel 1.2s linear infinite; }
@keyframes wk-skel { to { background-position: -200% 0; } }
.wk-spot { position: relative; overflow: hidden; border-radius: 14px; padding: 18px 18px 16px; margin-top: 10px;
    background: var(--hdr); color: #f3ead0;
    box-shadow: 0 2px 6px rgba(34,30,24,.25); }
.wk-spot-h { position: relative; margin-bottom: 14px; }
.wk-spot-badge { display: inline-block; font-size: 11px; font-weight: bold; letter-spacing: .06em; text-transform: uppercase; color: var(--hdr-dark);
    background: var(--gold); padding: 3px 10px; border-radius: 99px; }
.wk-spot-h h2 { margin: 8px 0 2px; font-size: 24px; color: #fff3d2; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.wk-spot-h p { margin: 0; color: #d8cba4; font-size: 13px; }
.wk-spot-track { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 12px; overflow: visible !important; padding: 0 !important; }
.wk-spot-c { display: flex; align-items: center; gap: 12px; height: 84px; padding: 10px 12px; border-radius: 12px; color: #fff; min-width: 0;
    background: var(--hdr-dark); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); transition: transform .18s ease, box-shadow .18s ease, background .18s; }
.wk-spot-c:hover { text-decoration: none; transform: translateY(-2px); background: #2f2a21; box-shadow: inset 0 0 0 1px rgba(230,175,77,.45); }
.wk-spot-art { flex: 0 0 64px; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.06); }
.wk-spot-c .wk-ico { width: 56px !important; height: 56px !important; object-fit: contain; background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; padding: 0 !important;
    filter: drop-shadow(0 3px 3px rgba(0,0,0,.45)); transition: transform .2s ease; }
.wk-spot-c:hover .wk-ico { transform: scale(1.08); }
.wk-spot-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wk-spot-txt i { font-style: normal; font-size: 10px; font-weight: bold; line-height: 1; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.wk-spot-txt b { color: #fff3d2 !important; font-size: 15px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wk-car { position: relative; margin-top: 18px; }
.wk-car-h { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.wk-car-t { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--hdr-dark); padding: 4px 10px 4px 4px; border-radius: 10px; transition: background .15s; }
a.wk-car-t:hover { text-decoration: none; background: rgba(59,52,33,.08); }
.wk-car-t > img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.wk-car-t > span { display: flex; flex-direction: column; min-width: 0; }
.wk-car-t b { font-size: 17px; line-height: 1.2; }
.wk-car-t small { color: var(--txl); font-size: 12px; }
.wk-car-all { font-size: 12px; font-weight: bold; color: var(--hdr-dark); padding: 5px 10px; border-radius: 99px; background: rgba(59,52,33,.08); white-space: nowrap; }
.wk-car-all:hover { text-decoration: none; background: rgba(59,52,33,.16); }
.wk-car-body { position: relative; }
.wk-car-arr { position: absolute; top: 50%; z-index: 2; width: 34px; height: 34px; margin-top: -22px; border-radius: 50%; border: 1px solid var(--slot-bd);
    background: var(--bg-light); color: var(--hdr-dark); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: background .15s, opacity .15s; }
.wk-car-arr.prev { left: -6px; }
.wk-car-arr.next { right: -6px; }
.wk-car-arr:hover:not(:disabled) { background: var(--hdr); border-color: var(--hdr); color: #fff; }
.wk-car-arr:disabled { opacity: 0; pointer-events: none; }
.wk-car-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 2px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.wk-car-track::-webkit-scrollbar { display: none; }
.wk-car::after { content: ''; position: absolute; right: 0; bottom: 10px; top: 56px; width: 40px; background: linear-gradient(90deg, transparent, var(--bg)); pointer-events: none; transition: opacity .2s; }
.wk-car.wk-car-end::after { opacity: 0; }
.wk-rc { position: relative; flex: 0 0 136px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
    padding: 12px 8px 10px; border-radius: 12px; color: var(--tx); background: var(--bg-light);
    border: 1px solid var(--slot-bd); box-shadow: 0 2px 4px rgba(59,52,33,.12); transition: transform .16s ease, box-shadow .16s ease, border-color .16s; }
.wk-rc:hover { text-decoration: none; transform: translateY(-4px); border-color: var(--hdr); box-shadow: 0 6px 12px rgba(59,52,33,.18); }
.wk-rc-art { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; margin-bottom: 6px;
    background: var(--slot-bg); }
.wk-rc-art .wk-ico { width: 64px !important; height: 64px !important; object-fit: contain; background: none; border: 0; padding: 0; transition: transform .2s ease; }
.wk-rc:hover .wk-rc-art .wk-ico { transform: scale(1.12); }
.wk-rc-mos { border-radius: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 6px; }
.wk-rc-mos .wk-ico { width: 34px !important; height: 34px !important; }
.wk-rc b { font-size: 12px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.wk-rc small { font-size: 11px; color: var(--txl); }
.wk-rk { position: absolute; left: 8px; top: 8px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; font-style: normal; font-size: 11px; font-weight: bold; line-height: 22px;
    color: #fff; background: var(--hdr); }
@media (prefers-reduced-motion: reduce) { .wk-rc, .wk-spot-c, .wk-rc-art .wk-ico, .wk-spot-c .wk-ico { transition: none; } .wk-car-track { scroll-behavior: auto; } }

/* Móvil: estilo app nativa (como Forja / Set): carruseles a sangre, tarjetas táctiles */
@media (max-width: 1319px) {
    .wk-rec { margin: 0 -10px; }
    .wk-rec-skel { margin: 10px; height: 220px; }
    .wk-spot { border-radius: 0; margin-top: 6px; padding: 16px 0 14px; box-shadow: none; }
    .wk-spot-h { padding: 0 16px; margin-bottom: 12px; }
    .wk-spot-h h2 { font-size: 21px; }
    .wk-spot-h p { font-size: 12px; }
    .wk-spot-track { display: flex !important; overflow-x: auto !important; scroll-snap-type: x mandatory; gap: 10px; padding: 0 16px 4px !important; scroll-padding: 0 16px; }
    .wk-spot-c { flex: 0 0 72%; scroll-snap-align: start; border-radius: 16px; }
    .wk-spot-c:hover { transform: none; }
    .wk-spot-c:active { transform: scale(.97); }
    .wk-car { margin-top: 16px; }
    .wk-car::after { display: none; }
    .wk-car-h { padding: 0 12px; margin-bottom: 4px; gap: 8px; }
    .wk-car-t > img { width: 28px; height: 28px; }
    .wk-car-t b { font-size: 17px; font-weight: 800; color: #3b3428; }
    .wk-car-t small { font-size: 11px; }
    .wk-car-t:active { background: rgba(59,52,33,.12); }
    .wk-car-arr { display: none; }
    .wk-car-all { background: none; padding: 4px 0; color: #524a3c; font-size: 14px; }
    .wk-car-all::after { content: ' ›'; }
    .wk-car-track { padding: 4px 16px 8px; scroll-padding: 0 16px; gap: 10px; }
    .wk-rc { flex-basis: 112px; border-radius: 16px; border: 0; background: #d4ceac; box-shadow: 0 1px 2px rgba(0,0,0,.12); padding: 10px 6px 8px; -webkit-tap-highlight-color: transparent; }
    .wk-rc:hover { transform: none; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
    .wk-rc:active { transform: scale(.95); background: #c9c29e; }
    .wk-rc-art { width: 70px; height: 70px; background: #c9c29e; box-shadow: none; }
    .wk-rc-art .wk-ico { width: 54px !important; height: 54px !important; }
    .wk-rc-mos .wk-ico { width: 28px !important; height: 28px !important; }
    .wk-rc b { font-size: 12px; color: #3b3428; }
    .wk-rc small { font-size: 10px; color: #6f6345; }
    .wk-rk { left: 6px; top: 6px; min-width: 20px; height: 20px; line-height: 20px; font-size: 10px; background: #524a3c; }
}

/* ── Calculadora de XP de oficio ── */
.wk-xc { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 6px; }
.wk-xc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; background: var(--bg-light); border: 1px solid var(--slot-bd); border-radius: 10px; padding: 14px; }
.wk-xc-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wk-xc-f > span { font-size: 12px; font-weight: bold; color: var(--hdr-dark); }
.wk-xc-f > span small { font-weight: normal; color: var(--txl); }
.wk-xc-job, .wk-xc-slots, .wk-xc-quick, .wk-xc-err { grid-column: 1 / -1; }
.wk-xc-f input { font: inherit; font-size: 15px; padding: 7px 9px; border: 1px solid var(--slot-bd); border-radius: 6px; background: #ece4c2; color: var(--tx); width: 100%; box-sizing: border-box; }
.wk-xc-f input:focus { outline: 2px solid var(--hdr-light); outline-offset: 0; }
.wk-xc-f input.bad { border-color: var(--neg); }
.wk-xc-pct { position: relative; display: block; }
.wk-xc-pct i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--txl); pointer-events: none; }
.wk-xc-job .wk-sel, .wk-xc-job .wk-sel-btn { width: 100%; }
.wk-xc-quick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: -4px; }
.wk-xc-quick span { font-size: 12px; color: var(--txl); margin-right: 2px; }
.wk-xc-quick button { font: inherit; font-size: 12px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--slot-bd); background: transparent; color: var(--hdr-dark); cursor: pointer; }
.wk-xc-quick button:hover { background: rgba(59,52,33,.08); }
.wk-xc-quick button.on { background: var(--hdr); border-color: var(--hdr); color: #fff; }
.wk-xc-seg { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; background: var(--slot-bg); padding: 4px; border-radius: 8px; }
.wk-xc-seg button { font: inherit; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0 5px; border: 0; border-radius: 6px; background: transparent; color: var(--hdr-dark); cursor: pointer; transition: background .15s; }
.wk-xc-seg button b { font-size: 16px; line-height: 1.1; }
.wk-xc-seg button small { font-size: 10px; color: var(--txl); }
.wk-xc-seg button:hover:not(:disabled) { background: rgba(255,255,255,.35); }
.wk-xc-seg button.on { background: var(--hdr); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.wk-xc-seg button.on small { color: #e9dfbf; }
.wk-xc-seg button:disabled { opacity: .35; cursor: not-allowed; }
.wk-xc-err { margin: 0; color: var(--neg); font-size: 13px; font-weight: bold; }
.wk-xc-res { display: flex; flex-direction: column; gap: 12px; }
.wk-xc-card { background: var(--hdr); color: #f3ead0; border-radius: 10px; padding: 14px 16px; box-shadow: 0 2px 6px rgba(34,30,24,.25); }
.wk-xc-head { display: flex; align-items: center; gap: 10px; }
.wk-xc-head .wk-ico { width: 40px; height: 40px; object-fit: contain; }
.wk-xc-head span { display: flex; flex-direction: column; }
.wk-xc-head b { font-size: 15px; color: #fff3d2; }
.wk-xc-head small { font-size: 12px; color: #d8cba4; }
.wk-xc-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 12px 0 10px; }
.wk-xc-big b { font-size: 40px; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.wk-xc-big span { font-size: 14px; color: #e9dfbf; }
.wk-xc-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wk-xc-kv span { background: rgba(0,0,0,.2); border-radius: 8px; padding: 7px 10px; display: flex; flex-direction: column; }
.wk-xc-kv small { font-size: 11px; color: #d8cba4; }
.wk-xc-kv b { font-size: 16px; color: #fff3d2; font-variant-numeric: tabular-nums; }
.wk-xc-bar { height: 6px; border-radius: 99px; background: rgba(0,0,0,.25); margin-top: 12px; overflow: hidden; }
.wk-xc-bar i { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.wk-xc-plan { background: var(--bg-light); color: var(--tx); border: 1px solid var(--slot-bd); box-shadow: none; }
.wk-xc-plan h3 { margin: 0 0 4px; font-size: 15px; color: var(--hdr-dark); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wk-xc-plan h3 em { font-style: normal; font-size: 11px; font-weight: bold; color: #fff; background: var(--pos); padding: 2px 8px; border-radius: 99px; }
.wk-xc-plan p { margin: 0 0 8px; font-size: 13px; color: var(--txl); }
.wk-xc-plan ol { list-style: none; margin: 0; padding: 0; }
.wk-xc-plan li { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; padding: 6px 2px; border-top: 1px solid rgba(144,136,98,.4); font-size: 13px; font-variant-numeric: tabular-nums; }
.wk-xc-plan li span:nth-child(2) { color: var(--txl); }
.wk-xc-note { margin: 0; padding: 8px 10px; font-size: 12px; color: var(--txl); }
.wk-xc-ref tr.wk-xc-tot td { background: var(--bg-dark); font-weight: bold; }
.wk-xc-all { display: block; padding: 8px 10px; font-weight: bold; color: var(--hdr-dark); border-top: 1px solid var(--slot-bd); }
.wk-xc-lv { margin-top: 18px; border: 1px solid var(--slot-bd); border-radius: 6px; background: var(--row-b); }
.wk-xc-lv summary { cursor: pointer; padding: 8px 12px; font-weight: bold; color: var(--gold); background: var(--hdr); border-radius: 5px; }
.wk-xc-lv[open] summary { border-radius: 5px 5px 0 0; }
.wk-xc-lv .wk-tscroll { max-height: 420px; overflow-y: auto; }
.wk-xc-go img { width: 16px; height: 16px; object-fit: contain; }
@media (max-width: 1319px) { .wk-xc { grid-template-columns: 1fr; } }

/* Móvil: tarjetas nativas como Forja / Set */
@media (max-width: 1319px) {
    .wk-xc { gap: 10px; }
    .wk-xc-form { background: #d4ceac; border: 0; border-radius: 16px; padding: 14px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.12); gap: 12px 10px; }
    .wk-xc-f > span { font-size: 13px; color: #3b3428; }
    .wk-xc-f input { font-size: 16px; padding: 10px 12px; border: 0; border-radius: 12px; background: #c9c29e; color: #3b3428; }
    .wk-xc-f input:focus { outline: 2px solid #524a3c; }
    .wk-xc-quick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
    .wk-xc-quick span { display: none; }
    .wk-xc-quick button { padding: 6px 0; font-size: 13px; border: 0; background: #c9c29e; color: #3b3428; -webkit-tap-highlight-color: transparent; }
    .wk-xc-quick button.on { background: #524a3c; color: #fff; }
    .wk-xc-seg { grid-template-columns: repeat(4, 1fr); background: #c9c29e; border-radius: 12px; padding: 4px; gap: 4px; }
    .wk-xc-seg button { padding: 8px 0 7px; border-radius: 9px; color: #3b3428; -webkit-tap-highlight-color: transparent; }
    .wk-xc-seg button small { color: #6f6345; }
    .wk-xc-seg button:active:not(:disabled) { transform: scale(.95); }
    .wk-xc-seg button.on { background: #524a3c; color: #fff; }
    .wk-xc-card { border-radius: 16px; padding: 14px; }
    .wk-xc-big b { font-size: 44px; }
    .wk-xc-plan { background: #d4ceac; border: 0; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
    .wk-xc-plan h3 { color: #3b3428; }
    .wk-xc-plan p { color: #6f6345; }
    .wk-xc-more .wk-box.flush { background: #d4ceac; border: 0; border-radius: 0 0 16px 16px; overflow: hidden; }
    .wk-xc-more table.wk-t, .wk-xc-more table.wk-t tbody { display: block; }
    .wk-xc-more table.wk-t tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 10px 12px; border-top: 1px solid rgba(82,74,60,.18); background: none !important; }
    .wk-xc-more table.wk-t tr:first-child { display: none; }
    .wk-xc-more table.wk-t td { display: block; padding: 0; border: 0; background: none !important; }
    .wk-xc-more table.wk-t td.c { color: #6f6345; font-size: 12px; align-self: center; }
    .wk-xc-more table.wk-t td:last-child { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
    .wk-xc-more table.wk-t td:last-child .wk-chip { margin: 0; background: #c9c29e; border-radius: 10px; padding: 3px 8px 3px 4px; font-size: 12px; }
    .wk-xc-lv { border-radius: 16px; overflow: hidden; border: 0; background: #d4ceac; }
    .wk-xc-lv summary { border-radius: 0; padding: 12px 14px; }
}

/* ── Guía por niveles de oficio ── */
.wk-xt { margin-top: 14px; }
.wk-xt .wk-box { padding: 6px 12px 10px; }
.wk-xt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.wk-xt-col { background: rgba(255,255,255,.18); border-radius: 10px; padding: 10px 12px 6px; min-width: 0; }
.wk-xt-col h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #5c7a2e; }
.wk-xt-col.k-c h3 { color: #a0601a; }
.wk-xt-col h3 img { width: 20px; height: 20px; object-fit: contain; }
.wk-xt-l { list-style: none; margin: 0; padding: 0; }
.wk-xt-s { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 6px; align-items: center; padding: 8px 6px; border-top: 1px solid rgba(144,136,98,.3); border-radius: 6px; }
.wk-xt-s:first-child { border-top: 0; }
.wk-xt-s.on { background: rgba(230,175,77,.25); border-top-color: transparent; }
.wk-xt-s.on + .wk-xt-s { border-top-color: transparent; }
.wk-xt-lv { font-weight: bold; font-variant-numeric: tabular-nums; color: var(--hdr-dark); background: var(--slot-bg); border-radius: 99px; text-align: center; padding: 3px 0; font-size: 12px; line-height: 1.2; }
.wk-xt-s.on .wk-xt-lv { background: var(--hdr); color: var(--gold); }
.wk-xt-it { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wk-xt-it > a { display: flex; align-items: center; gap: 8px; color: var(--tx); font-size: 13px; text-decoration: none; min-width: 0; }
.wk-xt-it > a:hover span { text-decoration: underline; }
.wk-xt-it > a > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-xt-it .wk-ico { width: 26px !important; height: 26px !important; flex: 0 0 26px; margin: 0 !important; }
.wk-xt-m { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; text-align: right; }
.wk-xt-m b { font-size: 14px; color: var(--hdr-dark); font-variant-numeric: tabular-nums; }
.wk-xt-m small { font-size: 11px; color: var(--txl); white-space: nowrap; }
.wk-xt-tips b { color: var(--hdr-dark); font-variant-numeric: tabular-nums; }
.wk-xt-tips { margin: 8px 0 0; padding: 8px 0 0 18px; border-top: 1px solid var(--slot-bd); font-size: 13px; color: var(--txl); }
.wk-xt-tips li { margin: 2px 0; }
@media (max-width: 1319px) {
    .wk-xt .wk-box { background: #d4ceac; border: 0; border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.12); padding: 6px 10px 10px; }
    .wk-xt-grid { grid-template-columns: 1fr; gap: 10px; }
    .wk-xt-col { background: #c9c29e; border-radius: 12px; }
    .wk-xt-s { grid-template-columns: 52px minmax(0, 1fr); padding: 9px 4px; border-color: rgba(59,52,40,.15); }
    .wk-xt-m { grid-column: 2; flex-direction: row; align-items: baseline; gap: 6px; }
    .wk-xt-m b { font-size: 13px; }
    .wk-xt-lv { background: #d4ceac; color: #3b3428; font-size: 12px; white-space: nowrap; }
    .wk-xt-s.on { background: rgba(82,74,60,.14); }
    .wk-xt-s.on .wk-xt-lv { background: #524a3c; color: #fff; }
    .wk-xt-m small, .wk-xt-tips { color: #6f6345; }
    .wk-xt-tips { border-color: rgba(59,52,40,.2); }
}

.wk-xc-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wk-xc-left .wk-xt { margin-top: 0; }
.wk-xc-left .wk-xt .wk-h2 { margin-top: 4px; }
.wk-xc-tiphint { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px dashed var(--slot-bd); border-radius: 10px; color: var(--txl); font-size: 13px; }
.wk-xc-tiphint img { width: 24px; height: 24px; object-fit: contain; opacity: .8; }
@media (max-width: 1319px) { .wk-xc-tiphint { border-radius: 16px; background: #d4ceac; border: 0; color: #6f6345; } }

.wk-xc-mx { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--slot-bg); padding: 4px; border-radius: 8px; }
.wk-xc-mx button { font: inherit; font-size: 15px; font-weight: bold; padding: 5px 0; border: 0; border-radius: 6px; background: transparent; color: var(--hdr-dark); cursor: pointer; transition: background .15s; }
.wk-xc-mx button:hover { background: rgba(255,255,255,.35); }
.wk-xc-mx button.on { background: var(--hdr); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
@media (max-width: 1319px) {
    .wk-xc-mx { background: #c9c29e; border-radius: 12px; }
    .wk-xc-mx button { padding: 9px 0; border-radius: 9px; color: #3b3428; -webkit-tap-highlight-color: transparent; }
    .wk-xc-mx button.on { background: #524a3c; color: #fff; }
}

/* Ingredientes en lista vertical */
.wk-ings { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.wk-ings .wk-chip { margin: 0 !important; }

.wk-nokey { opacity: .35; filter: grayscale(1); }

/* Mapa de recursos */
.wk-rm { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; }
.wk-rm-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wk-rm-q { width: 100%; box-sizing: border-box; padding: 7px 10px; border: 1px solid var(--slot-bd); border-radius: 8px; background: #fffbe9; font: inherit; font-size: 13px; }
.wk-rm-list { list-style: none; margin: 0; padding: 4px; max-height: 420px; overflow-y: auto; background: rgba(255,255,255,.18); border-radius: 10px; }
.wk-rm-list button { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; padding: 5px 6px; border: 0; border-radius: 6px; background: none; color: var(--tx); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.wk-rm-list button:hover { background: rgba(255,255,255,.35); }
.wk-rm-list button.on { background: rgba(230,175,77,.35); font-weight: bold; }
.wk-rm-list button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-rm-list button small { color: var(--txl); font-size: 11px; font-weight: normal; }
.wk-rm-list .wk-ico, .wk-rm-list img { width: 26px !important; height: 26px !important; margin: 0 !important; object-fit: contain; }
.wk-rm-main { min-width: 0; }
/* Recurso elegido: grande y centrado como apoyo visual */
.wk-rm-head { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 84px; margin-bottom: 10px; padding: 10px 16px;
    border: 1px solid var(--slot-bd); border-radius: 12px; background: var(--bg-light); text-align: left; }
.wk-rm-head > img, .wk-rm-head .wk-ico { width: 64px !important; height: 64px !important; margin: 0 !important; object-fit: contain; flex: 0 0 auto; }
.wk-rm-head b { display: block; font-size: 24px; line-height: 1.15; }
.wk-rm-head small { display: block; margin-top: 3px; color: var(--txl); font-size: 14px; }
.wk-rm-view { position: relative; height: min(70vh, 640px); overflow: hidden; border-radius: 12px; background: #8f8f8f; border: 1px solid var(--slot-bd); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; outline: none; }
.wk-rm-view:focus-visible { box-shadow: 0 0 0 3px var(--gold); }
.wk-rm-view.drag { cursor: grabbing; }
.wk-rm-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.wk-rm-world > img { display: block; width: 100%; height: 100%; pointer-events: none; }
.wk-rm-layer { position: absolute; inset: 0; }
.wk-rm-c { position: absolute; box-sizing: border-box; display: grid; place-items: center; background: rgba(230,60,30,.55); border: 1px solid rgba(255,240,200,.95); border-radius: 2px; color: #fff; font-size: 8px; line-height: 1; font-weight: bold; text-shadow: 0 0 2px #000; }
.wk-rm-c span { display: none; }
.wk-rm-view.zin .wk-rm-c span { display: block; }
.wk-rm-c:hover { background: rgba(255,170,0,.85); z-index: 2; }
.wk-rm-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 5; }
.wk-rm-zoom button { width: 34px; height: 34px; border: 1px solid var(--slot-bd); border-radius: 8px; background: var(--bg-light); color: var(--tx); font-size: 18px; line-height: 1; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.wk-rm-zoom button:hover { background: #fff; }
.wk-rm-tip { position: absolute; z-index: 6; pointer-events: none; padding: 6px 9px; border-radius: 8px; background: rgba(40,34,24,.92); color: #fff; font-size: 12px; line-height: 1.3; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.wk-rm-tip b { display: block; color: var(--gold); }
@media (max-width: 1319px) {
    .wk-rm { grid-template-columns: 1fr; }
    .wk-rm-main { order: -1; }
    .wk-rm-view { height: 58vh; }
    .wk-rm-list { max-height: 260px; background: #c9c29e; }
}

/* Pantallas anchas: la wiki ocupa el ancho disponible en lugar de quedarse en 830px */
@media (min-width: 1320px) { #wiki-view { width: min(1440px, calc(100vw - 48px)); } }
@media (min-width: 1900px) and (min-height: 1060px) { #wiki-view { zoom: 1.12; width: min(1440px, calc((100vw - 48px) / 1.12)); } }

/* Recomendados: mosaicos cuadrados (icono arriba, texto abajo) */
.wk-spot-track { grid-template-columns: repeat(6, 1fr); }
.wk-spot-c { flex-direction: column; justify-content: center; text-align: center; height: auto; aspect-ratio: 1; padding: 14px 10px; gap: 10px; }
.wk-spot-art { flex: 0 0 auto; width: 56%; height: auto; aspect-ratio: 1; max-width: 120px; }
.wk-spot-c .wk-ico { width: 72% !important; height: 72% !important; }
.wk-spot-txt { align-items: center; max-width: 100%; }
.wk-spot-txt b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 1319px) { .wk-spot-track { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1319px) { .wk-spot-c { flex: 0 0 40%; } }

/* Mapa de recursos: selector de oficio desplegable con icono */
.wk-rm-dd { position: relative; }
.wk-rm-dd-b { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 12px; border: 1px solid var(--slot-bd); border-radius: 10px;
    background: var(--bg-light); color: var(--tx); font: inherit; font-size: 15px; font-weight: bold; cursor: pointer; text-align: left; }
.wk-rm-dd-b:hover, .wk-rm-dd.open .wk-rm-dd-b { border-color: var(--gold); }
.wk-rm-dd-b img, .wk-rm-dd-m img { width: 30px; height: 30px; object-fit: contain; flex: 0 0 auto; }
.wk-rm-dd-b span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-rm-dd-b i { font-style: normal; color: var(--txl); transition: transform .15s; }
.wk-rm-dd.open .wk-rm-dd-b i { transform: rotate(180deg); }
.wk-rm-dd-m { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
    border: 1px solid var(--slot-bd); border-radius: 10px; background: var(--bg-light); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.wk-rm-dd-m button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 7px; background: none;
    color: var(--tx); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.wk-rm-dd-m button span { flex: 1; }
.wk-rm-dd-m button small { color: var(--txl); font-size: 11px; }
.wk-rm-dd-m button:hover { background: rgba(0,0,0,.06); }
.wk-rm-dd-m button.on { background: var(--hdr); color: var(--gold); }
.wk-rm-dd-m button.on small { color: inherit; opacity: .8; }
/* Zaaps fijos: tamaño constante en pantalla sea cual sea el zoom */
.wk-rm-z { position: absolute; width: 18px; height: auto; transform: translate(-50%, -50%) scale(var(--iz, 1)); z-index: 3; pointer-events: auto;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); user-select: none; }
@media (max-width: 1319px) { .wk-rm-head { min-height: 70px; gap: 12px; } .wk-rm-head b { font-size: 20px; } .wk-rm-head > img, .wk-rm-head .wk-ico { width: 52px !important; height: 52px !important; } }
/* Mapa de recursos: ubicaciones del recurso, de más a menos cantidad */
.wk-rm-locs > b { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 4px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--txl); }
.wk-rm-locs > b small { text-transform: none; letter-spacing: 0; font-weight: normal; }
.wk-rm-locs ol { list-style: none; margin: 0; padding: 4px; max-height: 340px; overflow-y: auto; background: rgba(255,255,255,.18); border-radius: 10px; }
.wk-rm-locs button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 8px; border: 0; border-radius: 7px; background: none; color: var(--tx); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.wk-rm-locs button:hover { background: rgba(0,0,0,.06); }
.wk-rm-locs button.on { background: var(--hdr); color: var(--gold); }
.wk-rm-locs button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-rm-locs button i { font-style: normal; font-weight: bold; margin-right: 6px; font-variant-numeric: tabular-nums; }
.wk-rm-locs button em { font-style: normal; font-weight: bold; color: var(--gold-dk, #a8741a); font-variant-numeric: tabular-nums; }
.wk-rm-locs button.on em { color: inherit; }
.wk-rm-c.hl { background: rgba(255,200,0,.95); box-shadow: 0 0 0 2px #fff, 0 0 10px 3px rgba(255,200,0,.9); z-index: 4; }
@media (max-width: 1319px) { .wk-rm-locs ol { max-height: 260px; background: #c9c29e; } }
#wiki-view h2.wk-h2-set a { color: inherit; text-decoration: none; }
#wiki-view h2.wk-h2-set a:hover { text-decoration: underline; }
.wk-job-inl { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.wk-job-inl .wk-ico { width: 22px; height: 22px; }
/* Recomendados: cápsulas de acceso rápido junto a la insignia */
.wk-spot-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wk-spot-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.wk-hero-tabs { margin: 8px 0 10px; }
#wiki-view .wk-spot-tabs a { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px 3px 5px; border-radius: 99px;
    background: rgba(0,0,0,.28); border: 1px solid rgba(230,175,77,.45); color: #ffd27a; font-size: 12px; font-weight: bold; text-decoration: none;
    transition: background .15s, color .15s, border-color .15s; }
#wiki-view .wk-spot-tabs a:hover { background: var(--gold); border-color: var(--gold); color: var(--hdr-dark); }
.wk-spot-tabs .wk-ico { width: 20px; height: 20px; object-fit: contain; background: none; border: 0; }
@media (max-width: 1319px) {
    .wk-spot-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
    .wk-spot-tabs::-webkit-scrollbar { display: none; }
    #wiki-view .wk-spot-tabs a { flex-shrink: 0; }
}

/* ═══════════════════════════════════════════════════════
   WIKI MÓVIL NATIVA (≤600px) — mismo lenguaje que Forja / Mi set:
   barra superior oscura con título dorado, «atrás» e idioma, buscador fijo,
   contenido a todo el ancho como hoja, filtros plegables y filas táctiles.
   ═══════════════════════════════════════════════════════ */
.wk-mbar, .wk-ftog { display: none; }
@media (max-width: 1319px) {
    #wiki-view { width: 100% !important; padding: 0 !important; margin: 0 !important; }
    #wk-shell { border: 0; border-radius: 0; background: transparent; box-shadow: none; }

    /* Barra superior fija */
    #wk-top { position: sticky; top: var(--wk-stick, 0px); z-index: 60; background: #333; padding: 6px 12px 10px; box-shadow: 0 6px 14px -8px rgba(0,0,0,.6); }
    #wk-top .wk-hero { display: block !important; padding: 0; margin: 0; background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
    #wk-top .wk-hero-book, #wk-top .wk-hero-txt > p, #wk-top .wk-h1 { display: none !important; }
    .wk-mbar { display: flex; align-items: center; gap: 10px; height: 44px; margin-bottom: 6px; }
    .wk-mback { flex: 0 0 auto; width: 36px; height: 34px; border-radius: 10px; border: 0; padding: 0 0 3px; background: #fe6c0f; color: #fff; box-shadow: 0 3px 0 #b84a06; font: 900 26px/1 system-ui, sans-serif; cursor: pointer; }
    .wk-mback:active { transform: translateY(2px); box-shadow: 0 1px 0 #b84a06; }
    body.wk-home .wk-mback { display: none; }
    #wiki-view .wk-mtitle { flex: 1; min-width: 0; color: var(--gold); font: bold 22px Verdana, Tahoma, sans-serif; text-shadow: 0 2px 0 #0008; text-decoration: none; }
    .wk-mlang { flex: 0 0 auto; width: 42px; height: 30px; padding: 0; border-radius: 8px; overflow: hidden; border: 1px solid rgba(230,175,77,.6); background: none; cursor: pointer; }
    .wk-mlang img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .wk-mlang:active { transform: scale(.94); }
    #wk-top .wk-flags { display: none; position: absolute; top: 52px; right: 12px; margin: 0; padding: 10px; gap: 8px; background: #221e18; border: 1px solid rgba(230,175,77,.35); border-radius: 14px; box-shadow: 0 10px 28px rgba(0,0,0,.55); z-index: 5; }
    #wk-top.lang-open .wk-flags { display: flex; animation: wkIn .15s ease-out both; }
    #wk-top .wk-flags .wk-flag { width: 44px; height: 30px; border-radius: 7px; }

    /* Accesos por sección: solo en portada, en una fila deslizable */
    #wk-top .wk-hero-tabs { margin: 0 -12px 10px !important; padding: 0 12px; gap: 8px; }
    #wk-top .wk-hero-tabs { display: none !important; }   /* la portada ya tiene la cuadrícula de categorías */
    #wiki-view .wk-mtitle, #wiki-view .wk-mtitle:hover { text-decoration: none !important; }
    #wiki-view #wk-top .wk-spot-tabs a { padding: 6px 13px 6px 7px; font-size: 13px; }

    /* Buscador grande (16px evita el zoom de iOS) */
    #wk-top .wk-hero-search { margin: 0 !important; }
    #wiki-view #wk-top .wk-search input { height: 44px; padding: 0 12px 0 40px; border-radius: 12px; font-size: 16px; border: 0; }
    #wk-top .wk-search-ico { left: 12px; width: 20px; height: 20px; }
    #wk-top #wk-results { border-radius: 14px; max-height: 62vh; }

    /* Al hacer scroll la cabecera se reduce al buscador */
    #wk-top.wk-shrunk .wk-mbar, #wk-top.wk-shrunk .wk-hero-tabs { display: none; }
    #wk-top.wk-shrunk { padding-top: 8px; padding-bottom: 8px; }

    /* Contenido como hoja a todo el ancho */
    #wk-main { background: var(--bg); border-radius: 18px 18px 0 0; padding: 14px 12px 26px !important; min-height: 70vh; }
    #wk-footer { padding: 14px 16px 18px; background: var(--bg); }
    h2.wk-h2 { border-radius: 12px; }

    /* Filtros: nombre + botón «Filtros»; el resto se despliega */
    #wiki-view .wk-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border-radius: 14px; }
    #wiki-view .wk-filters > input[name="q"] { flex: 1 1 0; min-width: 0; height: 40px; border-radius: 10px; font-size: 16px; padding: 0 12px; }
    #wiki-view .wk-filters:not(.open) > :not([name="q"]):not(.wk-ftog) { display: none !important; }
    #wiki-view .wk-filters .wk-view { display: none !important; }
    #wiki-view .wk-filters.open > :not([name="q"]):not(.wk-ftog) { flex: 1 1 100%; min-width: 0; }
    #wiki-view .wk-filters.open .wk-sel-btn { width: 100%; max-width: none; height: 40px; border-radius: 10px; font-size: 14px; }
    #wiki-view .wk-filters.open .wk-sel-pop { left: 0; right: 0; min-width: 0; max-height: 50vh; border-radius: 12px; }
    #wiki-view .wk-filters.open > .wk-lvl-in { font-size: 13px; }
    #wiki-view .wk-filters.open > .wk-lvl-in input { flex: 1; height: 36px; border-radius: 8px; font-size: 16px; }
    .wk-ftog { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; height: 40px; padding: 0 13px; border: 0; border-radius: 10px; background: #fe6c0f; color: #fff; font: 800 13px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; box-shadow: 0 3px 0 #b84a06; cursor: pointer; }
    .wk-ftog img { width: 18px; height: 18px; filter: brightness(0) invert(1); }
    .wk-ftog i { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #fff; color: #fe6c0f; font-size: 11px; line-height: 18px; text-align: center; }
    .wk-ftog:active { transform: translateY(2px); box-shadow: 0 1px 0 #b84a06; }
    .wk-filters.open .wk-ftog { background: #c95408; }

    /* Filas de listado: tarjetas táctiles compactas */
    .wk-list.grid, .wk-list.grid.wide { gap: 8px; }
    .wk-list.grid li { border-radius: 14px; }
    .wk-list.grid li:hover { transform: none; }
    .wk-list.grid li:active { transform: scale(.985); }
    .wk-list.grid .wk-row { display: flex !important; align-items: center; gap: 12px; padding: 10px 12px; }
    .wk-list.grid .wk-row > .wk-lvl { margin-left: auto; }
    /* El botón «atrás» de la barra sustituye a las migas de pan */
    #wk-main > .wk-crumbs { display: none; }
    .wk-list.grid .wk-ico { width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0; }
    .wk-list.grid .wk-row.mon .wk-ico { width: 56px; height: 56px; }
    .wk-list.grid .wk-name { flex: 1; min-width: 0; padding-right: 0; }
    .wk-list.grid .wk-name b { display: block; font-size: 15px; line-height: 1.25; }
    .wk-list.grid .wk-lvl { position: static !important; flex-shrink: 0; align-self: flex-start; order: 2; }
    .wk-more { width: 100%; height: 46px; border-radius: 12px; font-size: 14px; }
}

/* ── Wiki móvil · estilo app (como Mi set): fondo oscuro, tarjetas pergamino,
      títulos de sección en mayúsculas, cuadrícula de categorías con iconos grandes ── */
@media (max-width: 1319px) {
    #wiki-view {
        --mw-card: #d4ceac; --mw-card2: #c9c29e; --mw-ink: #3b3428; --mw-ink2: #6f6345;
        --mw-tile: rgba(255,255,255,.06); --mw-lbl: #d9d0ae; --mw-or: #fe6c0f;
    }
    #wk-main, #wk-footer { background: transparent !important; border-radius: 0 !important; }
    #wk-main { padding: 2px 12px 28px !important; color: #e9e2c8; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
    #wk-footer, #wk-footer p { color: #8f876f; font-size: 11px; }

    /* Títulos: página en blanco grande; secciones como etiquetas «DOFUS Y TROFEOS» */
    #wk-main > h1.wk-h1 { color: #fff; font: 800 26px/1.15 system-ui, sans-serif; margin: 10px 2px 4px; text-shadow: none; }
    #wk-main > .wk-sub { color: #b9b195; font-size: 13px; margin: 0 2px 12px; }
    #wiki-view #wk-main h2.wk-h2 {
        background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important;
        margin: 20px 2px 8px; padding: 0; gap: 8px; color: var(--mw-lbl);
        font: 800 12px/1.2 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase;
    }
    #wiki-view #wk-main h2.wk-h2 img { width: 20px; height: 20px; }
    #wiki-view #wk-main h2.wk-h2 a { color: var(--mw-or); }
    #wiki-view #wk-main .wk-h2-lvl { color: #9d9580; text-transform: none; letter-spacing: 0; }

    /* Bloques de contenido como tarjetas pergamino */
    #wiki-view .wk-box, #wiki-view #wk-main > .wk-list:not(.grid), #wiki-view .wk-cols .wk-list:not(.grid) {
        background: var(--mw-card); color: var(--mw-ink); border: 0 !important; border-radius: 16px !important; overflow: hidden;
    }
    #wiki-view .wk-box:not(.flush) { padding: 12px 14px; }
    #wiki-view .wk-fx li:nth-child(odd), #wiki-view .wk-list:not(.grid) li:nth-child(odd) { background: rgba(59,52,40,.07); }
    #wiki-view .wk-fx li:nth-child(even), #wiki-view .wk-list:not(.grid) li:nth-child(even) { background: transparent; }
    #wiki-view .wk-fx li { padding: 9px 14px; font-size: 14px; color: var(--mw-ink); }
    #wiki-view .wk-fx li + li, #wiki-view .wk-list:not(.grid) li + li { border-top: 1px solid rgba(59,52,40,.1); }
    #wiki-view table.wk-t { background: transparent; }
    #wk-main .wk-muted.wk-small, #wk-main > p.wk-note, #wk-main > .wk-count, #wk-main .wk-count { color: #a39b80; }

    /* Cabecera de ficha: tarjeta héroe como la de Mi set */
    #wiki-view .wk-head {
        background: var(--mw-card) !important; color: var(--mw-ink); border-radius: 20px; padding: 18px 14px 16px; margin-top: 8px;
        box-shadow: 0 6px 18px rgba(0,0,0,.35);
    }
    #wiki-view .wk-head h1.wk-h1 { color: var(--mw-ink); text-shadow: none; font: 800 22px/1.2 system-ui, sans-serif; margin: 6px 0 4px; }
    #wiki-view .wk-head .wk-sub { color: var(--mw-ink2); }
    #wiki-view .wk-head .wk-desc, #wiki-view .wk-head .wk-muted { color: var(--mw-ink2); }
    #wiki-view .wk-head > .wk-ico.lg, #wiki-view .wk-head-ico .wk-ico.lg { background: var(--mw-card2); box-shadow: inset 0 0 0 1px rgba(59,52,40,.12); border-radius: 18px; }
    #wiki-view .wk-head .wk-tag { background: rgba(59,52,40,.12) !important; border: 1px solid rgba(59,52,40,.18); color: var(--mw-ink) !important; box-shadow: none; padding: 3px 10px 3px 5px; font-size: 12px; font-weight: 700; }
    #wiki-view .wk-head .wk-tag:not(:has(img)) { padding-left: 10px; }
    #wiki-view .wk-head .wk-tag a, #wiki-view .wk-head a.wk-tag { color: #fff !important; }
    #wiki-view .wk-head .wk-tag img { filter: drop-shadow(0 1px 0 rgba(0,0,0,.25)); }
    #wiki-view .wk-head a:not(.wk-tag) { color: #b84a06; }

    /* Portada: primero la cuadrícula de categorías, luego los recomendados */
    body.wk-home #wk-main { display: flex; flex-direction: column; }
    body.wk-home #wk-main > * { order: 1; }
    body.wk-home #wk-main > .wk-rec { order: 2; margin-top: 12px; }
    body.wk-home #wk-main > h2.wk-h2:has(+ .wk-classes), body.wk-home #wk-main > .wk-classes { order: 3; }
    body.wk-home #wk-main > .wk-note { order: 4; }
    #wiki-view .wk-cards { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px; margin-top: 0 !important; }
    #wiki-view .wk-card {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
        min-height: 98px; padding: 12px 6px 10px; border: 0 !important; border-radius: 16px; background: var(--mw-card) !important; color: var(--mw-ink);
        box-shadow: 0 3px 0 rgba(0,0,0,.25); transition: transform .1s;
    }
    #wiki-view .wk-card:hover { transform: none; }
    #wiki-view .wk-card:active { transform: scale(.95); }
    #wiki-view .wk-card img { width: 46px; height: 46px; background: none; border: 0; padding: 0; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
    #wiki-view .wk-card b { color: var(--mw-ink); font: 800 12.5px/1.15 system-ui, sans-serif; }
    #wiki-view .wk-card small { display: none; }
    #wiki-view .wk-classes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 0; }
    #wiki-view .wk-classes a { background: var(--mw-tile); border: 0; border-radius: 16px; color: #e9e2c8; padding: 8px 2px; }
    #wiki-view .wk-classes a:active { transform: scale(.95); }
    #wiki-view .wk-classes .wk-cls-em { width: 58px; height: 58px; }
    #wiki-view .wk-classes img { width: 58px; height: 58px; }
    #wiki-view .wk-classes .wk-cls-em img.wk-cls-g { height: 44px; max-width: 32px; }
    #wiki-view .wk-classes b { font: 700 11.5px system-ui, sans-serif; }

    /* Listados: tarjetas pergamino con nivel naranja */
    #wiki-view .wk-list.grid li { background: var(--mw-card) !important; border: 0 !important; box-shadow: 0 3px 0 rgba(0,0,0,.22); }
    #wiki-view .wk-list.grid .wk-row, #wiki-view .wk-list.grid .wk-name small, #wiki-view .wk-list.grid .wk-fxm { color: var(--mw-ink); }
    #wiki-view .wk-list.grid .wk-name b { color: var(--mw-ink); }
    #wiki-view .wk-list.grid .wk-name small { color: var(--mw-ink2); }
    #wiki-view .wk-list.grid .wk-ico { background-color: var(--mw-card2); }
    #wiki-view .wk-list .wk-row .wk-lvl { background: rgba(59,52,40,.12) !important; color: var(--mw-ink2) !important; border: 0; border-radius: 99px; padding: 3px 9px; font: 700 11px system-ui, sans-serif; box-shadow: none; }
    #wiki-view .wk-filters { background: var(--mw-card) !important; border: 0 !important; box-shadow: 0 3px 0 rgba(0,0,0,.22); }
    #wiki-view .wk-filters > input[name="q"] { background: #fff; border: 0; }
    /* Recomendados sobre fondo oscuro */
    #wiki-view .wk-rec { margin-left: 0 !important; margin-right: 0 !important; }
    #wiki-view .wk-spot { border-radius: 20px; }
    #wiki-view .wk-car-t b { color: #fff !important; font: 800 17px system-ui, sans-serif; }
    #wiki-view .wk-car-t small { color: #b9b195 !important; }
    #wiki-view .wk-car-all { color: var(--mw-or) !important; font-weight: 800; }
    #wiki-view .wk-more { background: var(--mw-or); color: #fff; border: 0; box-shadow: 0 3px 0 #b84a06; font-weight: 800; }
}

/* ── Móvil: transiciones entre páginas (adelante ← derecha, atrás → izquierda) y gesto de regreso ── */
@keyframes wkPushIn { from { transform: translateX(36%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wkPopIn  { from { transform: translateX(-26%); opacity: .25; } to { transform: none; opacity: 1; } }
@media (max-width: 1319px) {
    #wiki-view { overflow-x: clip; }
    #wk-main { will-change: auto; }
    #wk-main.wk-swiping { will-change: transform; box-shadow: -14px 0 24px -12px rgba(0,0,0,.6); }
    #wk-main.wk-slide-push { animation: wkPushIn .26s cubic-bezier(.2,.8,.3,1) both; }
    #wk-main.wk-slide-pop  { animation: wkPopIn .26s cubic-bezier(.2,.8,.3,1) both; }
}
@media (max-width: 1319px) and (prefers-reduced-motion: reduce) {
    #wk-main.wk-slide-push, #wk-main.wk-slide-pop { animation: none; }
}
@media (max-width: 1319px) {
    /* Tablas (mazmorras, zonas, botín…): tarjeta de pergamino con filas legibles */
    #wiki-view .wk-tscroll { background: var(--mw-card); border-radius: 16px; box-shadow: 0 4px 14px rgba(0,0,0,.3); overflow: hidden; overflow-x: auto; }
    #wiki-view table.wk-t { font-size: 13px; }
    #wiki-view table.wk-t td { background: var(--mw-card) !important; color: var(--mw-ink) !important; padding: 8px 8px; border-top: 1px solid rgba(59,52,40,.12); }
    #wiki-view table.wk-t tr:nth-child(even) td { background: var(--mw-card2) !important; }
    #wiki-view table.wk-t td a { color: #7a3b0c !important; font-weight: 700; }
    #wiki-view table.wk-t td.c { color: var(--mw-ink2) !important; font-weight: 700; }
    #wiki-view table.wk-t th { padding: 8px; font-size: 12px; }
}

/* Icono de monstruo con el mismo cuadro que los objetos (p. ej. jefe de mazmorra sin llave) */
.wk-ico.mon.wk-framed { background: #bdb99a; border: 1px solid #908862; border-radius: 4px; padding: 2px; box-sizing: border-box; object-fit: contain; }

/* Filtro de nivel: sin flechas del input numérico */
.wk-lvl-in input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.wk-lvl-in input[type="number"]::-webkit-inner-spin-button,
.wk-lvl-in input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* Página de set: lista vertical con todas las características */
.wk-fxm.wk-fxm-list { flex-direction: column; flex-wrap: nowrap; gap: 3px; margin-top: 5px; font-size: 12.5px; }
.wk-fxm.wk-fxm-list span { white-space: normal; }
.wk-fxm.wk-fxm-list img { width: 15px; height: 15px; }
.wk-row-set { align-items: flex-start; }
.wk-row-set .wk-lvl { align-self: flex-start; margin-top: 4px; }
/* Bonus total del set */
.wk-total-sub { margin: 0; padding: 5px 10px; font-size: 11.5px; color: var(--txl, #4a3c1c); border-bottom: 1px solid rgba(0,0,0,.08); }
.wk-total .wk-fx li { font-weight: 600; }
/* Contenido que pinta el Worker antes de que cargue la app (lo reemplaza la ficha completa) */
.wk-ssr { padding: 10px 16px 30px; color: var(--tx, #1e180a); line-height: 1.45; }
.wk-ssr h1 { font-size: 24px; margin: 6px 0 10px; }
.wk-ssr h2 { font-size: 16px; margin: 16px 0 6px; }
.wk-ssr img { display: block; margin: 0 0 8px; }
.wk-ssr ul { margin: 0; padding-left: 20px; }
/* Región: cuadritos con el sprite de cada monstruo de la subzona */
.wk-mobsq { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wk-mobsq a { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 8px; background: var(--bg-light); border: 1px solid var(--slot-bd); transition: transform .12s, border-color .12s; }
.wk-mobsq a:hover { transform: translateY(-2px); border-color: #fe6c0f; }
.wk-mobsq .wk-ico { width: 40px; height: 40px; object-fit: contain; }
