/* wumiku.lubalink.com/wiki — la wiki del juego (páginas generadas por tools/build_wiki.py).
   Usa los tokens --wk-* de wumiku.css y las piezas de base.css (.lb-container, .lb-eyebrow…). */

.wk-wiki-main { padding-bottom: clamp(56px, 8vw, 96px); min-height: 70vh; }
.wk-wiki-body { min-width: 0; }
.wk-wiki-body a:not(.wk-card):not(.wk-cat):not(.lb-btn) { color: var(--wk-teal-soft); text-decoration: underline; text-decoration-color: rgba(154, 245, 242, .3); text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.wk-wiki-body a:not(.wk-card):not(.wk-cat):not(.lb-btn):hover { color: var(--wk-ink); text-decoration-color: var(--wk-teal); }
.wk-muted { color: var(--wk-muted); font-weight: 400; }
.wk-note { color: var(--wk-muted); font-size: 14px; margin: 10px 0; }

/* ---------- Barra de la wiki: migas y buscador ---------- */
.wk-wikibar { background: var(--wk-deep); border-bottom: 1px solid var(--wk-line); }
.wk-wikibar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding-block: 8px; }
.wk-crumbs { min-width: 0; }
.wk-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--wk-muted); }
.wk-crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.wk-crumbs li + li::before { content: "›"; margin: 0 8px; color: var(--wk-teal); opacity: .7; }
.wk-crumbs a { color: var(--wk-muted); transition: color .2s; }
.wk-crumbs a:hover { color: var(--wk-ink); }
.wk-crumbs [aria-current] { color: var(--wk-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
@media (max-width: 960px) {
  /* la fila de enlaces del juego queda absoluta bajo la barra en móvil */
  .wk-wikibar, .wk-wiki-hero { margin-top: 46px; }
}
@media (max-width: 720px) {
  .wk-wikibar__inner { flex-direction: column; align-items: stretch; gap: 8px; padding-block: 10px; }
}

/* ---------- Buscador ---------- */
.wk-search { position: relative; width: min(100%, 360px); flex: none; }
.wk-search input { width: 100%; height: 40px; padding: 0 16px 0 40px; border: 0; border-radius: 999px; font: inherit; font-size: 15px; color: var(--wk-ink);
  background: rgba(7, 19, 24, .7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239AF5F2' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px 50% / 18px;
  box-shadow: inset 0 0 0 1px var(--wk-line); transition: box-shadow .2s; }
.wk-search input::placeholder { color: var(--wk-muted); }
.wk-search input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--wk-teal); }
.wk-search input::-webkit-search-cancel-button { filter: invert(.8); }
.wk-search__results { position: absolute; z-index: 80; top: calc(100% + 6px); left: 0; right: 0; max-height: min(420px, 60vh); overflow-y: auto; padding: 6px;
  background: #0A1C21; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--wk-line), 0 24px 48px -16px rgba(0, 0, 0, .8); }
.wk-search__results li a, .wk-search__results li.wk-search__empty { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 10px; }
.wk-search__results li a { color: var(--wk-ink); text-decoration: none; }
.wk-search__results li a:hover, .wk-search__results li a[aria-selected="true"] { background: var(--wk-teal-lo); }
.wk-search__results strong { font-weight: 600; }
.wk-search__results small { font-size: 12px; color: var(--wk-muted); }
.wk-search__results li.wk-search__empty { color: var(--wk-muted); font-size: 14px; }
@media (max-width: 720px) { .wk-search { width: 100%; } }

/* ---------- Portada ---------- */
.wk-wiki-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 4vw, 48px); max-width: 760px; }
.wk-wiki-hero .wk-title { margin-top: 14px; }
.wk-search--hero { width: 100%; margin-top: 28px; }
.wk-search--hero input { height: 56px; font-size: 17px; padding-left: 50px; background-position: 18px 50%; background-size: 22px; }
.wk-wiki-hero__hint { margin-top: 12px; font-size: 13px; color: var(--wk-muted); }
.wk-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.wk-cat { display: flex; gap: 18px; align-items: flex-start; height: 100%; padding: 22px; border-radius: 18px; background: var(--wk-deep);
  box-shadow: inset 0 0 0 1px var(--wk-line); transition: box-shadow .2s, background .2s, transform .2s var(--lb-ease); }
.wk-cat:hover { background: var(--wk-panel); box-shadow: inset 0 0 0 1px rgba(67, 229, 224, .55); transform: translateY(-2px); }
.wk-cat__icon { flex: none; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; background: radial-gradient(circle at 50% 40%, rgba(67, 229, 224, .18), transparent 70%); }
.wk-cat__icon img { width: 48px; height: 48px; }
.wk-cat__body { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; min-width: 0; }
.wk-cat__name { font-family: var(--wk-font-display); font-size: 21px; font-weight: 600; line-height: 1.2; }
.wk-cat__count { font-family: var(--wk-font-display); font-weight: 600; color: var(--wk-teal); font-variant-numeric: tabular-nums; }
.wk-cat__blurb { grid-column: 1 / -1; color: var(--wk-muted); font-size: 14px; }

/* ---------- Cabecera de página ---------- */
.wk-page-head { display: flex; align-items: center; gap: 20px; margin: clamp(28px, 4vw, 48px) 0 clamp(20px, 3vw, 32px); }
.wk-page-head__icon { width: 72px; height: 72px; flex: none; }
.wk-page-title { font-size: clamp(30px, 4.2vw, 50px); font-weight: 600; margin-top: 12px; text-wrap: balance; overflow-wrap: anywhere; }
.wk-page-head__sub { color: var(--wk-teal-soft); margin-top: 8px; font-weight: 600; }
.wk-page-head .wk-lead { margin-top: 12px; }
.wk-lead--quest { color: var(--wk-ink); margin: 0 0 18px; font-size: 19px; }

/* ---------- Detalle: texto + ficha ---------- */
.wk-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(24px, 4vw, 48px); align-items: start; }
.wk-detail__main { min-width: 0; }
.wk-detail__main > :first-child { margin-top: 0; }
.wk-infobox { position: sticky; top: calc(var(--wk-nav-h) + 16px); padding: 20px; border-radius: 18px; background: var(--wk-panel); box-shadow: inset 0 0 0 1px var(--wk-line); min-width: 0; }
.wk-infobox__art { display: grid; place-items: center; height: 140px; margin: -4px -4px 16px; border-radius: 14px;
  background: radial-gradient(circle at 50% 45%, rgba(67, 229, 224, .22), transparent 65%), var(--wk-deep); }
.wk-infobox__art img { width: 96px; height: 96px; image-rendering: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5)); }
.wk-infobox__title { font-family: var(--wk-font-display); font-size: 22px; font-weight: 600; margin-bottom: 10px; overflow-wrap: anywhere; }
.wk-infobox dl { margin: 0; display: grid; }
.wk-infobox dl > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--wk-line); font-size: 14px; }
.wk-infobox dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--wk-teal); padding-top: 2px; }
.wk-infobox dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .wk-detail { grid-template-columns: minmax(0, 1fr); }
  .wk-infobox { position: static; order: -1; }
}

/* ---------- Bloques, prosa, citas ---------- */
.wk-block { margin-top: clamp(28px, 4vw, 44px); min-width: 0; }
.wk-h2 { font-family: var(--wk-font-display); font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--wk-line); }
.wk-h3 { font-family: var(--wk-font-display); font-size: 18px; font-weight: 600; margin: 22px 0 10px; }
.wk-prose { display: grid; gap: 12px; max-width: 70ch; color: #D3E0E4; font-size: 17px; }
.wk-flavor { font-style: italic; color: #D3E0E4; }
.wk-quote { margin: 10px 0; padding: 10px 16px; border-left: 3px solid var(--wk-teal); border-radius: 0 10px 10px 0; background: rgba(12, 31, 37, .7); color: #D3E0E4; font-style: italic; max-width: 70ch; }
.wk-quote .wk-muted { font-style: normal; font-size: 12px; letter-spacing: .08em; margin-right: 8px; }
.wk-quote--big { font-family: var(--wk-font-display); font-size: 21px; color: var(--wk-teal-soft); }
.wk-details { margin-top: clamp(24px, 3vw, 36px); border-radius: 14px; background: var(--wk-deep); box-shadow: inset 0 0 0 1px var(--wk-line); padding: 0 18px; }
.wk-details summary { cursor: pointer; padding: 14px 0; font-family: var(--wk-font-display); font-weight: 600; font-size: 17px; color: var(--wk-ink); }
.wk-details summary::marker { color: var(--wk-teal); }
.wk-details[open] { padding-bottom: 12px; }
.wk-details .wk-h3:first-of-type { margin-top: 4px; }

/* ---------- Listas ---------- */
.wk-links { display: flex; flex-wrap: wrap; gap: 8px; }
.wk-links li { padding: 6px 12px; border-radius: 999px; background: var(--wk-deep); box-shadow: inset 0 0 0 1px var(--wk-line); font-size: 15px; }
.wk-ico { display: inline-block; width: 24px; height: 24px; vertical-align: middle; margin: -3px 8px -1px 0; object-fit: contain; }
.wk-bullets { list-style: disc; padding-left: 22px; display: grid; gap: 6px; color: #D3E0E4; }
.wk-objectives { margin: 0; padding: 0; list-style: none; counter-reset: obj; display: grid; gap: 8px; }
.wk-objectives li { counter-increment: obj; position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 16px 12px 48px; border-radius: 12px; background: var(--wk-deep); box-shadow: inset 0 0 0 1px var(--wk-line); }
.wk-objectives li::before { content: counter(obj); position: absolute; left: 14px; top: 12px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 700; color: #04201F; background: var(--wk-teal); }
.wk-obj__text { font-weight: 600; }
.wk-obj__target { color: var(--wk-muted); font-size: 14px; }
.wk-count { color: var(--wk-teal); font-weight: 700; }
.wk-rewards { display: grid; gap: 6px; }
.wk-rewards li { position: relative; padding-left: 22px; }
.wk-rewards li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; transform: rotate(45deg); background: var(--wk-gold); border-radius: 2px; }
.wk-rewards .wk-story { font-style: italic; color: #D3E0E4; }
.wk-route { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; counter-reset: r; }
.wk-route li { counter-increment: r; padding: 6px 12px; border-radius: 999px; background: var(--wk-deep); box-shadow: inset 0 0 0 1px var(--wk-line); font-size: 15px; }
.wk-route li::before { content: counter(r) " · "; color: var(--wk-teal); font-weight: 700; }
.wk-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.wk-toc li a { display: inline-flex; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--wk-deep); box-shadow: inset 0 0 0 1px var(--wk-line); font-size: 14px; text-decoration: none !important; color: var(--wk-ink) !important; }
.wk-toc li a:hover { box-shadow: inset 0 0 0 1px var(--wk-teal); }
.wk-mini-dl { display: grid; gap: 0; margin: 0; max-width: 70ch; }
.wk-mini-dl > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--wk-line); }
.wk-mini-dl dt { color: var(--wk-teal); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding-top: 3px; }
.wk-mini-dl dd { margin: 0; }
.wk-mini-dl--wide { max-width: none; }
@media (max-width: 560px) { .wk-mini-dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ---------- Tarjetas ---------- */
.wk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.wk-card { display: flex; align-items: center; gap: 12px; height: 100%; padding: 10px 14px; border-radius: 14px; background: var(--wk-deep); box-shadow: inset 0 0 0 1px var(--wk-line); transition: box-shadow .2s, background .2s; }
.wk-card:hover { background: var(--wk-panel); box-shadow: inset 0 0 0 1px rgba(67, 229, 224, .55); }
.wk-card__icon { width: 48px; height: 48px; flex: none; object-fit: contain; }
.wk-card__text { display: flex; flex-direction: column; min-width: 0; }
.wk-card__name { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.wk-card__sub { font-size: 13px; color: var(--wk-muted); }
.wk-subgroup + .wk-subgroup { margin-top: 8px; }

/* ---------- Tablas ---------- */
.wk-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--wk-line); background: rgba(12, 31, 37, .55); }
.wk-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.wk-table th { position: sticky; top: 0; text-align: left; padding: 11px 14px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--wk-teal); background: var(--wk-deep); white-space: nowrap; }
.wk-table td { padding: 10px 14px; border-top: 1px solid var(--wk-line); vertical-align: top; }
.wk-table td:first-child { font-weight: 600; min-width: 150px; }
.wk-table tbody tr:hover td { background: rgba(67, 229, 224, .04); }
.wk-table + .wk-note { margin-top: 10px; }

/* ---------- Filtro de listas ---------- */
.wk-filter { margin: 18px 0 4px; max-width: 420px; }
.wk-filter input { width: 100%; height: 44px; padding: 0 16px; border: 0; border-radius: 12px; font: inherit; color: var(--wk-ink); background: var(--wk-deep); box-shadow: inset 0 0 0 1px var(--wk-line); }
.wk-filter input::placeholder { color: var(--wk-muted); }
.wk-filter input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--wk-teal); }
.is-filtered-out { display: none !important; }

/* ---------- Clases: habilidades ---------- */
.wk-skills { display: grid; gap: 12px; }
.wk-skill { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding: 18px; border-radius: 16px; background: var(--wk-deep); box-shadow: inset 0 0 0 1px var(--wk-line); }
.wk-skill__icon { width: 56px; height: 56px; }
.wk-skill h3 { font-family: var(--wk-font-display); font-size: 20px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wk-skill__body > p { margin-top: 6px; color: #D3E0E4; }
.wk-skill__type { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--wk-teal) !important; }
.wk-skill__facts { font-size: 14px; color: var(--wk-muted) !important; }
.wk-skill .wk-mini-dl { margin-top: 10px; }
.wk-tag { font-family: var(--wk-font); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; color: var(--wk-gold); box-shadow: inset 0 0 0 1px rgba(255, 204, 77, .45); }
.wk-evols { margin-top: 12px; display: grid; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--wk-line); font-size: 15px; color: #D3E0E4; }
@media (max-width: 480px) { .wk-skill { grid-template-columns: 40px minmax(0, 1fr); padding: 14px; gap: 12px; } .wk-skill__icon { width: 40px; height: 40px; } }

/* ---------- Facciones ---------- */
.wk-faction { padding: 4px 0 12px; border-bottom: 1px solid var(--wk-line); }
.wk-faction p { margin-top: 6px; color: #D3E0E4; }
.wk-faction .wk-details { margin-top: 10px; }

/* ---------- Móvil: listas más densas ---------- */
@media (max-width: 560px) {
  .wk-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .wk-card { gap: 8px; padding: 8px 10px; border-radius: 12px; }
  .wk-card__icon { width: 34px; height: 34px; }
  .wk-card__name { font-size: 14px; }
  .wk-card__sub { font-size: 12px; }
  .wk-infobox { padding: 16px; }
  .wk-infobox__art { height: 112px; }
  .wk-infobox dl > div { grid-template-columns: 104px minmax(0, 1fr); padding: 7px 0; }
  .wk-table { font-size: 14px; }
  .wk-table th, .wk-table td { padding: 9px 10px; }
  .wk-table td:first-child { min-width: 130px; }
  .wk-prose { font-size: 16px; }
}
.wk-mini-dl + .wk-table-wrap { margin-top: 18px; }
