:root {
  --bg: #0e1114;
  --bg2: #13171c;
  --panel: #181d23;
  --panel2: #1e242b;
  --line: #2b333d;
  --text: #e7eaee;
  --muted: #9aa5b1;
  --bronze: #d6913f;
  --bronze2: #f0b465;
  --steam: #b9c3cc;
  --ok: #5fbf77;
  --warn: #e6b450;
  --bad: #e5604f;
  --info: #5aa9e6;
  --radius: 10px;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 var(--sans);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(214, 145, 63, .10), transparent 60%),
    linear-gradient(var(--bg), var(--bg));
  min-height: 100vh;
}
a { color: var(--bronze2); text-underline-offset: 3px; }
a:hover { color: #ffd193; }
h1, h2, h3, h4 { line-height: 1.25; margin: 1.6em 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-top: .2em; }
h2 { font-size: 1.5rem; padding-bottom: .35em; border-bottom: 1px solid var(--line); }
h3 { font-size: 1.15rem; color: var(--bronze2); }
p, ul, ol { margin: .6em 0 1em; }
li { margin: .25em 0; }
code, kbd { font-family: var(--mono); font-size: .9em; }
kbd {
  display: inline-block; min-width: 1.7em; text-align: center;
  padding: .05em .45em; border-radius: 5px;
  background: #262d36; border: 1px solid #3a4450; border-bottom-width: 3px; color: #fff;
}
code { background: #222830; padding: .1em .35em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem clamp(1rem, 3vw, 2rem);
  background: rgba(14, 17, 20, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 700; }
.brand img { width: 30px; height: 30px; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: .75rem; margin-top: -2px; }
.topnav { margin-left: auto; display: flex; gap: .3rem; flex-wrap: wrap; }
.topnav a {
  color: var(--muted); text-decoration: none; padding: .45rem .8rem; border-radius: 8px; font-weight: 600; font-size: .95rem;
}
.topnav a:hover { color: var(--text); background: var(--panel); }
.topnav a.active { color: var(--text); background: var(--panel2); }
.topnav a.cta { color: #1a1206; background: var(--bronze); }
.topnav a.cta:hover { background: var(--bronze2); }
.menu-btn { display: none; }

/* ---------- wiki layout ---------- */
.layout {
  display: grid; grid-template-columns: 270px minmax(0, 1fr);
  gap: 2.5rem; max-width: 1240px; margin: 0 auto;
  padding: 1.5rem clamp(1rem, 3vw, 2rem) 4rem;
}
.sidebar {
  position: sticky; top: 76px; align-self: start;
  max-height: calc(100vh - 92px); overflow: auto;
  padding-right: .3rem;
}
.search {
  width: 100%; padding: .6rem .8rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit;
}
.search:focus { outline: 2px solid var(--bronze); outline-offset: 1px; }
.nav-group { margin: 1.1rem 0 .3rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.sidebar a.nav {
  display: flex; align-items: center; gap: .55rem;
  padding: .38rem .6rem; border-radius: 7px; color: var(--text); text-decoration: none; font-size: .95rem;
}
.sidebar a.nav:hover { background: var(--panel); }
.sidebar a.nav.active { background: var(--panel2); box-shadow: inset 3px 0 0 var(--bronze); }
.sidebar a.nav .dot { width: 9px; height: 9px; border-radius: 2px; flex: none; background: var(--muted); }
.sidebar a.nav.hidden { display: none; }

.content { min-width: 0; max-width: 820px; }
.page { display: none; animation: fade .2s ease; scroll-margin-top: 120px; }
.page.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }
.lead { font-size: 1.12rem; color: #cfd5db; }
.kicker { color: var(--bronze2); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .78rem; }

/* ---------- komponenty ---------- */
.callout {
  border: 1px solid var(--line); border-left: 4px solid var(--info);
  background: var(--panel); border-radius: var(--radius);
  padding: .85rem 1rem; margin: 1.2rem 0;
}
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout.warn { border-left-color: var(--warn); }
.callout.bad { border-left-color: var(--bad); }
.callout.ok { border-left-color: var(--ok); }
.callout strong.t { display: block; margin-bottom: .2rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem; margin: 1.2rem 0; }
.card {
  display: block; padding: 1rem 1.1rem; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  transition: border-color .15s, transform .15s;
}
a.card:hover { border-color: var(--bronze); transform: translateY(-2px); color: var(--text); }
.card h4 { margin: 0 0 .3rem; font-size: 1.02rem; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }
.card .big { font-size: 1.9rem; font-weight: 800; font-family: var(--mono); color: var(--bronze2); }

.hero {
  border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem 1.6rem 1.3rem;
  background:
    linear-gradient(135deg, rgba(214,145,63,.14), rgba(90,169,230,.05) 60%, transparent),
    var(--panel);
  margin-bottom: 1.5rem;
}
.hero h1 { margin-bottom: .3rem; }
.hero .facts { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .65rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: #232a32; border: 1px solid var(--line); color: var(--text);
}

.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li {
  counter-increment: s; position: relative; padding: .8rem 1rem .8rem 3.3rem; margin: .6rem 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.steps > li::before {
  content: counter(s); position: absolute; left: .9rem; top: .8rem;
  width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--bronze); color: #1a1206; font-weight: 800; font-size: .9rem;
}
.steps > li > :first-child { margin-top: 0; }
.steps > li > :last-child { margin-bottom: 0; }

/* checklist */
.checklist { list-style: none; padding: 0; }
.checklist li { margin: .35rem 0; }
.checklist label {
  display: flex; gap: .7rem; align-items: flex-start; cursor: pointer;
  padding: .6rem .8rem; border-radius: 8px; background: var(--panel); border: 1px solid var(--line);
}
.checklist input { margin-top: .3rem; accent-color: var(--bronze); width: 1.05rem; height: 1.05rem; flex: none; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; }
.progress { height: 10px; border-radius: 99px; background: #232a32; overflow: hidden; margin: .5rem 0 1rem; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--bronze), var(--bronze2)); transition: width .3s; }

/* tabulky */
.table-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { padding: .55rem .75rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--panel2); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: rgba(255,255,255,.015); }
td.num { font-family: var(--mono); white-space: nowrap; }

.tier {
  display: inline-block; min-width: 3.2em; text-align: center; font-weight: 800; font-family: var(--mono);
  padding: .1em .45em; border-radius: 5px; font-size: .85rem; color: #111;
}
.t-stone { background: #8d8d8d; } .t-steam { background: #b87333; color:#fff }
.t-lv { background: #dcdcdc; } .t-mv { background: #ff9f43; } .t-hv { background: #f6e05e; }
.t-ev { background: #9aa8b8; } .t-iv { background: #f8f8f8; } .t-luv { background: #ff6bcb; }
.t-zpm { background: #4fd1c5; } .t-uv { background: #5a8dee; color:#fff } .t-uhv { background: #e53e3e; color:#fff }
.t-uev { background: #48bb78; } .t-uiv { background: #9f7aea; color:#fff } .t-umv { background: #ed64a6; }
.t-uxv { background: #f6ad55; } .t-max { background: #fff; outline: 1px solid #f00; }

/* obrázky */
.shot { margin: 1.3rem 0; }
.shot img {
  display: block; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line);
  background: #0a0c0e; cursor: zoom-in; image-rendering: auto;
}
.shot.pixel img { image-rendering: pixelated; }
.shot figcaption { font-size: .85rem; color: var(--muted); margin-top: .4rem; }
.shot figcaption a { color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.gallery .shot { margin: 0; }
.gallery .shot img { width: 100%; aspect-ratio: 530 / 358; object-fit: contain; }
.gallery.square .shot img { aspect-ratio: 1; }
.float-right { float: right; margin: .2rem 0 1rem 1.5rem; max-width: 260px; }
.clear { clear: both; }
@media (max-width: 700px) { .float-right { float: none; margin: 1rem 0; max-width: 100%; } }

.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none; place-items: center;
  background: rgba(0,0,0,.85); padding: 2rem; cursor: zoom-out;
}
.lightbox.open { display: grid; }
.lightbox img { max-width: 95vw; max-height: 85vh; border-radius: 8px; }
.lightbox p { color: #ddd; text-align: center; margin: .6rem 0 0; }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.pager a { padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; background: var(--panel); }
.pager a:hover { border-color: var(--bronze); }
.pager span { display: block; font-size: .75rem; color: var(--muted); }

footer.site {
  border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem;
  padding: 1.5rem clamp(1rem, 3vw, 2rem); text-align: center;
}

/* ---------- formuláře ---------- */
.narrow { max-width: 860px; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 4rem; }
.form-section {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.3rem 1.4rem; margin: 1.2rem 0;
}
.form-section h2 { border: 0; margin: 0 0 .2rem; font-size: 1.2rem; display: flex; gap: .6rem; align-items: center; }
.form-section h2 .n {
  width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--bronze); color: #1a1206;
  display: grid; place-items: center; font-size: .85rem; font-weight: 800;
}
.form-section > p.help { color: var(--muted); margin: 0 0 1rem; font-size: .93rem; }
.field { margin: 1.1rem 0; }
.field > label, .field > .lbl { display: block; font-weight: 650; margin-bottom: .4rem; }
.field .req { color: var(--bronze2); }
.field small { display: block; color: var(--muted); margin-top: .3rem; font-size: .85rem; }
input[type=text], input[type=password], input[type=datetime-local], textarea, select {
  width: 100%; padding: .65rem .8rem; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text); font: inherit;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--bronze); outline-offset: 1px; }
.options { display: flex; flex-wrap: wrap; gap: .5rem; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt span {
  display: inline-block; padding: .5rem .85rem; border-radius: 8px; cursor: pointer; user-select: none;
  background: var(--bg2); border: 1px solid var(--line); font-size: .93rem; transition: all .12s;
}
.opt input:checked + span { background: rgba(214,145,63,.18); border-color: var(--bronze); color: #fff; }
.opt input:focus-visible + span { outline: 2px solid var(--bronze2); outline-offset: 2px; }
.field.invalid .options, .field.invalid input[type=text], .field.invalid .waiver { outline: 2px solid var(--bad); outline-offset: 3px; border-radius: 8px; }
.waiver {
  display: flex; gap: .8rem; align-items: flex-start; padding: 1rem; border-radius: 10px;
  background: #1b1512; border: 1px dashed #6b4a2a; cursor: pointer;
}
.waiver input { margin-top: .35rem; width: 1.1rem; height: 1.1rem; accent-color: var(--bronze); flex: none; }
.waiver ul { margin: .4rem 0 0; padding-left: 1.2rem; color: #d6c8b6; font-size: .92rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  padding: .75rem 1.3rem; border-radius: 9px; border: 1px solid transparent; cursor: pointer;
  font: inherit; font-weight: 700; background: var(--bronze); color: #1a1206; text-decoration: none;
}
.btn:hover { background: var(--bronze2); color: #1a1206; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--bronze); color: var(--text); }
.btn.danger { background: transparent; border-color: #5a2c26; color: #ff9a8c; }
.btn.danger:hover { background: #3a1d19; }
.btn.small { padding: .4rem .7rem; font-size: .85rem; }
.form-msg { margin-top: 1rem; padding: .8rem 1rem; border-radius: 8px; display: none; }
.form-msg.show { display: block; }
.form-msg.err { background: #2c1714; border: 1px solid #6a2f27; color: #ffb4a8; }
.form-msg.ok { background: #13261a; border: 1px solid #2c5f3a; color: #b6f0c4; }
.hp { position: absolute; left: -9999px; }
.success-box { text-align: center; padding: 2.5rem 1.5rem; }
.success-box .big { font-size: 3.5rem; }

/* ---------- admin ---------- */
.admin-wrap { max-width: 1300px; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 4rem; }
.login-box { max-width: 380px; margin: 8vh auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .9rem; margin: 1rem 0 1.5rem; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; }
.stat .v { font-size: 1.8rem; font-weight: 800; font-family: var(--mono); color: var(--bronze2); }
.stat .k { color: var(--muted); font-size: .85rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; }
.panel h3 { margin: 0 0 .7rem; color: var(--text); font-size: 1rem; }
.reco { border-color: var(--bronze); background: linear-gradient(135deg, rgba(214,145,63,.12), transparent 70%), var(--panel); }
.reco ul { padding-left: 1.2rem; margin: .4rem 0; }
.bars .row { display: grid; grid-template-columns: 170px 1fr 34px; gap: .6rem; align-items: center; margin: .35rem 0; font-size: .9rem; }
.bars .bar { height: 12px; background: #232a32; border-radius: 99px; overflow: hidden; }
.bars .bar > div { height: 100%; background: var(--bronze); border-radius: 99px; }
.bars .row .c { font-family: var(--mono); text-align: right; color: var(--muted); }
.heat { border-collapse: separate; border-spacing: 3px; font-size: .8rem; width: 100%; table-layout: fixed; }
.heat td, .heat th { border: 0; padding: 0; text-align: center; background: none !important; }
.heat th { color: var(--muted); font-weight: 600; padding: 0 .3rem; text-transform: none; letter-spacing: 0; }
.heat td div { width: 100%; height: 30px; border-radius: 5px; display: grid; place-items: center; font-family: var(--mono); color: #fff; }
.pipeline { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.pipeline button {
  background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 999px;
  padding: .4rem .8rem; cursor: pointer; font: inherit; font-size: .88rem;
}
.pipeline button.active { border-color: var(--bronze); background: rgba(214,145,63,.15); }
.pipeline b { font-family: var(--mono); color: var(--bronze2); margin-left: .3rem; }
.applicant { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin: .7rem 0; overflow: hidden; }
.applicant summary {
  list-style: none; cursor: pointer; display: grid; gap: .8rem; align-items: center;
  grid-template-columns: minmax(140px, 1.2fr) 1fr 1fr 1fr auto; padding: .8rem 1rem;
}
.applicant summary::-webkit-details-marker { display: none; }
.applicant summary:hover { background: var(--panel2); }
.applicant .nick { font-weight: 800; }
.applicant .sub { color: var(--muted); font-size: .82rem; }
.badge { display: inline-block; padding: .18rem .6rem; border-radius: 99px; font-size: .78rem; font-weight: 700; background: #2a3139; white-space: nowrap; }
.badge.new { background: #24384a; color: #a9d4ff; }
.badge.interview, .badge.scheduled { background: #3d3317; color: #ffd98a; }
.badge.accepted { background: #1d3a26; color: #9df0b4; }
.badge.rejected { background: #3a1f1c; color: #ffaba0; }
.badge.stargate { background: linear-gradient(90deg, #6b46c1, #d53f8c); color: #fff; }
.applicant .body { border-top: 1px solid var(--line); padding: 1rem; display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.2rem; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: .3rem .8rem; font-size: .92rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.manage .field { margin: .7rem 0; }
.manage .actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.toolbar .search { max-width: 280px; }
.empty { color: var(--muted); text-align: center; padding: 2rem; }
.saved { color: var(--ok); font-size: .85rem; opacity: 0; transition: opacity .2s; }
.saved.show { opacity: 1; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .sidebar {
    position: fixed; inset: 60px 0 0 0; z-index: 25; max-height: none;
    background: var(--bg); padding: 1rem 1.2rem 3rem; transform: translateX(-100%); transition: transform .2s;
  }
  body.menu-open .sidebar { transform: none; }
  .menu-btn {
    display: inline-flex; background: var(--panel); border: 1px solid var(--line); color: var(--text);
    border-radius: 8px; padding: .4rem .7rem; font: inherit; cursor: pointer;
  }
  .topnav a:not(.cta):not(.active) { display: none; }
  .brand small, .hide-s { display: none; }
  .topbar { gap: .6rem; }
  .topnav a { padding: .4rem .6rem; }
  body.wiki .topnav a.active { display: none; }
  .applicant summary { grid-template-columns: 1fr auto; }
  .applicant summary .hide-m { display: none; }
  .applicant .body { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 130px 1fr; }
  .bars .row { grid-template-columns: 120px 1fr 30px; }
}

/* ---------- vyhledávání + GTNH wiki ---------- */
.search-box { position: relative; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.45); overflow: hidden;
}
.suggest a { display: block; padding: .5rem .75rem; color: var(--text); text-decoration: none; font-size: .92rem; border-bottom: 1px solid var(--line); }
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover, .suggest a.sel { background: rgba(214,145,63,.15); }
.suggest a.all { color: var(--bronze2); font-weight: 600; }
.big-search { display: flex; gap: .6rem; margin: 1rem 0 .4rem; }
.big-search input { flex: 1; padding: .8rem 1rem; font-size: 1.05rem; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-family: inherit; }
.big-search input:focus { outline: 2px solid var(--bronze); outline-offset: 1px; }
.hint { color: var(--muted); font-size: .9rem; }
.loading { color: var(--muted); }
.loading::before { content: "⚙️ "; display: inline-block; animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.results { padding-left: 1.4rem; }
.results li { margin: .2rem 0 1rem; }
.results li > a { font-weight: 700; font-size: 1.05rem; }
.results p { margin: .2rem 0 0; color: var(--muted); font-size: .92rem; }
.results mark { background: rgba(214,145,63,.3); color: #fff; border-radius: 3px; padding: 0 .1em; }
.more { margin-top: 2rem; }

.wiki-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-end; border-bottom: 1px solid var(--line); padding-bottom: .8rem; margin-bottom: 1rem; }
.wiki-head h1 { margin-bottom: 0; }
.wiki-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.wiki-license { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.wiki-license a { color: var(--muted); }

.wikitext { overflow-wrap: anywhere; }
.wikitext::after { content: ""; display: block; clear: both; }
.wikitext h2 { font-size: 1.4rem; }
.wikitext .mw-heading { clear: none; }
.wikitext img { max-width: 100%; height: auto; border-radius: 4px; }
.wikitext a[data-zoom] img { cursor: zoom-in; }
.wikitext .redlink { color: #e5867a; }
.wikitext table { width: auto; max-width: 100%; }
.wikitext .wikitable {
  display: block; overflow-x: auto; border-collapse: collapse; margin: 1rem 0;
  border: 1px solid var(--line); border-radius: 8px; font-size: .9rem;
}
.wikitext .wikitable th, .wikitext .wikitable td { border: 1px solid var(--line); padding: .4rem .6rem; }
.wikitext .wikitable th { background: var(--panel2); color: var(--text); text-transform: none; letter-spacing: 0; font-size: .88rem; }
.wikitext table:not(.wikitable) td, .wikitext table:not(.wikitable) th { border-bottom: 0; background: none; padding: .3rem .5rem; }
.wikitext table:not(.wikitable) th { text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--text); }
.wikitext tbody tr:nth-child(even) td { background: transparent; }
.wikitext figure { margin: 1rem 0; }
.wikitext figure[typeof~="mw:File/Thumb"], .wikitext figure[typeof~="mw:File/Frame"], .wikitext .thumb {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .4rem; width: max-content; max-width: 100%;
}
.wikitext figure.mw-halign-right, .wikitext .tright { float: right; clear: right; margin: .3rem 0 1rem 1.2rem; }
.wikitext figure.mw-halign-left, .wikitext .tleft { float: left; clear: left; margin: .3rem 1.2rem 1rem 0; }
.wikitext figure.mw-halign-center { margin-left: auto; margin-right: auto; }
.wikitext figcaption { font-size: .85rem; color: var(--muted); margin-top: .3rem; }
.wikitext ul.gallery { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.wikitext ul.gallery li { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .4rem; width: auto !important; }
.wikitext ul.gallery li div { width: auto !important; margin: 0 !important; }
.wikitext .gallerytext { font-size: .82rem; color: var(--muted); }
.wikitext .portable-infobox {
  float: right; clear: right; width: 290px; margin: 0 0 1rem 1.5rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: .88rem;
}
.wikitext .pi-title { margin: 0; padding: .6rem .8rem; background: var(--panel2); font-size: 1.05rem; text-align: center; border: 0; }
.wikitext .pi-image { text-align: center; padding: .6rem; }
.wikitext .pi-header { margin: 0; padding: .4rem .8rem; background: #232a32; font-size: .85rem; color: var(--bronze2); border: 0; }
.wikitext .pi-data { display: grid; grid-template-columns: 42% 1fr; gap: .5rem; padding: .35rem .8rem; border-top: 1px solid var(--line); }
.wikitext .pi-data-label { margin: 0; font-size: .85rem; color: var(--muted); }
.wikitext .pi-data-value ul { margin: 0; padding-left: 1rem; }
.wikitext .pi-collapse-closed > :not(.pi-header) { display: grid; }
.wikitext .toc, .wikitext #w-toc {
  display: inline-block; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: .7rem 1rem; margin: .5rem 0 1rem; font-size: .9rem;
}
.wikitext .toc ul { list-style: none; padding-left: .9rem; margin: .2rem 0; }
.wikitext .toc > ul { padding-left: 0; }
.wikitext .toctitle h2 { font-size: 1rem; border: 0; margin: 0 0 .3rem; padding: 0; }
.wikitext .tocnumber { color: var(--muted); margin-right: .3rem; }
.wikitext pre { background: #0a0c0e; border: 1px solid var(--line); border-radius: 8px; padding: .8rem; overflow-x: auto; }
.wikitext blockquote { border-left: 3px solid var(--bronze); margin: 1rem 0; padding: .2rem 1rem; color: #cfd5db; }
.wikitext .mw-empty-elt { display: none; }
@media (max-width: 700px) {
  .wikitext .portable-infobox, .wikitext figure.mw-halign-right, .wikitext figure.mw-halign-left { float: none; width: 100%; margin: 1rem 0; }
}
.local-hits { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; color: var(--muted); font-size: .9rem; }
.local-hits .chip { text-decoration: none; }
.local-hits .chip:hover { border-color: var(--bronze); }
