:root {
  color-scheme: dark;
  --tg-bg: var(--tg-theme-bg-color, #212121);
  --tg-secondary-bg: var(--tg-theme-secondary-bg-color, #181818);
  --tg-text: var(--tg-theme-text-color, #f5f5f5);
  --tg-hint: var(--tg-theme-hint-color, #8f8f8f);
  --tg-link: var(--tg-theme-link-color, #62b2ff);
  --tg-button: var(--tg-theme-button-color, #2aabee);
  --tg-button-text: var(--tg-theme-button-text-color, #ffffff);
  --surface: color-mix(in srgb, var(--tg-text) 7%, transparent);
  --surface-strong: color-mix(in srgb, var(--tg-text) 11%, transparent);
  --border: color-mix(in srgb, var(--tg-text) 11%, transparent);
}

* { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--tg-text);
  background: var(--tg-bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-flow: column;
  min-height:100vh;
  justify-content: space-between;
  align-items: center;
}

a { color: var(--tg-link); }
img { max-width: 100%; height: auto; }
button, a { -webkit-tap-highlight-color: transparent; }

.page-root { min-height: 100dvh; max-width:100% }

/* ----- Fast page navigation ----- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  background: color-mix(in srgb, var(--tg-bg) 72%, transparent);
  backdrop-filter: blur(2px);
  transition: opacity .12s ease;
}
.page-loader[aria-hidden="false"] { opacity: 1; }
.page-loader-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--tg-text) 18%, transparent);
  border-top-color: var(--tg-button);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-root.page-fade-out { opacity: .15; transition: opacity .16s ease; }
.page-root.page-fade-in { animation: pageFadeIn .22s ease both; }
@keyframes pageFadeIn { from { opacity: .15; } to { opacity: 1; } }

/* ----- Search loading state ----- */
.search-skeleton {
  position: fixed;
  top: 78px;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 15;
  overflow: hidden;
  padding: 52px max(10px, 3.5vw) 24px;
  display: grid;
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
  align-content: start;
  gap: 8px;
  background: var(--tg-bg);
  margin-top:20px
}
.home-shell .search-skeleton {
  top: 86px;
  padding-top: 12px;
}
.search-skeleton-card {
  min-width: 0;
  min-height: 122px;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(105deg,
    color-mix(in srgb, var(--tg-text) 7%, transparent) 25%,
    color-mix(in srgb, var(--tg-text) 14%, transparent) 40%,
    color-mix(in srgb, var(--tg-text) 7%, transparent) 55%);
  background-size: 250% 100%;
  animation: skeletonShimmer 1.15s linear infinite;
  box-sizing: border-box;
}
.search-skeleton-title, .search-skeleton-line {
  height: 14px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--tg-text) 10%, transparent);
}
.search-skeleton-title { width: 62%; margin-bottom: 12px; }
.search-skeleton-line { width: 88%; margin-bottom: 7px; }
.search-skeleton-line.short { width: 48%; }
.search-loading .search-form,
.search-loading .home-search-form { position: relative; z-index: 40; }
.home-shell.search-loading .home-search-form {
  position: relative;
  z-index: 40;
  animation: homeSearchToTop .32s cubic-bezier(.22,.8,.3,1) both;
}
.search-loading .search-form::after,
.search-loading .home-search-form::after {
  content: "";
  position: absolute;
  right: 58px;
  width: 18px;
  height: 18px;
  border: 2px solid color-mix(in srgb, var(--tg-text) 18%, transparent);
  border-top-color: var(--tg-button);
  border-radius: 50%;
  animation: spin .65s linear infinite;
  pointer-events: none;
}
.search-loading .search-input.is-searching,
.search-loading .home-search-input.is-searching { padding-right: 2.8rem; }
@keyframes skeletonShimmer { to { background-position: 260px 0; } }
@keyframes homeSearchToTop {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ----- Main page ----- */
.home-shell {
  min-height: 100dvh;
  padding: clamp(16px, 3.5vw, 30px) clamp(10px, 3.5vw, 28px) calc(22px + env(safe-area-inset-bottom));
  display: grid;
  align-content: center;
}
.home-search-form {
  width: min(720px, 100%);
  margin: 0 auto clamp(44px, 8vh, 72px);
  display: flex;
  gap: .5rem;
  align-items: center;
}
.home-search-input, .search-input {
  min-width: 0;
  flex: 1;
  height: 44px;
  padding: 0 .9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--tg-text);
  font: inherit;
  outline: none;
}
.home-search-input:focus, .search-input:focus { border-color: var(--tg-button); }
.home-search-button, .search-submit {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 0;
  border-radius: 12px;
  background: var(--tg-button);
  color: var(--tg-button-text, #fff);
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}
.home-menu {
  width: min(720px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(13px, 3.5vw, 25px) clamp(8px, 3vw, 24px);
}
.wiki-menu-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
}
.wiki-menu-icon {
  width: clamp(88px, 24vw, 132px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px var(--border);
  transition: transform .12s ease, background-color .12s ease;
}
.wiki-menu-item:active .wiki-menu-icon {
  transform: scale(.94);
  background: color-mix(in srgb, var(--tg-button) 18%, var(--surface-strong));
}
.wiki-menu-icon img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  display: block;
}
.wiki-menu-fallback {
  color: var(--tg-text);
  font-size: clamp(34px, 8vw, 52px);
  font-weight: 900;
  line-height: 1;
}
.wiki-menu-label {
  color: var(--tg-text);
  max-width: 140px;
  font-size: clamp(11px, 2.75vw, 15px);
  line-height: 1.12;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
  text-wrap: balance;
}
@media (min-width: 560px) {
  .home-menu { grid-template-columns: repeat(5, minmax(86px, 1fr)); }
  .home-menu .wiki-menu-item:nth-child(6) { grid-column: 2; }
}

/* ----- Article header ----- */
.article-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 52px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
  padding: .45rem .65rem;
  padding-top: max(.45rem, env(safe-area-inset-top));
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--tg-bg) 90%, transparent);
  backdrop-filter: blur(16px);
}
.back-button, .home-button {
  border: 0;
  background: var(--surface);
  color: var(--tg-text);
  min-height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: 0 .7rem;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.back-button:active, .home-button:active { transform: scale(.97); }
.back-button-icon { font-size: 1.35rem; line-height: 1; }
.home-button { width: 40px; padding: 0; font-size: 1.25rem; }
.article-bar-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-weight: 750;
}

/* ----- Portable infobox image collections ----- */
.article-content .portable-infobox .pi-image-collection[data-proxy-image-collection] {
  display: flex;
  gap: .55rem;
  width: 100%;
  margin: .15rem 0 .5rem;
  padding: .15rem 0 .35rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.article-content .portable-infobox .pi-image-collection[data-proxy-image-collection] .pi-image-collection-item {
  display: block !important;
  flex: 0 0 min(78%, 220px);
  margin: 0;
  padding: .35rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-strong);
}

.article-content .portable-infobox .pi-image-collection[data-proxy-image-collection] .pi-image-collection-item .pi-image {
  margin: 0;
}

.article-content .portable-infobox .pi-image-collection[data-proxy-image-collection] .pi-image-thumbnail {
  width: 100% !important;
  height: 150px !important;
  max-height: 150px;
  margin: 0 auto;
  object-fit: contain;
}

.article-content .portable-infobox .pi-image-collection-caption {
  margin: .35rem 0 0;
  color: var(--tg-hint);
  font-size: .78rem;
  line-height: 1.2;
  text-align: center;
}

@media (max-width: 700px) {
  .article-content .portable-infobox .pi-image-collection[data-proxy-image-collection] .pi-image-collection-item {
    flex-basis: min(72vw, 210px);
  }
}

.article-content .portable-infobox details.pi-collapse > summary {
  cursor: pointer;
  list-style: none;
  position: relative;
}

.article-content .portable-infobox details.pi-collapse > summary::-webkit-details-marker {
  display: none;
}

.article-content .portable-infobox details.pi-collapse > summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  stroke:#fff;
  width: 18px;
  height: 18px;
  transform: translateY(-50%) rotate(90deg);
  transition: transform 0.2s ease;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' aria-hidden='true'%3E%3Cpath d='M14.5 5.5 L8 12 L14.5 18.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.article-content .portable-infobox details.pi-collapse[open] > summary::after {
  transform: translateY(-50%) rotate(270deg);
}

/* ----- Fandom galleries ----- */
.article-content .wikia-gallery {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 1rem 0;
}

.article-content .wikia-gallery-item {
  width: auto !important;
  min-width: 0;
  padding: 6px;
  border-radius: 10px;
  background: var(--surface-strong);
  overflow: hidden;
}

.article-content .wikia-gallery-item .thumb {
  height: auto !important;
}

.article-content .wikia-gallery-item .gallery-image-wrapper {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1;
  position: relative;
  border-radius: 7px;
  overflow: hidden;
  border-color: #D0AE82;
  top: unset !important;
}

.article-content .wikia-gallery-item img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.article-content .wikia-gallery-item .lightbox-caption {
  width: 100% !important;
  margin-top: 4px;
  text-align: center;
  font-size: 10px;
  line-height: 1.15;
}

.article-content .wikia-gallery-item .lightbox-caption a {
  color: var(--tg-text);
  text-decoration: none;
}
.page-shell { width: min(1100px, 100%); margin: 0 auto; padding: .85rem .8rem calc(1.5rem + env(safe-area-inset-bottom)); }
.article-title { margin: 0 0 1rem; font-size: clamp(1.55rem, 5vw, 2.2rem); line-height: 1.15; }
.article-content { overflow-wrap: anywhere; }
.article-content > :first-child { margin-top: 0; }
.article-content h2 { margin: 1.6rem 0 .75rem; padding-bottom: .25rem; border-bottom: 1px solid var(--border); line-height: 1.2; }
.article-content h3 { margin-top: 1.3rem; }
.article-content p { margin: .7rem 0; }
.article-content table { width: 100%; max-width: 100%; border-collapse: collapse; overflow-x: auto; display: block; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: .4rem .5rem; vertical-align: top; }
.article-content th { background: var(--surface); }
.article-content figure { margin: .9rem 0; }
.article-content figcaption { color: var(--tg-hint); font-size: .9rem; }
//.article-content blockquote { margin: .8rem 0; padding: .6rem .9rem; border-left: 3px solid var(--border); background: var(--surface); border-radius: 0 10px 10px 0; }
.article-content pre, .article-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.article-content pre { overflow: auto; padding: .75rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.article-content hr { border: 0; border-top: 1px solid var(--border); }
.article-content ul, .article-content ol { padding-left: 1.4rem; }
.article-content .portable-infobox {
  margin: 0 0 1rem 1rem;
  padding: .55rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  float: right;
  width: min(360px, 42%);
}
.article-content .portable-infobox img { display: block; margin-inline: auto; }
@media (max-width: 700px) {
  .article-content .portable-infobox { float: none; width: 100%; margin: 0 0 1rem; display: grid }
}

/* ----- Our tabber implementation ----- */
.proxy-tabber { margin: 1rem 0 1.2rem; }
.proxy-tabs {
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: .2rem 0 .45rem;
  scrollbar-width: none;
  flex-wrap: wrap;
}
.proxy-tabs::-webkit-scrollbar { display: none; }
.proxy-tab {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--tg-hint);
  border-radius: 10px;
  padding: .48rem .72rem;
  min-height: 38px;
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .12s ease, color .12s ease, transform .12s ease;
}
.proxy-tab.is-active {
  color: var(--tg-button-text);
  background: var(--tg-button);
  border-color: transparent;
}
.proxy-tab:active { transform: scale(.97); }
.proxy-tab-content[hidden] { display: none !important; }
.proxy-tab-content.is-active { animation: tab-in .15s ease; }
@keyframes tab-in { from { opacity: .25; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.proxy-tabber-source-hidden { display: none !important; }

/* Some pages put legacy Fandom tab markup outside the exact wrapper. */
.article-content .tabber > .wds-tabs__wrapper,
.article-content .tabber > .tabbernav { display: none !important; }


/* ----- Portable infoboxes ----- */
.article-content .portable-infobox {
  margin: 0 0 1rem 1rem;
  padding: .4rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  float: right;
  width: min(340px, 42%);
}

.article-content .portable-infobox .pi-image {
  margin: 0 0 .35rem;
}

.article-content .portable-infobox .pi-image-thumbnail {
  display: block;
  width: min(180px, 100%) !important;
  height: auto !important;
  max-height: 180px;
  object-fit: contain;
  margin: 0 auto;
}

.article-content .portable-infobox .pi-group {
  margin: 0;
  padding: 0;
}

.article-content .portable-infobox .pi-header {
  margin: .4rem 0 .15rem;
  padding: .3rem 0;
  font-size: 1.05rem;
  line-height: 1.15;
  border-bottom: 1px solid var(--border);
  text-align:center;
}

.article-content .portable-infobox .pi-data {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: .25rem .55rem;
  align-items: start;
  margin: 0;
  padding: .32rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--tg-text) 6%, transparent);
}

.article-content .portable-infobox .pi-data:last-child {
  border-bottom: 0;
}

.article-content .portable-infobox .pi-data-label {
  margin: 0;
  font-size: .84rem;
  line-height: 1.2;
  font-weight: 750;
}

.article-content .portable-infobox .pi-data-value {
  margin: 0;
  font-size: .84rem;
  line-height: 1.25;
}

.article-content .portable-infobox .pi-data-value p {
  margin: 0 0 .3rem;
}

.article-content .portable-infobox .pi-data-value p:last-child {
  margin-bottom: 0;
}

.article-content .portable-infobox .pi-data-value img {
  width: auto !important;
  height: 20px !important;
  max-width: 20px;
  vertical-align: middle;
  object-fit: contain;
}

.article-content .portable-infobox .pi-data-value a {
  text-decoration: none;
}

/* ----- Fandom galleries ----- */
.article-content .wikia-gallery {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 1rem 0;
}

.article-content .wikia-gallery > .wikia-gallery-caption {
  display: none;
}

.article-content .wikia-gallery-item {
  width: auto !important;
  min-width: 0;
  padding: 6px;
  border-radius: 10px;
  background: var(--surface-strong);
  overflow: hidden;
}

.article-content .wikia-gallery-item .thumb {
  height: auto !important;
}

.article-content .wikia-gallery-item .gallery-image-wrapper {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1;
  position: relative;
  border-radius: 7px;
  overflow: hidden;
  border-color: #D0AE82;
}

.article-content .wikia-gallery-item img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.article-content .wikia-gallery-item .lightbox-caption {
  width: 100% !important;
  margin-top: 4px;
  text-align: center;
  font-size: 10px;
  line-height: 1.15;
}

.article-content .wikia-gallery-item .lightbox-caption a {
  color: var(--tg-text);
  text-decoration: none;
}

@media (max-width: 700px) {
  .article-content .portable-infobox {
    float: none;
    width: 100%;
    margin: 0 0 1rem;
  }

  .article-content .portable-infobox .pi-image-thumbnail {
    width: min(160px, 100%) !important;
    max-height: 160px;
  }
}

/* ----- Fandom galleries ----- */
.article-content .wikia-gallery {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 1rem 0;
}

.article-content .wikia-gallery-item {
  width: auto !important;
  min-width: 0;
  padding: 6px;
  border-radius: 10px;
  background: var(--surface-strong);
  overflow: hidden;
}

.article-content .wikia-gallery-item .thumb {
  height: auto !important;
}

.article-content .wikia-gallery-item .gallery-image-wrapper {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1;
  position: relative;
  border-radius: 7px;
  overflow: hidden;
  border-color: #D0AE82;
}

.article-content .wikia-gallery-item img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.article-content .wikia-gallery-item .lightbox-caption {
  width: 100% !important;
  margin-top: 4px;
  text-align: center;
  font-size: 10px;
  line-height: 1.15;
}

.article-content .wikia-gallery-item .lightbox-caption a {
  color: var(--tg-text);
  text-decoration: none;
}


/* ----- Table of contents ----- */
.article-content .toc {
  margin: 1rem 0 1.25rem;
  padding: .7rem .8rem .8rem;
  border: 1px solid color-mix(in srgb, var(--tg-text) 10%, transparent);
  border-radius: 10px;
  background: var(--surface-strong);
  max-width: 25em;
}

.article-content .toc .toctogglecheckbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.article-content .toc .toctitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.article-content .toc .toctitle h2 {
  margin: 0;
  font-size: 1rem;
}

.article-content .toc .toctogglespan {
  display: block;
}

.article-content .toc .toctogglelabel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: .25rem .55rem;
  border: 1px solid color-mix(in srgb, var(--tg-text) 12%, transparent);
  border-radius: 7px;
  cursor: pointer;
  font-size: .78rem;
  line-height: 1;
  user-select: none;
}

.article-content .toc .toctogglelabel::after {
  content: "Свернуть";
}

.article-content .toc .toctogglecheckbox:checked ~ .toctitle .toctogglelabel::after {
  content: "Развернуть";
}

.article-content .toc .toctogglecheckbox:checked ~ ul {
  display: none;
}

.article-content .toc > ul {
  margin: .65rem 0 0;
  padding-left: 1.25rem;
}

.article-content .toc a {
  text-decoration: none;
}

.search-page {
  width: min(720px, calc(100% - 20px));
  margin: 0 auto;
  padding: 14px 0 30px;
  box-sizing: border-box;
}
.search-form { display:flex; gap:.5rem; align-items:center; width:100%; }
.search-form > * { min-width:0; }
.search-summary { margin: 14px 2px 8px; color:var(--tg-hint); font-size:.85rem; }
.search-results {
  width: 100%;
  min-width: 0;
  display:grid;
  gap:8px;
  animation: searchResultsIn .28s ease both;
}
.search-result {
  display:block;
  width:100%;
  min-width:0;
  box-sizing:border-box;
  padding:12px 14px;
  border-radius:12px;
  background:var(--surface-strong);
  text-decoration:none;
  color:var(--tg-text);
  opacity:0;
  animation: searchResultIn .26s ease both;
}
.search-result:nth-child(1) { animation-delay:.02s; }
.search-result:nth-child(2) { animation-delay:.04s; }
.search-result:nth-child(3) { animation-delay:.06s; }
.search-result:nth-child(4) { animation-delay:.08s; }
.search-result:nth-child(5) { animation-delay:.10s; }
.search-result:nth-child(n+6) { animation-delay:.12s; }
.search-result-title { font-weight:750; overflow-wrap:anywhere; }
.search-result-snippet { margin-top:4px; color:var(--tg-hint); font-size:.86rem; line-height:1.35; overflow-wrap:anywhere; }
.search-shell.page-fade-in .search-form {
  animation: searchFormFade .22s ease both;
}
.search-shell.search-from-home.page-fade-in .search-form {
  animation: searchFormRise .32s cubic-bezier(.22,.8,.3,1) both;
}
@keyframes searchFormFade { from { opacity:0; } to { opacity:1; } }
@keyframes searchFormRise { from { opacity:0; transform:translateY(18vh); } to { opacity:1; transform:translateY(0); } }
@keyframes searchResultsIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes searchResultIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

@media (max-width: 480px) {
  .home-shell { padding-left: 12px; padding-right: 12px; }
  .home-search-form { margin-bottom: clamp(52px, 10vh, 80px); }
  .home-search-input, .search-input { height: 46px; }
  .home-search-button, .search-submit { width: 46px; height: 46px; flex-basis: 46px; }
  .search-page { width: calc(100% - 20px); padding-top: 12px; }
  .search-skeleton { top: 84px; padding-left: 10px; padding-right: 10px; }
  .home-shell .search-skeleton { top: 84px; padding-top: 12px; }
}


.achievement {
  border: 1px solid  var(--border);
  border-radius:1.5em;
  display:flex;
  padding:10px;
  gap:1em;
  font-size:0.8em;
  width:auto;
  max-width:35em;
  background-color: var(--tg-secondary-bg);
  margin: 10px 0;
}
.ach_secret {
  border: 3px dashed  var(--border);
}
.achievement p {
  display:flex;
  flex-direction: column;
  justify-content: space-between;
  margin:0;
}
.ach_title {
  font-size:150%;
  color: var(--doors-dark-accent);
  font-weight:bold;
}
.ach_description {
  font-style: italic;
  color: #c19184
}
.ach_directions {
  color: var(--doors-light-background)
}
.ach_thumb {
  border-radius:100px;
  transition: all .5s ease;
  height: fit-content;
}
.ach_text {
  width:100%;
  overflow:hidden;
}
.ach_rewards {
  height:1.5em;
  float:right;
  display: flex;
  flex-direction: column;
  margin-left:10px
}
.ach_dust:has(span) {
  background-color: #581b39;
  padding:0 5px 0 30px;
  border-radius: 25px;
  margin-bottom:5px;
  position: relative;
  transition: all .15s;
  border:1px solid transparent;
}
.ach_dust:hover {
  border:1px solid violet;
}
.ach_dust a {
  position: absolute;
  width:100%;
  height:100%;
  left:0;
  text-align: left;
  padding-left: 5px;
}
.ach_knobs:has(span) {
  background-color: var(--doors-dark-background-2);
    padding:0 5px 0 30px;
  border-radius: 25px;
  margin-bottom:5px;
  position: relative;
  transition: all .15s;
  border:1px solid transparent;
}
.ach_knobs a {
    position: absolute;
  width:100%;
  height:100%;
  left:0;
  text-align: left;
  padding-left: 5px;
}
.ach_revives:has(span) {
  background-color: #442323;
    padding:0 5px 0 30px;
  border-radius: 25px;
  position:relative;
  transition: all .15s;
  border:1px solid transparent;
}
.ach_revives:hover {
  filter:brightness(1.2);
  border:1px solid pink;
}
.ach_revives a {
  position: absolute;
  width:100%;
  height:100%;
  left:0;
  text-align: left;
  padding-left: 5px;
}


/* === Unfinished page / Dread notice === */
table:has(img[alt="Фигура в каске"]),
table:has(img[alt="Dread"]) {
    width: 100% !important;
    margin: 16px 0 20px !important;
    padding: 0 !important;

    background: rgba(255, 255, 255, 0.035) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    border-radius: 8px !important;

    overflow: hidden;
    border-collapse: separate !important;
    border-spacing: 0 !important;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
/* Image column */
table:has(img[alt="Фигура в каске"]) td[rowspan="3"]:first-child,
table:has(img[alt="Dread"]) td[rowspan="3"]:first-child {
    width: 125px;
    padding: 14px 12px 14px 14px !important;
    vertical-align: middle;
    text-align: center;
}

/* Images */
table:has(img[alt="Фигура в каске"]) img[alt="Фигура в каске"],
table:has(img[alt="Dread"]) img[alt="Dread"] {
    display: block;
    width: 88px !important;
    height: 88px !important;
    max-width: 100%;
    object-fit: contain;

    opacity: 0.92;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
}

/* Text cells */
table:has(img[alt="Фигура в каске"]) td:not([rowspan]),
table:has(img[alt="Dread"]) td:not([rowspan]) {
    padding: 0 18px 0 4px !important;
    border: 0 !important;
}

/* Title */
table:has(img[alt="Фигура в каске"]) tr:nth-child(2) td,
table:has(img[alt="Dread"]) tr:nth-child(2) td {
    padding-top: 14px !important;
    padding-bottom: 4px !important;

    color: var(--theme-page-text-color) !important;
    font-size: 1.45rem !important;
    font-weight: 600;
    line-height: 1.15 !important;
    letter-spacing: -0.01em;
}

/* Description */
table:has(img[alt="Фигура в каске"]) tr:nth-child(3) td,
table:has(img[alt="Dread"]) tr:nth-child(3) td {
    padding-bottom: 14px !important;

    color: var(--theme-page-text-color) !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    opacity: 0.88;
}

/* "Причина" line */
table:has(img[alt="Фигура в каске"]) tr:nth-child(3) span,
table:has(img[alt="Dread"]) tr:nth-child(3) span {
    display: inline-block;
    margin-top: 5px;

    font-size: 0.8rem !important;
    opacity: 0.7;
}

/* Remove inherited cell borders */
table:has(img[alt="Фигура в каске"]) td,
table:has(img[alt="Фигура в каске"]) tr,
table:has(img[alt="Dread"]) td,
table:has(img[alt="Dread"]) tr {
    border: none !important;
    box-shadow: none !important;
}

/* Remove divider between image and text */
table:has(img[alt="Фигура в каске"]) td[rowspan="3"],
table:has(img[alt="Dread"]) td[rowspan="3"] {
    border-right: none !important;
}

/* Keep the card's outer border */
table:has(img[alt="Фигура в каске"]),
table:has(img[alt="Dread"]) {
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
}
table:has(img[alt="Dread"]) {
  border-left: 4px solid #2f80d7 !important;
}
table:has(img[alt="Фигура в каске"]) {
  border-left: 4px solid #a86225 !important;
}
/* Mobile */
@media (max-width: 600px) {
    table:has(img[alt="Фигура в каске"]) td[rowspan="3"]:first-child,
    table:has(img[alt="Dread"]) td[rowspan="3"]:first-child {
        width: 82px;
        padding: 12px 8px !important;
    }

    table:has(img[alt="Фигура в каске"]) img[alt="Фигура в каске"],
    table:has(img[alt="Dread"]) img[alt="Dread"] {
        width: 64px !important;
        height: 64px !important;
    }

    table:has(img[alt="Фигура в каске"]) tr:nth-child(2) td,
    table:has(img[alt="Dread"]) tr:nth-child(2) td {
        font-size: 1.2rem !important;
    }

    table:has(img[alt="Фигура в каске"]) tr:nth-child(3) td,
    table:has(img[alt="Dread"]) tr:nth-child(3) td {
        font-size: 0.88rem !important;
    }
}


/* ---------- global footer ---------- */

.site-footer {
  box-sizing: border-box;

  width: min(920px, calc(100vw - 16px));

  margin: 0 auto;

  padding:
    29px
    18px
    calc(29px + env(safe-area-inset-bottom));

  color: #eee;

  background: #171717;

  text-align: center;
}

.home-body .site-footer {
  margin-top: -18px;

  position: relative;
  z-index: 5;

  border-radius: 0 0 7px 7px;
}

.site-footer-links {
  display: flex;

  justify-content: center;
  align-items: center;

  flex-wrap: wrap;

  gap: clamp(28px, 7vw, 76px);
}

.site-footer-links a {
  color: #f1f1f1;

  text-decoration: none;

  font-size: .9rem;
  font-weight: 700;
}

.site-footer-links a:active {
  opacity: .7;
}

.site-footer-copyright {
  width: min(520px, 100%);

  margin: 18px auto 0;

  color: #777;

  font-size: 8px;
  line-height: 1.3;
}

/* ---------- promotional block ---------- */

.home-promo {

  margin: clamp(74px, 10vw, 112px) auto 0;

  padding: 14px 16px;

  box-sizing: border-box;

  display: flex;
  align-items: center;

  gap: 15px;

  border: 1px solid rgba(255,255,255,.16);
  border-radius: 23px;

  background: #3b3b3b;

  box-shadow: 0 5px 16px rgba(0,0,0,.16);

    max-width: 600px;
  width:unset;
  margin-bottom:-20px;
  z-index:6
}

.home-promo-icon {
  width: 62px;
  height: 62px;

  flex: 0 0 62px;

  border-radius: 13px;

  background: #2b2b2b;
}

.home-promo p {
  margin: 0;

  color: #f1f1f1;

    font-size:0.9em;
  font-weight: 500;
  line-height: 1.5;
}

.site-footer {
  margin: unset;
}

.home-menu {
  display: flex;
  width:;
  gap:10px;
  flex-wrap: wrap;
  justify-content: center;
  
}

.home-panel {
  display: grid;

  >img {
    place-self: center;
  }
  .home-promo {
    z-index:20;
    margin-top: unset;
    position: relative;
  }
}
@media (max-width:780px) {
  .home-menu {
    max-width:600px;
    gap:30px;
  }
}
@media (max-width:365px) {
  .home-menu {
    
    gap:10px;
  }
}
.home-shell {
  min-height: unset;
}
.home-body {
    display: flex;
  flex-flow: column;
  min-height:100vh;
  justify-content: space-between;
  align-items: center;
}

.site-footer {
  margin: unset;
  width:100vw
}


@media (max-width:600px) {
  .home-promo > img {
    display: none;
  }
}

.article-internal-page {
  margin-top:50px;
}
.article-internal-page .article-title {
  border-bottom: 1px solid #494747
}
.article-content.internal-page-content {
  text-indent: 1.5em;line-height: 1.5;margin-top: 50px;
  >p:nth-of-type(1) {
    font-weight: 670;font-size: 1.2em;
  }
}

@media (min-width: 700px) {
  .article-content > h2 {
    margin-right:min(340px, 42%) !important;
  }
  .article-content .wikia-gallery {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (min-width:1000px) {
  .article-content .wikia-gallery {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}
.mechanicsnav {
  table {
    background-color: unset !important;
    border: unset !important;
    display:grid;
    place-content: center;
    font-size:1.2em;
  }
  th {
    background:unset !important;
    border:unset !important;
  }
}
.mechanicsnav .thumb {
  top:unset !important;
}

/* =========================================================
   MediaWiki collapsible tables
   ========================================================= */

table.mw-collapsible[data-proxy-collapsible] {
    position: relative;
    margin: 10px 0;
  border-radius: 15px 15px;
}

table.mw-collapsible[data-proxy-collapsible]
> tbody
> tr:first-child
> th,
table.mw-collapsible[data-proxy-collapsible]
> tbody
> tr:first-child
> td {
    position: relative;
    width:100vw;
}

/* Header control */

.proxy-collapsible-controls {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);

    display: flex;
    align-items: center;
}

.proxy-collapsible-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.proxy-collapsible-button {
    min-width: 70px;
    min-height: 30px;
    box-sizing: border-box;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 4px 10px;

    border-radius: 8px;

    background: var(--tg-button);
    color: #fff;

    font-size: 11px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;
    user-select: none;

    transition:
        opacity .12s ease,
        background-color .12s ease;
}

.proxy-collapsible-button:hover {
    opacity: .9;
}

.proxy-collapsible-button:active {
    opacity: .7;
}



.proxy-collapsible-button::after {
    content: "Скрыть";
}

.proxy-collapsible-toggle:checked
+ .proxy-collapsible-button::after {
    content: "Раскрыть";
}



table.mw-collapsible[data-proxy-collapsible] {
    position: relative;
}

table.mw-collapsible[data-proxy-collapsible]
> tbody
> tr:first-child
> th,
table.mw-collapsible[data-proxy-collapsible]
> tbody
> tr:first-child
> td {
    position: relative;
}

table.mw-collapsible[data-proxy-collapsible]
> tbody:has(
    > tr:first-child
    .proxy-collapsible-toggle:checked
)
> tr:not(:first-child) {
    display: none;
}

table.mw-collapsible[data-proxy-collapsible] tr:first-child {
  border-radius: 15px 15px 0 0;
  overflow: hidden;
  
}
table.mw-collapsible[data-proxy-collapsible]:has(
    > tbody > tr:first-child .proxy-collapsible-toggle:checked
) {
  border-radius: 15px 15px;
}


.mw-collapsible >tbody > tr:first-child:has(th:nth-of-type(2)) {
>th:first-child {padding-left: 50px}
.proxy-collapsible-controls {
  right:unset;
  left:10px
  }
}

/* Mobile */

@media (max-width: 600px) {

    .proxy-collapsible-controls {
        right: 6px;
    }

    .proxy-collapsible-button {
        min-width: 22px;
        min-height: 28px;
        padding: 4px 8px;
        font-size: 10px;
    }
  .proxy-collapsible-button:active { transform: scale(0.8)}
  .proxy-collapsible-button::after {
    content: "";
  position: absolute;
    top:15px;
    width:20px;
    height:20px;
    background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' aria-hidden='true'%3E%3Cpath d='M14.5 5.5 L8 12 L14.5 18.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    transform: translateY(-50%) rotate(-90deg);
    transition: all 0.2s ease;
  }
  
  .proxy-collapsible-toggle:checked
+ .proxy-collapsible-button::after {
    content: "";
  position: absolute;
    top:15px;
    width:20px;
    height:20px;
    background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' aria-hidden='true'%3E%3Cpath d='M14.5 5.5 L8 12 L14.5 18.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    transform: translateY(-50%) rotate(90deg);
    transition: transform 0.2s ease;
  
  }
}

.type-placeholder {
  display: none !important;
}


.badge-tabber .proxy-tab-content > div > table {
  td:has(.image) {
    width:120px !important;
  }
}

.badge-tabber .proxy-tab-content > div > table >tbody { display: grid;}
.badge-tabber .proxy-tab-content > div > table >tbody >tr {display:flex;}
.badge-tabber .proxy-tab-content > div > table >tbody > tr > td:last-child{ width:100%}
.badge-tabber .proxy-tab-content > div > table >tbody > tr > td:last-child > table {display:grid}
.badge-tabber .proxy-tab-content > div > table >tbody > tr > td:last-child > table >tbody > tr {display:grid}
//.badge-tabber .proxy-tab-content { display:grid;}
.badge-tabber .proxy-tab-content > table.table {display:flex} >tbody >tr { margin-left:100px; position:relative
}
.article-content .badge-tabber td {
  border:unset;
}
.badge-tabber .proxy-tab-content > table >tbody {
  display: flex;
  width:100%;
  justify-content:center;
  div { background: unset !important;}
  th { background: unset; border:unset}
}
.badge-tabber .proxy-tab-content > div:first-child {
  background: var(--tg-secondary-bg) !important;;
  border:2px solid #413f3f !important;
  box-shadow: unset !important;
  border-radius: 15px !important;
}
.badge-tabber div:has(> div > .badge-reward) {
    flex-flow: column;
    
  }
.badge-reward { margin-top:-100px}
@media (min-width:1024px) {
  .badge-tabber .proxy-tab-content {
    max-width:800px;
  }
}
@media (max-width:480px) {
  /*.badge-tabber .proxy-tab-content > div > table {
  td:has(.image) {
    width:80px !important;
  }
}*/
  .badge-tabber .proxy-tab-content > div > table { overflow-x:hidden}
  .badge-tabber .proxy-tab-content > div > table td:has(.image) { width:80px !important}
  .badge-tabber  table th {
  text-align: center;
  font-size: 1.2em;
  border-radius: 10px;
  border:0;
}
.badge-tabber  tr > td {
  padding:5px 5px;
  
}

.badge-tabber  table th > div {
  display:flex;
  justify-content: center;
  
}
  .badge-tabber .proxy-tab-content > div > table > tbody > tr > td:last-child {
    margin-left:-90px;
    filter:drop-shadow(2px 2px 2px  black)
  }
.badge-tabber  td > div > div:nth-of-type(1) > span {
  font-size:160%;
}
  .badge-tabber  tr:has(>td:has(figure)) {
    position: relative;
  }
.badge-tabber  tr > td:has(figure) {
  //padding: 5px 15px;
  position: relative;
  width:10px;
  transform: translateX(calc(100vw - 130px));

}
.badge-tabber  tr div div span {
  //margin-right:60px;
  display:inline-block;
}

.badge-tabber  {
  margin-bottom:12px;
}
.badge-progression {
    color: #8B6261;
  }
.badge-text {
  color: #C19E84;
  font-style: italic;
}
.badge-directions {
  color: white;
  font-size:120%;
}
.badge-reward {
  text-align: right;
  margin-top:unset;
}
  .badge-tabber div:has(> div > .badge-reward) {
    flex-flow: column;
  }
}


.wikia-slideshow-prev-next a { align-items:center; border-radius:50%; cursor:pointer; display:flex; height:30px; justify-content:center; left:0; margin-top:-30px; opacity:0; position:absolute; top:50%; transition-duration:.3s; transition-property:margin,opacity; width:30px; z-index:1000 } .wikia-slideshow-prev-next .wikia-slideshow-next { left:auto; right:0 } .wikia-slideshow-prev-next .wikia-slideshow-next .wds-icon { transform:rotate(180deg) } .wikia-slideshow-prev-next .wikia-slideshow-next, .wikia-slideshow-prev-next .wikia-slideshow-prev { background-color:#ffffff80; color:#1e0c1b } .wikia-slideshow-images-wrapper:hover .wikia-slideshow-prev-next .wikia-slideshow-prev {  opacity:1 } .wikia-slideshow-images-wrapper:hover .wikia-slideshow-prev-next .wikia-slideshow-next {opacity:1; } .wikia-slideshow { clear:both } .wikia-slideshow.floatleft { clear:left; float:left } .wikia-slideshow.floatright { clear:right; float:right } .wikia-slideshow-wrapper { position:relative; z-index:1 } .slideshow-center .wikia-slideshow-wrapper { margin:0 auto } .wikia-slideshow-caption { font-weight:700; text-align:center } .wikia-slideshow-images-wrapper .wikia-slideshow-images { background-color:var(--theme-page-background-color--secondary); border:1px solid var(--theme-border-color); box-sizing:border-box; list-style:none; margin:0; overflow:hidden; position:relative } .wikia-slideshow-images-wrapper .wikia-slideshow-images li { background-position:50% 50%; background-repeat:no-repeat; display:none; height:100%; left:0; margin:0; position:absolute; text-align:center; top:0; width:100% } .wikia-slideshow-images-wrapper .wikia-slideshow-images li:before { /*! content:""; */ display:inline-block; vertical-align:middle; } .wikia-slideshow-images-wrapper .wikia-slideshow-images li.wikia-slideshow-first-image { display:block } .wikia-slideshow-images-wrapper .wikia-slideshow-images li img { cursor:pointer; display:inline-block; vertical-align:middle } .wikia-slideshow-images-wrapper .wikia-slideshow-images label { display:none } .wikia-slideshow-images-wrapper .wikia-slideshow-images .wikia-slideshow-image { cursor:pointer; display:block; height:100%; left:40px; position:absolute; top:0 } .wikia-slideshow-overlay { background-color:#000000b3; color:#fff; font-size:12px; left:0; padding:6px; position:absolute; right:0; text-align:left; top:100%; transform:translateY(0); transition:transform .3s } .wikia-slideshow-images-wrapper:hover .wikia-slideshow-overlay { transform:translateY(-100%) } .wikia-slideshow-overlay .wikia-slideshow-image-caption { line-height:1.25; max-height:2.5em; overflow:hidden } .wikia-slideshow-overlay .wikia-slideshow-image-caption+.wikia-slideshow-link { margin-top:6px } .wikia-slideshow-overlay .wikia-slideshow-link { line-height:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap } .wikia-slideshow-overlay .wikia-slideshow-link .wds-icon { margin-right:3px } .wikia-slideshow-toolbar { align-items:center; display:flex; justify-content:center; margin-top:4px } .wikia-slideshow-toolbar .wikia-slideshow-toolbar-counter { font-size:12px; font-weight:700 } .wikia-slideshow-toolbar .wikia-slideshow-popout { cursor:pointer } .wikia-slideshow-toolbar .wikia-slideshow-addimage { padding-right:0 }

/* Always-visible navigation */

.wikia-slideshow-prev-next > svg {
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    height: 30px;
    justify-content: center;
    left: 0;
    margin-top: -15px;
    opacity: 1;
    position: absolute;
    top: 50%;
    width: 30px;
    z-index: 1000;
    background-color: #ffffff80;
    color: #1e0c1b;
}

.wikia-slideshow-prev-next > svg:last-child {
    left: auto;
    right: 0;
}

/* ===== Navigation ===== */

.wikia-slideshow-prev-next {
    position: absolute;
    inset: 0;
    z-index: 50;
    pointer-events: none;
}

.wikia-slideshow-prev-next .slideshow-nav {
    position: absolute;
    top: 50%;

    width: 36px;
    height: 36px;

    margin-top: -18px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 50%;

    background: rgba(170, 170, 170, 0.22);

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    color: rgba(255, 255, 255, 0.95);

    pointer-events: auto;
    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;
}

.wikia-slideshow-prev-next .slideshow-nav:hover {
    background: rgba(180, 180, 180, 0.35);
}

.wikia-slideshow-prev {
    left: 10px;
        transform: scale(1);
    transition: transform .1s ease
}
.wikia-slideshow-prev:active {
    transform: scale(0.8)
}
.wikia-slideshow-next {
    right: 10px !important;
    transform: scale(1);
    transition: transform .1s ease
}
.wikia-slideshow-next:active {
    transform: scale(0.8)
}
.slideshow-nav svg {
    width: 16px;
    height: 16px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.slideshow-nav-next svg {
    transform: rotate(180deg);
}


/* ===== Counter ===== */

.wikia-slideshow-toolbar {
    margin-top: 4px;
}

.wikia-slideshow-toolbar-counter {
    font-size: 14px !important;
    font-weight: 700;
    
}

/* The slideshow height is controlled by JS */
.wikia-slideshow-images-wrapper {
    position: relative;
    overflow: hidden;
}

.wikia-slideshow-images-wrapper .wikia-slideshow-images {
    position: relative;
    overflow: hidden;
    transition: height 250ms ease;
}


/* Slides themselves */
.wikia-slideshow-images-wrapper .wikia-slideshow-images li {
    align-items: flex-start;
    justify-content: center;
}


/* Images preserve their actual aspect ratio */
.wikia-slideshow-images-wrapper .wikia-slideshow-images li img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 15px;
    /*! object-fit: unset; */
}


/* Fixed, compact caption at the bottom */
.wikia-slideshow-overlay {
    position: absolute;
    left: 0;
    right: 0;
    top: auto !important;
    bottom: 0;
    transform: none !important;

    box-sizing: border-box;
    padding: 7px 9px;

    background: rgba(0, 0, 0, 0.70);

    color: #fff;
    font-size: 12px;
    line-height: 1.25;
}

.wikia-slideshow-overlay .wikia-slideshow-image-caption {
    max-height: none;
    overflow: visible;
    font-size: 12px;
    line-height: 1.25;
}

.wikia-slideshow-overlay .wikia-slideshow-link {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.15;
}


/* Keep the toolbar outside the image */
.wikia-slideshow-toolbar {
    height: 18px;
    margin-top: 4px;
}

.wds-icon.wds-icon-tiny {
  display: none;
}
.wikia-slideshow-wrapper ul.wikia-slideshow-images.neutral {
    height:327px;
    border-radius: 15px;
    max-height: 337px !important;
}

/* ===== Mobile ===== */

@media (max-width: 620px) {
    .wikia-slideshow,
    .wikia-slideshow-wrapper {
        width: 94vw !important;
        /*! max-width: 100% !important; */
    }

    .wikia-slideshow-prev-next .slideshow-nav {
        width: 32px;
        height: 32px;
        margin-top: -16px;
    }

    .wikia-slideshow-prev {
        left: 7px;
    }

    .wikia-slideshow-next {
        right: 7px;
    }
    .wikia-slideshow-wrapper ul.wikia-slideshow-images.neutral {
        width:100% !important;
        height: calc(94vw - 43vw);
    }
}


blockquote > table:first-child {
  display:none !important;
}
blockquote {
  margin:unset;
}

@media (max-width:900px) {
.wikitable {
  overflow-wrap: normal !important;
}
.soundtracks > tbody > tr > th {
  text-align: left !important;
}
}

.mwe-math-element {
  filter: invert(1)
}


/* static/style.css
   REPLACE the existing .article-bar-title block with this:
*/

.article-bar-title {
  position: relative;
  min-width: 0;
  width: 100%;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 750;
  cursor: default;
  overflow: hidden;
}

.article-bar-title:disabled {
  cursor: default;
}

.article-bar-title-main {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-width: 0;
  overflow: hidden;
  padding: 0 .2rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(0);
  transition: transform .18s ease;
}

.article-bar-chapter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: .2rem;

  min-width: 0;

  color: var(--tg-hint);
  font-size: .68rem;
  font-weight: 500;
  line-height: 1;

  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;

  transition:
    opacity .18s ease,
    transform .18s ease;
}

.article-bar-chapter-text {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-bar-chapter-arrow {
  flex: 0 0 auto;

  width: 12px;
  height: 12px;

  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;

  transform: rotate(0deg);
  transition: transform .18s ease;
}

.article-topbar.is-chapter-active .article-bar-title {
  cursor: pointer;
}

.article-topbar.is-chapter-active .article-bar-title-main {
  transform: translateY(-6px);
}

.article-topbar.is-chapter-active .article-bar-chapter {
  opacity: 1;
  transform: translateY(0);
}

.article-topbar.is-toc-open .article-bar-chapter-arrow {
  transform: rotate(180deg);
}


/* static/style.css
   INSERT immediately AFTER the existing:
   
   .article-content .toc a {
     text-decoration: none;
   }
*/

.article-content h2,
.article-content h3 {
  scroll-margin-top: calc(var(--proxy-topbar-bottom, 52px) + 12px);
}

/* ----- Floating ToC opened from the sticky header ----- */

.proxy-floating-toc {
  position: fixed;
  top: var(--proxy-topbar-bottom, 52px);
  left: 50%;
  z-index: 19;

  width: min(520px, calc(100vw - 20px));
  max-height:
    calc(100dvh - var(--proxy-topbar-bottom, 52px) - 12px);

  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;

  visibility: hidden;
  pointer-events: none;

  opacity: 0;
  transform: translate(-50%, -7px);
  transform-origin: top center;

  transition:
    opacity .16s ease,
    transform .18s cubic-bezier(.22, .8, .3, 1),
    visibility 0s linear .18s;
}

.proxy-floating-toc.is-open {
  visibility: visible;
  pointer-events: auto;

  opacity: 1;
  transform: translate(-50%, 2px);

  transition:
    opacity .16s ease,
    transform .18s cubic-bezier(.22, .8, .3, 1);
}

.proxy-floating-toc .toc {
  width: 100%;
  max-width: none;
  margin: 0;

  box-shadow:
    0 8px 24px rgba(0, 0, 0, .28);
}

.proxy-floating-toc .toc .toctitle {
  margin: 0;
}

.proxy-floating-toc .toc > ul {
  max-height: none;
}

@media (max-width: 700px) {
  .proxy-floating-toc {
    width: min(520px, calc(100vw - 14px));
  }
}

/* static/style.css
   INSERT immediately AFTER the existing:
   
   .article-content .toc a {
     text-decoration: none;
   }
*/

.article-content h2,
.article-content h3 {
  scroll-margin-top: calc(var(--proxy-topbar-bottom, 52px) + 12px);
}

/* ----- Floating ToC opened from the sticky header ----- */

.proxy-floating-toc {
  position: fixed;
  top: var(--proxy-topbar-bottom, 52px);
  left: 50%;
  z-index: 19;

  width: min(520px, calc(100vw - 20px));
  max-height:
    calc(100dvh - var(--proxy-topbar-bottom, 52px) - 12px);

  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;

  visibility: hidden;
  pointer-events: none;

  opacity: 0;
  transform: translate(-50%, -7px);
  transform-origin: top center;

  transition:
    opacity .16s ease,
    transform .18s cubic-bezier(.22, .8, .3, 1),
    visibility 0s linear .18s,
    backdrop-filter .2s ease;;
  backdrop-filter: blur(0px);
  border-radius: 15px;
}

.proxy-floating-toc.is-open {
  visibility: visible;
  pointer-events: auto;

  opacity: 1;
  transform: translate(-50%, 2px);

  transition:
    opacity .16s ease,
    transform .18s cubic-bezier(.22, .8, .3, 1),
    backdrop-filter .2s ease;
  
  backdrop-filter: blur(10px);
}

.proxy-floating-toc .toc {
  width: 100%;
  max-width: none;
  margin: 0;

  box-shadow:
    0 8px 24px rgba(0, 0, 0, .28);
  border: 2px solid var(--border);
  background-color: rgba(56, 56, 56, 0.7);
  border-radius: 15px;
  
}

.proxy-floating-toc .toc .toctitle {
  margin: 10px;
}

.proxy-floating-toc .toc > ul {
  max-height: none;
}

@media (max-width: 700px) {
  .proxy-floating-toc {
    width: min(520px, calc(100vw - 14px));
  }
}

.table-wrapper {
   width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    display: block;
    -webkit-overflow-scrolling: touch;
}
.table-wrapper > table {
    width: auto;
    min-width: 700px;
}
