/* DaoPixel RPG — официальный сайт. Один файл стилей на сайт и вики. Без внешних ресурсов. */

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-600.woff") format("woff");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-800.woff") format("woff");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Yeseva One";
  src: url("/assets/fonts/yeseva-one.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f6ecd4;
  --paper-2: #efe1c0;
  --panel: #fffaf0;
  --panel-2: #fbf1dc;
  --ink: #3a2817;
  --ink-2: #6f593f;
  --line: #e2cc97;
  --gold: #d9a531;
  --gold-2: #f6c648;
  --gold-dark: #9a6412;
  --wood: #4b3322;
  --wood-2: #33221a;
  --jade: #1f8a5f;
  --jade-dark: #14603f;
  --red: #b5362c;
  --shadow: 0 2px 0 rgba(120, 82, 22, .18), 0 10px 24px rgba(74, 51, 34, .12);
  --radius: 16px;
  --max: 1120px;
  --r-common: #3f9d68;
  --r-epic: #8e4fd0;
  --r-legendary: #cf8a12;
  --r-mythic: #c9333a;
  --r-meta: #2c93ab;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, .55), transparent 38%),
    radial-gradient(circle at 88% 30%, rgba(233, 205, 140, .35), transparent 42%);
  background-attachment: fixed;
  font: 600 17px/1.6 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; }
.pixel, .pixel img { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--jade-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--jade); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid #2a7fd6; outline-offset: 2px; border-radius: 6px;
}
h1, h2, h3 { font-family: "Yeseva One", "Nunito", Georgia, serif; font-weight: 400; line-height: 1.2; color: var(--wood-2); margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 5.2vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); }
h3 { font-size: 1.2rem; }
h4 { margin: 0 0 .3em; font-weight: 800; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin: .25em 0; }
small, .small { font-size: .88rem; }
.muted { color: var(--ink-2); }
.center { text-align: center; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.section { padding: 34px 0; }
.section-title { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 20px; }
.section-title::after {
  content: ""; width: 120px; height: 30px; margin-top: 4px;
  background: url("/assets/img/knot.webp") center / 60px 30px no-repeat;
  image-rendering: pixelated;
}
.section-title p { max-width: 640px; color: var(--ink-2); margin: .2em 0 0; }

/* ——— Шапка ——— */
.skip { position: absolute; left: -999px; top: 0; background: var(--panel); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(#5a3e29, var(--wood) 55%, var(--wood-2));
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 3px 12px rgba(40, 25, 12, .35);
}
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; margin-right: auto; }
.brand img { display: block; height: 40px; width: auto; }
.nav { order: 3; flex: 1 0 100%; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: none; padding: 5px 12px; border-radius: 999px; color: #f6e7c4; text-decoration: none; font-weight: 800; font-size: .95rem;
  border: 1px solid rgba(246, 198, 72, .28); background: rgba(0, 0, 0, .16);
}
.nav a:hover { background: rgba(246, 198, 72, .18); color: #fff; }
.nav a[aria-current="page"] { background: linear-gradient(#ffe08a, #f2b230); color: #4a2a08; border-color: #b8741a; }
@media (min-width: 900px) {
  .site-header .wrap { flex-wrap: nowrap; padding-top: 8px; padding-bottom: 8px; }
  .brand { margin-right: 10px; }
  .brand img { height: 46px; }
  .nav { order: 0; flex: 1 1 auto; margin: 0; padding: 0; overflow: visible; }
}

/* ——— Кнопки ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: 14px; font: 800 1.05rem/1.2 "Nunito", sans-serif; text-decoration: none; text-align: center;
  color: #4a2a08; background: linear-gradient(#ffe38e, #f9c443 45%, #f0a51f); border: 2px solid #b8741a;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), 0 3px 0 #8a5510, 0 8px 16px rgba(74, 42, 8, .22);
  cursor: pointer; transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { color: #4a2a08; filter: brightness(1.05); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 1px 0 #8a5510; }
.btn-jade { color: #fff; background: linear-gradient(#3fbf8b, #23936a 45%, #177551); border-color: #0f5238; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 3px 0 #0c4630, 0 8px 16px rgba(12, 70, 48, .22); }
.btn-jade:hover { color: #fff; }
.btn-cream { background: linear-gradient(#fffdf5, #f6e9c8); border-color: #c9a45a; box-shadow: inset 0 2px 0 #fff, 0 3px 0 #b08c44, 0 8px 16px rgba(74, 42, 8, .14); }
.btn-small { min-height: 38px; padding: 6px 14px; font-size: .95rem; border-radius: 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row.center { justify-content: center; }
.btn small { display: block; font-weight: 600; font-size: .78rem; opacity: .85; }

/* ——— Панели ——— */
.panel {
  background: linear-gradient(var(--panel), var(--panel-2)); border: 2px solid var(--gold); border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 0 0 3px rgba(255, 255, 255, .6); padding: 18px;
}
.panel > :last-child { margin-bottom: 0; }
.plate {
  display: inline-block; padding: 6px 22px; border-radius: 12px; color: #fbeecb;
  background: linear-gradient(#6a4a31, var(--wood)); border: 2px solid var(--gold); box-shadow: 0 3px 0 rgba(40, 25, 12, .35);
  font-family: "Yeseva One", serif;
}
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 800; line-height: 1.5;
  background: #efe0b8; color: var(--wood); border: 1px solid #d3b773; white-space: nowrap;
}
.badge-age { background: var(--wood); color: #ffe7a8; border-color: var(--gold); font-size: 1rem; padding: 2px 12px; }
.note { border-left: 4px solid var(--gold); background: rgba(255, 250, 240, .8); padding: 10px 14px; border-radius: 0 12px 12px 0; margin: 0 0 1em; }
.note-jade { border-left-color: var(--jade); }

/* ——— Первый экран ——— */
.hero { position: relative; color: #fff; overflow: hidden; background: #6fb6e6; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(22, 44, 60, .18), rgba(22, 44, 60, 0) 30%, rgba(42, 30, 14, .25) 80%, var(--paper) 100%); }
.hero .wrap { position: relative; z-index: 2; padding-top: 34px; padding-bottom: 54px; text-align: center; }
.hero-logo { width: min(86vw, 560px); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)); }
.hero-box {
  max-width: 720px; margin: 14px auto 0; padding: 18px 16px 16px; border-radius: 20px;
  background: linear-gradient(rgba(62, 42, 27, .88), rgba(43, 28, 18, .9)); border: 2px solid var(--gold);
  box-shadow: 0 10px 30px rgba(20, 14, 8, .45), inset 0 0 0 3px rgba(246, 198, 72, .16);
}
.hero h1 { color: #ffe9b0; margin: 0 auto 8px; font-size: clamp(1.55rem, 5vw, 2.4rem); }
.hero-lead { max-width: 600px; margin: 0 auto 16px; font-size: 1.05rem; color: #f6ead0; }
.hero-box a:not(.btn) { color: #ffe08a; }
.hero .btn-row { justify-content: center; }
.hero .btn { min-width: 230px; min-height: 58px; font-size: 1.15rem; }
.hero-soon { margin: 0; line-height: 2.2; }
.hero-soon .plate { font-size: 1.25rem; padding: 2px 22px; background: none; border: 2px dashed rgba(246, 198, 72, .7); color: #ffe08a; box-shadow: none; }
.hero-meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; align-items: center; font-size: .88rem; color: #e9d9b5; }
.hero-cast { display: none; }
@media (min-width: 900px) {
  .hero .wrap { padding-top: 56px; padding-bottom: 90px; }
  .hero-cast { display: block; position: absolute; bottom: -40px; z-index: 1; height: 86%; width: auto; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .4)); pointer-events: none; }
  .hero-cast-l { left: max(0px, calc(50% - 720px)); }
  .hero-cast-r { right: max(0px, calc(50% - 720px)); }
}
@media (min-width: 900px) and (max-width: 1280px) { .hero-cast { opacity: .0; } }

/* Полоса заголовка внутренних страниц */
.page-head { position: relative; overflow: hidden; background: #5b88a8; color: #fff; text-align: center; }
.page-head img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.page-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(30, 40, 50, .35), rgba(42, 30, 14, .6)); }
.page-head .wrap { position: relative; z-index: 2; padding-top: 26px; padding-bottom: 26px; }
.page-head h1 { color: #fff; margin: 0; text-shadow: 0 2px 0 rgba(40, 25, 12, .7), 0 0 16px rgba(20, 30, 40, .7); }
.page-head p { margin: 8px auto 0; max-width: 680px; text-shadow: 0 1px 0 rgba(40, 25, 12, .9); }

/* ——— Главная: блоки ——— */
.about { display: grid; gap: 18px; align-items: center; }
@media (min-width: 860px) { .about { grid-template-columns: 1.15fr .85fr; } }
.about-art { border-radius: var(--radius); border: 2px solid var(--gold); box-shadow: var(--shadow); display: block; width: 100%; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.facts li { margin: 0; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.facts b { display: block; font-family: "Yeseva One", serif; font-weight: 400; font-size: 1.5rem; color: var(--jade-dark); line-height: 1.1; }
.facts span { font-size: .9rem; color: var(--ink-2); }

.shots { display: flex; gap: 14px; overflow-x: auto; padding: 6px 16px 18px; margin: 0 -16px; scroll-snap-type: x mandatory; scrollbar-color: var(--gold) transparent; }
.shots figure { flex: none; width: min(62vw, 250px); margin: 0; scroll-snap-align: center; }
.shots img { display: block; width: 100%; border-radius: 18px; border: 3px solid var(--wood); box-shadow: var(--shadow); background: #cfe6f2; }
.shots figcaption { font-size: .88rem; color: var(--ink-2); text-align: center; padding-top: 6px; line-height: 1.35; }

.feature { display: flex; flex-direction: column; }
.feature h3 { display: flex; align-items: center; gap: 8px; }
.feature img.feature-art { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 12px; }
.feature .more { margin-top: auto; font-weight: 800; }

/* ——— Карточки героев ——— */
.hero-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .hero-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 800px) { .hero-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1040px) { .hero-grid { grid-template-columns: repeat(5, 1fr); } }
.hero-card {
  position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  border-radius: 14px; border: 2px solid var(--rc, var(--gold)); background: var(--panel); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .12s ease;
}
.hero-card:hover { transform: translateY(-3px); color: var(--ink); }
.hero-card .art { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: linear-gradient(160deg, var(--rc-soft, #f3e3b6), #fff8e6 70%); }
.hero-card .art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.hero-card .rar { position: absolute; left: 6px; top: 6px; z-index: 2; background: var(--rc, var(--gold)); color: #fff; border: 0; text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.hero-card .px { position: absolute; right: 0; bottom: 0; z-index: 2; }
.hero-card .cap { padding: 8px 10px 10px; border-top: 2px solid var(--rc, var(--gold)); background: linear-gradient(var(--panel), var(--panel-2)); }
.hero-card .cap b { display: block; font-family: "Yeseva One", serif; font-weight: 400; font-size: 1.02rem; line-height: 1.2; }
.hero-card .cap span { font-size: .82rem; color: var(--ink-2); }
.hero-card .cap .f-dot { display: flex; }
.hero-grid + p, .wiki-cards + p { margin-top: 20px; }
.r-common { --rc: var(--r-common); --rc-soft: #cfeeda; }
.r-epic { --rc: var(--r-epic); --rc-soft: #e4d2f7; }
.r-legendary { --rc: var(--r-legendary); --rc-soft: #fbe5ae; }
.r-mythic { --rc: var(--r-mythic); --rc-soft: #f8cfcf; }
.r-meta { --rc: var(--r-meta); --rc-soft: #cdeef5; }
.badge-r { background: var(--rc); color: #fff; border-color: transparent; text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.f-dot { display: inline-flex; align-items: center; gap: 6px; }
.f-dot::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--fc, #999); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.f-metal { --fc: #c9ccd6; } .f-wood { --fc: #49a85a; } .f-water { --fc: #3a8fe0; } .f-fire { --fc: #e5532d; }
.f-earth { --fc: #b98845; } .f-yin { --fc: #6b4bb5; } .f-yang { --fc: #f3c531; } .f-chaos { --fc: #20b8a4; }

/* Пиксельный спрайт героя: лента кадров, шаг — одна клетка */
.px { width: 80px; height: 80px; overflow: hidden; }
.px img { display: block; width: 900%; max-width: none; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; animation: px-idle 1.25s steps(9) infinite; }
.px-2 { width: 160px; height: 160px; }
@keyframes px-idle { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .px img { animation: none; } html { scroll-behavior: auto; } .hero-card { transition: none; } }

/* ——— Новости ——— */
.news-list { display: grid; gap: 14px; }
.news-item { display: block; text-decoration: none; color: var(--ink); }
.news-item:hover h3 { color: var(--jade-dark); }
.news-item time, .article time { display: inline-block; font-size: .86rem; color: var(--ink-2); font-weight: 800; letter-spacing: .02em; }
.news-item h3 { margin: 2px 0 6px; }
.news-item p { margin: 0; color: var(--ink-2); }
.article h2 { margin-top: 1.3em; }
.article img { border-radius: 12px; border: 2px solid var(--gold); }

/* ——— Списки ссылок, FAQ, таблицы ——— */
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; font-weight: 800; }
.link-list a::after { content: "›"; font-size: 1.4rem; line-height: 1; color: var(--gold-dark); }
.link-list a:hover { border-color: var(--gold); background: #fff; }
.link-list small { display: block; font-weight: 600; color: var(--ink-2); }
details.faq { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
details.faq[open] { border-color: var(--gold); }
details.faq summary { cursor: pointer; padding: 12px 16px; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--gold-dark); }
details.faq[open] summary::after { content: "–"; }
details.faq .faq-body { padding: 0 16px 12px; }
details.faq .faq-body > :last-child { margin-bottom: 0; }

.table-scroll { overflow-x: auto; margin: 0 0 1em; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: linear-gradient(#6a4a31, var(--wood)); color: #fbeecb; font-weight: 800; white-space: nowrap; position: sticky; top: 0; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr:nth-child(even) { background: rgba(239, 225, 192, .35); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody th { font-weight: 800; }

/* ——— Подвал ——— */
.site-footer { margin-top: 30px; background: linear-gradient(var(--wood), var(--wood-2)); color: #ead9b4; border-top: 3px solid var(--gold); font-size: .95rem; }
.site-footer .wrap { padding-top: 26px; padding-bottom: 26px; }
.site-footer a { color: #ffe7a8; }
.site-footer h4 { color: #fff; font-family: "Yeseva One", serif; font-weight: 400; font-size: 1.05rem; margin-bottom: 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.footer-cols { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
@media (min-width: 800px) { .footer-cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-about { grid-column: 1 / -1; }
@media (min-width: 800px) { .footer-about { grid-column: auto; } }
.footer-note { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(246, 198, 72, .3); font-size: .86rem; color: #cdb98e; }
.social { display: flex; flex-wrap: wrap; gap: 8px; }
.social a { display: inline-block; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(246, 198, 72, .5); text-decoration: none; font-weight: 800; }
.social a:hover { background: rgba(246, 198, 72, .18); color: #fff; }

/* ——— Вики ——— */
.crumbs { font-size: .9rem; padding: 0 0 10px; color: var(--ink-2); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--gold-dark); }
.wiki-main { padding-top: 14px; padding-bottom: 20px; }
.wiki-main h1 { margin-bottom: .3em; }
.wiki-main h2 { margin-top: 1.4em; padding-top: .2em; }
.wiki-main h3 { margin-top: 1.2em; }
.wiki-main .panel > h2:first-child, .wiki-main .panel > div > h2:first-child, .wiki-main .panel > h3:first-child, .wiki-main .panel > svg + h3 { margin-top: 0; }
.wiki-main .grid { align-items: start; }
.wiki-main .grid-4 { align-items: stretch; }
.wiki-lead { font-size: 1.08rem; color: var(--ink-2); max-width: 760px; }
.wiki-search { position: relative; max-width: 620px; }
.wiki-search input {
  width: 100%; min-height: 50px; padding: 10px 16px; border-radius: 14px; border: 2px solid var(--gold); background: #fff;
  font: 600 1.05rem "Nunito", sans-serif; color: var(--ink); box-shadow: inset 0 2px 4px rgba(74, 51, 34, .12);
}
.search-results { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.search-results a { display: block; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.search-results a:hover { border-color: var(--gold); }
.search-results b { display: block; }
.search-results span { font-size: .88rem; color: var(--ink-2); }
.wiki-cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .wiki-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .wiki-cards { grid-template-columns: repeat(3, 1fr); } }
.wiki-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; text-decoration: none; color: var(--ink); background: linear-gradient(var(--panel), var(--panel-2)); border: 2px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.wiki-card:hover { border-color: var(--gold); color: var(--ink); }
.wiki-card img { flex: none; width: 56px; height: 56px; object-fit: contain; }
.wiki-card b { display: block; font-family: "Yeseva One", serif; font-weight: 400; font-size: 1.08rem; line-height: 1.2; }
.wiki-card span { font-size: .88rem; color: var(--ink-2); line-height: 1.35; display: block; }

.filters { display: grid; gap: 8px; margin: 0 0 14px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-row > span { flex: 0 0 100%; font-size: .86rem; color: var(--ink-2); font-weight: 800; }
@media (min-width: 700px) { .filter-row > span { flex: 0 0 76px; align-self: center; } }
.chip {
  flex: none; padding: 6px 12px; min-height: 36px; border-radius: 999px; border: 1px solid #d3b773; background: var(--panel); color: var(--ink);
  font: 800 .9rem "Nunito", sans-serif; cursor: pointer;
}
.chip[aria-pressed="true"] { background: linear-gradient(#ffe08a, #f2b230); border-color: #b8741a; color: #4a2a08; }
.filter-count { font-size: .9rem; color: var(--ink-2); }

.hero-top { display: grid; gap: 16px; }
@media (min-width: 820px) { .hero-top { grid-template-columns: minmax(280px, 400px) 1fr; align-items: start; } }
.hero-splash { position: relative; border-radius: var(--radius); border: 2px solid var(--rc, var(--gold)); overflow: hidden; background: linear-gradient(160deg, var(--rc-soft, #f3e3b6), #fff8e6 75%); box-shadow: var(--shadow); }
.hero-splash > img { display: block; width: 100%; }
.hero-splash .px { position: absolute; left: 4px; bottom: 4px; }
.hero-title { font-size: 1.1rem; color: var(--ink-2); margin: -.2em 0 .6em; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
blockquote.quote { margin: 0 0 14px; padding: 10px 16px; border-left: 4px solid var(--rc, var(--gold)); background: var(--panel); border-radius: 0 12px 12px 0; font-style: italic; }
dl.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 6px 14px; margin: 0 0 1em; }
dl.kv dt { color: var(--ink-2); font-size: .92rem; }
dl.kv dd { margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin: 0 0 1em; }
.stat { text-align: center; padding: 8px 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.stat b { display: block; font-size: 1.15rem; color: var(--wood-2); }
.stat span { font-size: .8rem; color: var(--ink-2); }
.skill { padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--rc, var(--gold)); border-radius: 12px; margin-bottom: 10px; }
.skill h3 { margin: 0 0 2px; font-size: 1.12rem; }
.skill .kind { font-size: .84rem; color: var(--ink-2); font-weight: 800; }
.skill p { margin: 6px 0 0; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tags .badge { font-size: .78rem; }
.mini-heroes { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.mini-heroes li { margin: 0; }
.mini-hero { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--rc, var(--line)); text-decoration: none; color: var(--ink); font-weight: 800; font-size: .92rem; }
.mini-hero img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: var(--rc-soft, #f3e3b6); }
.pager { display: flex; justify-content: space-between; gap: 10px; margin: 20px 0 0; }
details.fold { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
details.fold summary { cursor: pointer; padding: 10px 14px; font-weight: 800; }
details.fold .fold-body { padding: 0 14px 12px; }
details.fold .fold-body > :last-child { margin-bottom: 0; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.item img { flex: none; width: 56px; height: 56px; object-fit: contain; }
.item h3 { margin: 0 0 2px; font-size: 1.05rem; font-family: "Nunito", sans-serif; font-weight: 800; }
.item p { margin: 0 0 4px; font-size: .93rem; }
.item .src { font-size: .86rem; color: var(--ink-2); }
.shape svg { display: block; width: 100%; max-width: 220px; height: auto; margin: 0 auto 6px; }
.shape .slot-front { fill: #e9b23a; stroke: #8a5510; }
.shape .slot-back { fill: #49a37c; stroke: #0f5238; }
.shape .ground { fill: #efe1c0; stroke: #d3b773; }
.shape text { font: 800 13px "Nunito", sans-serif; fill: #3a2817; }
.cycle svg { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; }
.cycle text { font: 800 14px "Nunito", sans-serif; fill: #3a2817; text-anchor: middle; }
.cycle .arrow { stroke: #9a6412; stroke-width: 2.5; fill: none; }
.cycle .head { fill: #9a6412; }
.cycle circle { fill: var(--fc, #ccc); stroke: #fff; stroke-width: 3; }
.building { display: grid; gap: 12px; grid-template-columns: 96px 1fr; align-items: start; }
.building > img { width: 96px; height: 96px; object-fit: contain; }
.updated { font-size: .84rem; color: var(--ink-2); margin-top: 24px; }
.toc { columns: 2 220px; padding-left: 1.2em; }
.error-page { text-align: center; padding-top: 50px; padding-bottom: 50px; }
.error-page .code { font-family: "Yeseva One", serif; font-size: 5rem; line-height: 1; color: var(--gold-dark); }
