@charset "UTF-8";
/* =====================================================================
   Walkirya OS — «wiki» layer of the game reference (/db) and the guides:
   creature portraits, article infobox, table of contents, picture cards,
   level tiles, filters, chance meters. Colors come only from the portal-os
   tokens (--os-*), so «Синяя» and «Тёмная» both work; the few hard-coded
   shadows have a «Синяя» block at the end. Layout never depends on the theme.
   Loaded automatically after portal-os-db.css / portal-os-kb.css.
   ===================================================================== */

/* ---------- creature portrait ---------- */
body.os-site .wk-pt {
  position: relative; display: inline-block; flex: none; line-height: 0; overflow: hidden; vertical-align: middle;
  border-radius: 12px; background: radial-gradient(120% 100% at 50% 20%, var(--os-3), var(--os-4));
  box-shadow: 0 0 0 1px var(--os-line-2), 0 4px 12px rgba(0, 0, 0, .25);
}
body.os-site .wk-pt img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
body.os-site .wk-pt.wk-boss { box-shadow: 0 0 0 2px var(--os-gold), 0 0 16px color-mix(in srgb, var(--os-gold) 45%, transparent); }
body.os-site .wk-pt-none { display: inline-grid; place-items: center; background: linear-gradient(145deg, var(--os-4), var(--os-2)); color: var(--os-muted); }
body.os-site .wk-pt-none b { font: italic 800 1.3em/1 var(--os-logo); letter-spacing: -.02em; }
body.os-site .wk-pt-s { width: 40px; height: 40px; border-radius: 9px; margin-right: 10px; box-shadow: 0 0 0 1px var(--os-line-2); }
body.os-site .wk-pt-s.wk-boss { box-shadow: 0 0 0 2px var(--os-gold); }
body.os-site .wk-pt-xl { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 14px; }
body.os-site .wk-pt-xl img { width: 100%; height: 100%; }
body.os-site .wk-pt-xl.wk-pt-none { font-size: 54px; }

/* table cell: picture/icon + name */
body.os-site .db-page .table-wrap td.wk-name { white-space: normal; }
body.os-site .db-page .table-wrap td.wk-name > :is(.wk-pt, .db-icon) { margin-right: 10px; }
body.os-site .db-page .table-wrap td.wk-name > a { font-weight: 700; vertical-align: middle; }
body.os-site .db-page .table-wrap table.wk-sortable th[data-sort] { cursor: pointer; user-select: none; }
body.os-site .db-page .table-wrap table.wk-sortable th[data-sort]::after { content: ' ↕'; opacity: .45; }
body.os-site .db-page .table-wrap table.wk-sortable th[data-dir='1']::after { content: ' ↑'; opacity: 1; }
body.os-site .db-page .table-wrap table.wk-sortable th[data-dir='-1']::after { content: ' ↓'; opacity: 1; }
body.os-site .db-page tr.wk-hide { display: none; }

/* ---------- page head / hero ---------- */
body.os-site .wk-head { max-width: 980px; }
body.os-site .wk-hero { padding: 6px 0 10px; }
body.os-site .wk-hero .db-search { max-width: 760px; }
body.os-site .wk-hero .db-search .input { height: 52px; font-size: 17px; }
body.os-site .wk-hero .db-search .btn { height: 52px; padding-inline: 26px; font-size: 16px; }
body.os-site .wk-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 4px; }
body.os-site .wk-quick > span { color: var(--os-muted); font-size: 13.5px; }
body.os-site .wk-quick a {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--os-line-2); background: var(--os-2); color: var(--os-text);
  font-size: 13.5px; text-decoration: none; transition: border-color .16s, background .16s, transform .16s;
}
body.os-site .wk-quick a:hover { border-color: var(--os-red); background: var(--os-3); transform: translateY(-1px); }

/* ---------- article layout: infobox on the right (phones: on top) ---------- */
body.os-site .wk-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 10px; }
body.os-site .wk-info {
  min-width: 0; padding: 14px; border-radius: 14px; border: 1px solid var(--os-line-2);
  background: linear-gradient(180deg, var(--os-2), var(--os-1)); box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
}
body.os-site .wk-info-title { margin: 12px 0 8px; display: grid; gap: 2px; }
body.os-site .wk-info-title b { font: italic 800 20px/1.2 var(--os-logo); color: var(--os-text); overflow-wrap: anywhere; }
body.os-site .wk-info-title span { color: var(--os-muted); font-size: 13.5px; }
body.os-site .wk-info .db-kv { margin: 10px 0 0; }
body.os-site .wk-info .db-note { margin: 10px 0 0; font-size: 12.5px; }
body.os-site .wk-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
body.os-site .wk-badges .badge { padding: 2px 9px; border-radius: 999px; font-size: 12px; }
body.os-site .wk-b-red { color: var(--os-red-hi); border-color: color-mix(in srgb, var(--os-red-hi) 55%, transparent); }
body.os-site .wk-b-green { color: var(--os-green); border-color: color-mix(in srgb, var(--os-green) 55%, transparent); }
body.os-site .wk-b-blue { color: var(--os-blue); border-color: color-mix(in srgb, var(--os-blue) 55%, transparent); }
body.os-site .wk-main { min-width: 0; }
@media (min-width: 960px) {
  body.os-site .wk-layout { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
  body.os-site .wk-info { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--db-sticky-top, 53px) + 14px); }
  body.os-site .wk-main { grid-column: 1; grid-row: 1; }
}
@media (max-width: 959px) {
  /* phones: a compact info card — picture beside the title */
  body.os-site .wk-info { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 14px; align-items: start; }
  body.os-site .wk-info > .wk-pt-xl { grid-row: 1 / 3; width: 112px; }
  body.os-site .wk-info > .wk-info-title { margin-top: 0; }
  body.os-site .wk-info > .wk-badges { grid-column: 2; }
  body.os-site .wk-info > .db-kv, body.os-site .wk-info > .db-note { grid-column: 1 / -1; }
  body.os-site .wk-info.wk-info-item { display: block; }
}

/* ---------- table of contents ---------- */
body.os-site .wk-toc {
  display: inline-block; min-width: 230px; max-width: 100%; margin: 4px 0 8px; padding: 12px 18px 12px 16px; border-radius: 12px;
  border: 1px solid var(--os-line-2); background: var(--os-2);
}
body.os-site .wk-toc > b { display: block; margin-bottom: 6px; font: italic 700 14px var(--os-logo); letter-spacing: .02em; color: var(--os-text); }
body.os-site .wk-toc ol { margin: 0; padding-left: 20px; display: grid; gap: 3px; counter-reset: wk; }
body.os-site .wk-toc li { color: var(--os-muted); font-size: 14.5px; }
body.os-site .wk-toc a { text-decoration: none; }
body.os-site .wk-toc a:hover { text-decoration: underline; }
body.os-site .wk-sec { scroll-margin-top: calc(var(--db-sticky-top, 53px) + 12px); }

/* ---------- picture cards ---------- */
body.os-site .wk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 8px 0; }
body.os-site .wk-cards-s { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
body.os-site .wk-card {
  display: grid; gap: 4px; align-content: start; padding: 8px; border-radius: 14px; text-decoration: none; color: var(--os-text);
  border: 1px solid var(--os-line-2); background: linear-gradient(180deg, var(--os-2), var(--os-1));
  transition: transform .18s var(--os-ease, ease), border-color .18s, box-shadow .18s;
}
body.os-site .wk-card:hover { transform: translateY(-3px); border-color: var(--os-red); box-shadow: 0 10px 24px rgba(0, 0, 0, .28), 0 0 0 1px var(--os-red); }
body.os-site .wk-card .wk-pt { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 10px; }
body.os-site .wk-card .wk-pt img { height: 100%; }
body.os-site .wk-card .wk-pt-none { display: grid; font-size: 34px; }
body.os-site .wk-card b { font: 700 14.5px/1.25 var(--os-ui); overflow-wrap: anywhere; }
body.os-site .wk-card small { color: var(--os-muted); font-size: 12.5px; line-height: 1.3; }
body.os-site .wk-card-boss { border-color: color-mix(in srgb, var(--os-gold) 55%, var(--os-line-2)); }

/* level tiles */
body.os-site .wk-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; margin: 8px 0; }
body.os-site .wk-level {
  display: grid; justify-items: center; gap: 2px; padding: 10px 8px 12px; border-radius: 14px; text-decoration: none; text-align: center; color: var(--os-text);
  border: 1px solid var(--os-line-2); background: linear-gradient(180deg, var(--os-2), var(--os-1)); transition: transform .18s, border-color .18s, box-shadow .18s;
}
body.os-site .wk-level:hover { transform: translateY(-3px); border-color: var(--os-red); box-shadow: 0 10px 22px rgba(0, 0, 0, .26); }
body.os-site .wk-level .wk-pt { width: 96px; height: 96px; margin-bottom: 6px; border-radius: 50%; }
body.os-site .wk-level .wk-pt img { height: 100%; }
body.os-site .wk-level .wk-pt-none { display: grid; font-size: 30px; }
body.os-site .wk-level b { font: italic 800 19px var(--os-logo); }
body.os-site .wk-level small { color: var(--os-muted); font-size: 12.5px; }

/* top drop strip */
body.os-site .wk-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 10px; }
body.os-site .wk-strip > span { color: var(--os-muted); font-size: 13.5px; margin-right: 4px; }
body.os-site .wk-strip a { display: inline-grid; padding: 3px; border-radius: 8px; border: 1px solid var(--os-line-2); background: var(--os-2); transition: transform .16s, border-color .16s; }
body.os-site .wk-strip a:hover { transform: translateY(-2px); border-color: var(--os-red); }
body.os-site .wk-strip .db-icon { display: block; border-radius: 5px; }

/* filters */
body.os-site .wk-tools { margin: 8px 0 6px; }
body.os-site .wk-tools .wk-filter { width: 100%; max-width: 420px; height: 42px; }
body.os-site .wk-toggles { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 2px 0 6px; font-size: 14px; color: var(--os-text-2); }
body.os-site .wk-toggles label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
body.os-site .wk-empty { margin: 12px 0; color: var(--os-muted); }

/* item: framed icon, glow by grade */
body.os-site .wk-item-ico {
  --g: var(--os-muted); display: grid; place-items: center; width: 100px; height: 100px; margin: 0 auto 4px; border-radius: 18px;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--g) 28%, var(--os-3)), var(--os-4)); box-shadow: 0 0 0 2px var(--g), 0 0 24px color-mix(in srgb, var(--g) 40%, transparent);
}
body.os-site .wk-item-ico .db-icon { width: 64px; height: 64px; image-rendering: pixelated; }
body.os-site .wk-info-item[data-grade='D'] .wk-item-ico { --g: #7ab55c; }
body.os-site .wk-info-item[data-grade='C'] .wk-item-ico { --g: #4a9fe0; }
body.os-site .wk-info-item[data-grade='B'] .wk-item-ico { --g: #c056d6; }
body.os-site .wk-info-item[data-grade='A'] .wk-item-ico { --g: #e8b130; }
body.os-site .wk-info-item[data-grade='S'] .wk-item-ico { --g: #e5483f; }
body.os-site .wk-info-item .wk-info-title, body.os-site .wk-info-item .wk-badges { text-align: center; justify-content: center; }

/* an icon file that is missing must not show its alt text as a tall column */
body.os-site img.db-icon { font-size: 0; color: transparent; background: var(--os-3); }

/* drop tables: bigger icons, readable meter */
body.os-site .wk-drop .db-icon { width: 32px; height: 32px; border-radius: 6px; }

/* guides (/kb) article furniture, used by the article renderer */
body.os-site .kb-callout, body.os-site .wk-callout {
  display: grid; gap: 4px; margin: 14px 0; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--os-line-2); border-left: 4px solid var(--os-blue); background: var(--os-2);
}
body.os-site .wk-callout.tip { border-left-color: var(--os-green); }
body.os-site .wk-callout.warn { border-left-color: var(--os-gold); }
body.os-site .wk-callout.danger { border-left-color: var(--os-red-hi); }
body.os-site .wk-callout > b { font: italic 700 15px var(--os-logo); }

/* comic scene + banner */
body.os-site .wk-scene { margin: 6px 0; max-width: 420px; border-radius: 14px; overflow: hidden; border: 1px solid var(--os-line-2); background: var(--os-2); }
body.os-site .wk-scene img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
body.os-site .wk-scene figcaption { padding: 10px 14px; font: italic 600 15px/1.35 var(--os-logo); color: var(--os-text); }
body.os-site .wk-banner { margin: 6px 0 14px; border-radius: 14px; overflow: hidden; border: 1px solid var(--os-line-2); box-shadow: 0 8px 22px rgba(0, 0, 0, .25); }
body.os-site .wk-banner img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; max-height: 320px; }
html[data-theme="blue"] body.os-site .wk-banner { box-shadow: 0 6px 18px rgba(20, 45, 85, .14); }

/* search suggestions */
body.os-site .wk-suggest {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); max-width: 760px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--os-line-2); background: var(--os-1); box-shadow: 0 14px 30px rgba(0, 0, 0, .35);
}
body.os-site .wk-suggest a { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 12px; color: var(--os-text); text-decoration: none; border-bottom: 1px solid var(--os-line); }
body.os-site .wk-suggest a:last-child { border-bottom: 0; }
body.os-site .wk-suggest a:hover, body.os-site .wk-suggest a:focus-visible { background: var(--os-3); }
body.os-site .wk-suggest i { font-style: normal; color: var(--os-muted); font-size: 13px; text-align: center; }
body.os-site .wk-suggest small { color: var(--os-gold); }
html[data-theme="blue"] body.os-site .wk-suggest { box-shadow: 0 12px 26px rgba(20, 45, 85, .2); }

/* guides index / article extras */
body.os-site .kb-h2 { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; font: italic 700 clamp(17px, 1.7vw, 20px)/1.25 var(--os-logo); color: var(--os-text); }
body.os-site .kb-h2::before { content: ''; flex: none; width: 3px; height: 1.05em; border-radius: 2px; background: var(--os-red); box-shadow: 0 0 10px var(--os-red-glow); }
body.os-site .wk-anchor { margin-left: 8px; color: var(--os-muted); font-weight: 400; text-decoration: none; opacity: 0; transition: opacity .15s; }
body.os-site .article-prose :is(h2, h3):hover > .wk-anchor, body.os-site .wk-anchor:focus-visible { opacity: 1; }
body.os-site .wk-progress { position: fixed; left: 0; top: 0; right: 0; height: 3px; z-index: 9500; transform-origin: 0 50%; transform: scaleX(0); background: var(--os-red); box-shadow: 0 0 8px var(--os-red-glow); pointer-events: none; }
body.os-site .article-prose :is(h2, h3) { scroll-margin-top: 70px; }

/* phones */
@media (max-width: 560px) {
  body.os-site .wk-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  body.os-site .wk-levels { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  body.os-site .wk-level .wk-pt { width: 72px; height: 72px; }
  body.os-site .wk-level b { font-size: 16px; }
  body.os-site .wk-hero .db-search .input, body.os-site .wk-hero .db-search .btn { height: 46px; }
  body.os-site .wk-toc { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  body.os-site .wk-card, body.os-site .wk-level, body.os-site .wk-quick a, body.os-site .wk-strip a { transition: none; }
  body.os-site .wk-card:hover, body.os-site .wk-level:hover { transform: none; }
}

/* ---------- «Синяя»: lighter shadows (colors come from the tokens) ---------- */
html[data-theme="blue"] body.os-site .wk-pt { box-shadow: 0 0 0 1px var(--os-line-2), 0 3px 10px rgba(20, 45, 85, .16); }
html[data-theme="blue"] body.os-site .wk-info { box-shadow: 0 6px 18px rgba(20, 45, 85, .12); }
html[data-theme="blue"] body.os-site .wk-card:hover { box-shadow: 0 8px 20px rgba(20, 45, 85, .18), 0 0 0 1px var(--os-red); }
html[data-theme="blue"] body.os-site .wk-level:hover { box-shadow: 0 8px 18px rgba(20, 45, 85, .16); }
html[data-theme="blue"] body.os-site .wk-pt-none { background: linear-gradient(145deg, var(--os-3), var(--os-2)); }

/* quest giver card is not a link */
body.os-site div.wk-card-giver:hover { transform: none; box-shadow: none; border-color: var(--os-line-2); }
