/**
 * OMG SAMSA NOTE Wiki
 * Style specification matching vanilla MediaWiki Vector Skin
 */

:root {
  --mw-bg: #f6f6f6;
  --mw-content-bg: #ffffff;
  --mw-text: #202122;
  --mw-muted: #54595d;
  --mw-link: #0645ad;
  --mw-link-visited: #0b0080;
  --mw-link-red: #ba0000;
  --mw-link-red-visited: #a55858;
  --mw-border: #a2a9b1;
  --mw-border-light: #eaecf0;
  --mw-border-subtle: #c8ccd1;
  --mw-tab-border: #a7d7f9;
  --mw-accent: #3366cc;
  --mw-highlight: #eaf3ff;
  --mw-infobox-bg: #f8f9fa;
  --mw-infobox-header: #eaecf0;
  --mw-infobox-label: #f0f2f5;
  --mw-toc-bg: #f8f9fa;
  --mw-catlinks-bg: #f8f9fa;
  --mw-code-bg: #f8f9fa;
  --mw-font-serif: "Linux Libertine", Georgia, "Times New Roman", Times, serif;
  --mw-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Lato, Helvetica, Arial, sans-serif;
  --mw-font-mono: Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--mw-bg);
  color: var(--mw-text);
  font-family: var(--mw-font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Accessibility jump link */
.mw-jump-link {
  position: absolute;
  top: -9999px;
  left: -9999px;
  background: #ffffff;
  color: var(--mw-link);
  padding: 8px 16px;
  border: 1px solid var(--mw-border);
  z-index: 9999;
}
.mw-jump-link:focus {
  top: 10px;
  left: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Base links */
a {
  color: var(--mw-link);
  text-decoration: none;
}
a:visited {
  color: var(--mw-link-visited);
}
a:hover {
  text-decoration: underline;
}
a.new, a.missing {
  color: var(--mw-link-red);
}
a.new:visited, a.missing:visited {
  color: var(--mw-link-red-visited);
}

/* External link indicator */
a.external {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230645ad' d='M6 1h5v5L9.5 4.5 5.5 8.5 4.5 7.5 8.5 3.5 6 1zM2 2h3v1H2v7h7V7h1v4H1V2h1z'/%3E%3C/svg%3E") no-repeat right center;
  padding-right: 14px;
}

/* ---------- Page Base Elements ---------- */
#mw-page-base {
  height: 5em;
  background-color: var(--mw-content-bg);
  background-image: linear-gradient(to bottom, #ffffff 50%, var(--mw-bg) 100%);
  background-position: bottom left;
  background-repeat: repeat-x;
}
#mw-head-base {
  margin-top: -6.5em;
  margin-left: 10em;
  height: 5em;
}

/* ---------- Header & Personal Tools ---------- */
#mw-head {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
}

#p-personal {
  position: absolute;
  top: 6px;
  right: 16px;
  z-index: 100;
}
#p-personal ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
#p-personal li {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--mw-muted);
}
#pt-anonuserpage {
  color: var(--mw-muted);
  user-select: none;
}
.mw-user-icon {
  opacity: 0.6;
}

/* ---------- Vector Navigation Tabs ---------- */
#left-navigation {
  float: left;
  margin-left: 160px;
  margin-top: 1em;
  margin-bottom: -1px;
}
#right-navigation {
  float: right;
  margin-top: 1em;
  margin-right: 16px;
  margin-bottom: -1px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.vectorTabs {
  float: left;
  height: 2.5em;
}
.vectorTabs ul {
  float: left;
  height: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}
.vectorTabs li {
  float: left;
  line-height: 1.125em;
  display: block;
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #f6f6f6;
  background-image: linear-gradient(to top, #ececec 0%, #f6f6f6 100%);
  border: 1px solid var(--mw-border-subtle);
  border-bottom: 1px solid var(--mw-tab-border);
  margin-right: -1px;
  white-space: nowrap;
}
.vectorTabs li.selected {
  background: var(--mw-content-bg);
  border: 1px solid var(--mw-tab-border);
  border-top: 2px solid var(--mw-accent);
  border-bottom: 1px solid var(--mw-content-bg);
  position: relative;
  z-index: 2;
}
.vectorTabs li a, .vectorTabs li button {
  display: block;
  height: 100%;
  padding: 0.65em 0.8em 0.4em;
  color: var(--mw-link);
  font-size: 13px;
  cursor: pointer;
  background: none;
  border: none;
  text-decoration: none;
}
.vectorTabs li.selected a {
  color: var(--mw-text);
  cursor: default;
}
.vectorTabs li a:hover {
  text-decoration: none;
}
.vectorTabs li:not(.selected):hover {
  background-color: #ffffff;
}

/* Watch star button */
#ca-watch button {
  font-size: 17px;
  line-height: 1;
  padding: 0.35em 0.6em;
  color: var(--mw-muted);
}
#ca-watch.watched button {
  color: #fc3;
  text-shadow: 0 0 1px #ca0;
}

/* ---------- Search Bar ---------- */
#p-search {
  position: relative;
  margin-bottom: 2px;
}
#simpleSearch {
  display: flex;
  align-items: center;
  position: relative;
  height: 2.25em;
  border: 1px solid var(--mw-border);
  border-radius: 2px;
  background-color: #ffffff;
  width: 20vw;
  min-width: 180px;
  max-width: 280px;
}
#simpleSearch:focus-within {
  border-color: var(--mw-accent);
  box-shadow: inset 0 0 0 1px var(--mw-accent);
}
#searchInput {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  padding: 0.4em 0.6em;
  font-size: 13px;
  font-family: inherit;
  color: var(--mw-text);
  outline: none;
}
#searchButton {
  border: none;
  background: transparent;
  padding: 0 8px;
  cursor: pointer;
  color: var(--mw-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
#searchButton:hover {
  color: var(--mw-text);
}

/* Autocomplete Suggestion Dropdown */
.mw-search-suggest {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background: var(--mw-content-bg);
  border: 1px solid var(--mw-border);
  border-top: none;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  z-index: 200;
  max-height: 420px;
  overflow-y: auto;
}
.mw-search-suggest[hidden] {
  display: none;
}
.mw-search-item {
  display: block;
  padding: 8px 12px;
  border-bottom: 1px solid var(--mw-border-light);
  color: var(--mw-text);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
}
.mw-search-item:hover, .mw-search-item.active {
  background-color: var(--mw-highlight);
  text-decoration: none;
}
.mw-search-title {
  color: var(--mw-link);
  font-weight: bold;
  display: block;
}
.mw-search-snippet {
  color: var(--mw-muted);
  font-size: 11.5px;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mw-search-footer {
  padding: 8px 12px;
  font-size: 12px;
  background: var(--mw-bg);
  color: var(--mw-link);
  cursor: pointer;
  border-top: 1px solid var(--mw-border);
}
.mw-search-footer:hover {
  background: var(--mw-highlight);
}
.mw-search-none {
  padding: 12px;
  color: var(--mw-muted);
  font-style: italic;
  font-size: 13px;
}

/* ---------- Sidebar & Logo ---------- */
#mw-navigation h2 {
  display: none;
}
#p-logo {
  position: absolute;
  top: 0;
  left: 0;
  width: 160px;
  height: 160px;
  text-align: center;
  z-index: 50;
}
.mw-wiki-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 160px;
  text-decoration: none;
}
.mw-wiki-logo:hover {
  text-decoration: none;
}
.mw-wiki-logo img {
  display: block;
  margin: 0 auto;
}

#mw-panel {
  position: absolute;
  top: 160px;
  left: 0;
  width: 160px;
  padding: 0.25em 0.5em 2em 0.8em;
  font-size: 13px;
}
.portal {
  margin-bottom: 1.25em;
}
.portal h3 {
  margin: 0 0 0.35em 0;
  padding-bottom: 0.2em;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mw-muted);
  border-bottom: 1px solid var(--mw-border-subtle);
  user-select: none;
}
.portal .body ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.portal .body li {
  margin: 0.25em 0;
  line-height: 1.35;
}
.portal .body li a {
  color: var(--mw-link);
  font-size: 12.8px;
}
.portal .body li a.current {
  font-weight: bold;
  color: var(--mw-text);
  cursor: default;
}
.portal .body li a:hover {
  text-decoration: underline;
}

/* Mobile-only portal */
.mobile-actions-portal {
  display: none;
}

/* Mobile header elements (hidden on desktop) */
#mw-header-mobile, #mobile-search-bar {
  display: none;
}

/* ---------- Content Body Area ---------- */
#content {
  margin-left: 160px;
  padding: 1.25em 1.75em 2.5em;
  background-color: var(--mw-content-bg);
  border-left: 1px solid var(--mw-tab-border);
  border-top: 1px solid var(--mw-tab-border);
  min-height: calc(100vh - 12em);
  position: relative;
}

/* Site notice */
#siteNotice {
  margin-bottom: 1em;
  padding: 8px 12px;
  background: var(--mw-highlight);
  border: 1px solid var(--mw-accent);
  border-radius: 2px;
  font-size: 13px;
}

/* Article title */
h1.firstHeading {
  font-family: var(--mw-font-serif);
  font-size: 1.8em;
  font-weight: normal;
  line-height: 1.25;
  margin: 0 0 0.25em 0;
  padding-bottom: 0.15em;
  border-bottom: 1px solid var(--mw-border);
  color: #000000;
}

/* Wikipedia subtitles */
#siteSub {
  font-size: 12.8px;
  color: var(--mw-muted);
  margin-top: -2px;
  margin-bottom: 14px;
}
#contentSub {
  font-size: 12.5px;
  color: var(--mw-muted);
  margin-bottom: 12px;
}

/* Content Headings */
#article h2 {
  font-family: var(--mw-font-serif);
  font-size: 1.5em;
  font-weight: normal;
  border-bottom: 1px solid var(--mw-border);
  margin: 1em 0 0.35em 0;
  padding-bottom: 0.15em;
  overflow: hidden;
}
#article h3 {
  font-family: var(--mw-font-sans);
  font-size: 1.2em;
  font-weight: bold;
  margin: 1.2em 0 0.3em 0;
  border-bottom: none;
}
#article h4 {
  font-size: 1.05em;
  font-weight: bold;
  margin: 1em 0 0.25em 0;
}

/* Section edit links */
.mw-editsection {
  display: inline-block;
  font-family: var(--mw-font-sans);
  font-size: 11px;
  font-weight: normal;
  margin-left: 1em;
  vertical-align: baseline;
  user-select: none;
}
.mw-editsection-bracket {
  color: var(--mw-muted);
}
.mw-editsection-divider {
  color: var(--mw-muted);
}
.mw-editsection a {
  color: var(--mw-link);
}

/* Paragraphs & Text */
#article p {
  margin: 0.5em 0;
  line-height: 1.6;
}
#article hr {
  border: 0;
  border-top: 1px solid var(--mw-border-light);
  margin: 1.5em 0;
  clear: none;
}
#article img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--mw-border-subtle);
  background: #ffffff;
  padding: 3px;
}

/* ---------- Wikipedia Infoboxes ---------- */
table.infobox {
  border: 1px solid var(--mw-border);
  border-collapse: collapse;
  background-color: var(--mw-infobox-bg);
  color: var(--mw-text);
  margin: 0 0 1em 1.5em;
  float: right;
  clear: right;
  width: 25em;
  min-width: 320px;
  max-width: 100%;
  font-size: 88%;
  line-height: 1.5em;
}
table.infobox th.infobox-header {
  background-color: var(--mw-infobox-header);
  text-align: center;
  font-size: 115%;
  font-weight: bold;
  padding: 0.5em 0.8em;
  border-bottom: 1px solid var(--mw-border);
  font-family: var(--mw-font-sans);
}
table.infobox .infobox-label,
table.infobox th.infobox-label,
table.infobox td.infobox-label {
  text-align: left;
  vertical-align: top;
  background-color: var(--mw-infobox-label);
  width: 1%;
  white-space: nowrap !important;
  padding: 0.35em 0.8em;
  border-top: 1px solid var(--mw-border-light);
  font-weight: bold;
  color: var(--mw-text);
}
table.infobox .infobox-data,
table.infobox td.infobox-data,
table.infobox th.infobox-data {
  vertical-align: top;
  text-align: left;
  padding: 0.35em 0.8em;
  border-top: 1px solid var(--mw-border-light);
}
table.infobox .infobox-image {
  text-align: center;
  padding: 0.6em;
}

/* ---------- Wikitables ---------- */
table.wikitable {
  background-color: var(--mw-infobox-bg);
  color: var(--mw-text);
  margin: 1em 0;
  border: 1px solid var(--mw-border);
  border-collapse: collapse;
  font-size: 90%;
  width: auto;
}
table.wikitable th, table.wikitable td {
  border: 1px solid var(--mw-border);
  padding: 0.35em 0.65em;
}
table.wikitable th {
  background-color: var(--mw-border-light);
  text-align: center;
  font-weight: bold;
}

/* ---------- Table of Contents (TOC) ---------- */
#toc-wrapper {
  display: contents;
}
.toc {
  display: table;
  border: 1px solid var(--mw-border);
  background-color: var(--mw-toc-bg);
  padding: 7px 12px;
  font-size: 95%;
  margin: 0.8em 0 1.2em 0;
  border-radius: 1px;
}
.toctitle {
  text-align: center;
  direction: ltr;
  padding-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  user-select: none;
}
.toctitle strong, .toctitle h2, #article .toctitle h2 {
  font-family: var(--mw-font-sans) !important;
  font-size: 13px !important;
  font-weight: bold !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline !important;
  color: var(--mw-text) !important;
}
.toctogglespan {
  font-size: 90%;
  font-weight: normal;
}
.toctogglelink {
  color: var(--mw-link);
  cursor: pointer;
}
.toc ul {
  list-style: none;
  margin: 0.3em 0 0 0;
  padding-left: 0;
}
.toc ul ul {
  margin-left: 1.6em;
}
.toc li {
  margin: 0.25em 0;
  line-height: 1.4;
}
.tocnumber {
  color: var(--mw-text);
  padding-right: 0.4em;
}
.toctext {
  color: var(--mw-link);
}
.toctext:hover {
  text-decoration: underline;
}

/* ---------- Blockquotes & Telegram Quotes ---------- */
#article blockquote {
  margin: 1em 0;
  padding: 0.5em 1.25em;
  border-left: 4px solid var(--mw-border-light);
  background-color: #fafbfc;
  color: var(--mw-text);
  font-style: normal;
}
#article blockquote p {
  margin: 0.3em 0;
}

/* ---------- Code & Preformatted Text ---------- */
#article code {
  background-color: var(--mw-code-bg);
  border: 1px solid var(--mw-border-light);
  border-radius: 2px;
  padding: 1px 4px;
  font-family: var(--mw-font-mono);
  font-size: 0.875em;
  color: #202122;
}
#article pre {
  background-color: var(--mw-code-bg);
  border: 1px solid var(--mw-border);
  padding: 0.8em 1.1em;
  overflow-x: auto;
  font-family: var(--mw-font-mono);
  font-size: 0.875em;
  line-height: 1.45;
}
#article pre code {
  background: none;
  border: none;
  padding: 0;
}

/* Lists */
#article ul, #article ol {
  margin: 0.5em 0 0.5em 1.8em;
  padding: 0;
}
#article li {
  margin: 0.25em 0;
}

/* References / Footnotes */
sup.reference {
  font-size: 80%;
  font-weight: normal;
  vertical-align: super;
  padding-left: 1px;
}
ol.references {
  font-size: 90%;
  margin: 0.8em 0 1em 2em;
}
.mw-cite-backlink {
  user-select: none;
  margin-right: 4px;
}

/* ---------- Categories Box (#catlinks) ---------- */
.catlinks {
  border: 1px solid var(--mw-border);
  background-color: var(--mw-catlinks-bg);
  padding: 6px 12px;
  margin-top: 2em;
  clear: both;
  font-size: 13px;
}
.catlinks[hidden],
.catlinks:empty,
.catlinks:not(:has(li)) {
  display: none !important;
}
.catlinks a {
  color: var(--mw-link);
}
.catlinks ul {
  display: inline;
  list-style: none;
  margin: 0;
  padding: 0;
}
.catlinks li {
  display: inline;
}
.catlinks li:after {
  content: " | ";
  color: var(--mw-border-subtle);
  margin: 0 4px;
}
.catlinks li:last-child:after {
  content: "";
}

/* ---------- Footer ---------- */
#footer {
  margin-left: 160px;
  padding: 1.5em 1.75em 2em;
  background-color: var(--mw-bg);
  border-top: 1px solid var(--mw-tab-border);
  font-size: 12px;
  color: var(--mw-muted);
}
#footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#footer-info li {
  margin-bottom: 0.4em;
  line-height: 1.5;
}
#footer-places {
  margin: 0.75em 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
#footer-places a {
  color: var(--mw-link);
}
#footer-icons {
  display: flex;
  gap: 12px;
  margin-top: 1em;
}
.wiki-badge {
  display: inline-flex;
  flex-direction: column;
  border: 1px solid var(--mw-border-subtle);
  background: #ffffff;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 9px;
  text-align: center;
  font-family: var(--mw-font-sans);
  color: var(--mw-muted);
  line-height: 1.2;
}
.wiki-badge .badge-top {
  font-size: 8px;
  text-transform: uppercase;
}
.wiki-badge .badge-bottom {
  font-weight: bold;
  color: #000000;
  font-size: 10px;
}
.cc-badge .badge-bottom {
  color: #36c;
}

/* Source view textarea */
#raw-source-area {
  width: 100%;
  min-height: 380px;
  font-family: var(--mw-font-mono);
  font-size: 13px;
  line-height: 1.5;
  padding: 12px;
  border: 1px solid var(--mw-border);
  background: var(--mw-code-bg);
  color: var(--mw-text);
  resize: vertical;
  display: block;
}

/* Modal Dialog */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-backdrop[hidden] {
  display: none;
}
.modal-dialog {
  background: var(--mw-content-bg);
  border: 1px solid var(--mw-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  width: 720px;
  max-width: 95vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border-radius: 2px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--mw-border);
  background: var(--mw-bg);
}
.modal-header h3 {
  margin: 0;
  font-family: var(--mw-font-serif);
  font-weight: normal;
  font-size: 1.3em;
  color: var(--mw-text);
}
.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--mw-muted);
  cursor: pointer;
  padding: 0 4px;
}
.modal-close-btn:hover {
  color: #000000;
}
.modal-body {
  padding: 16px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.6;
}
.modal-body textarea {
  width: 100%;
  height: 340px;
  font-family: var(--mw-font-mono);
  font-size: 12.5px;
  padding: 10px;
  border: 1px solid var(--mw-border);
  background: var(--mw-code-bg);
  color: var(--mw-text);
  resize: vertical;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.modal-btn {
  padding: 6px 14px;
  border: 1px solid var(--mw-border);
  background: var(--mw-bg);
  font-size: 13px;
  border-radius: 2px;
  cursor: pointer;
  color: var(--mw-text);
}
.modal-btn:hover {
  background: #ffffff;
  border-color: var(--mw-accent);
}
.modal-btn-primary {
  background: var(--mw-accent);
  color: #ffffff;
  border-color: var(--mw-accent);
}
.modal-btn-primary:hover {
  background: #2a4b8d;
}

/* History table */
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
}
.history-table th, .history-table td {
  border: 1px solid var(--mw-border-light);
  padding: 6px 10px;
  text-align: left;
}
.history-table th {
  background: var(--mw-border-light);
}

/* ---------- Wikipedia Link Preview Hovercard ---------- */
.mwe-popups {
  position: absolute;
  width: 300px;
  background: #ffffff;
  border: 1px solid var(--mw-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  z-index: 1000;
  padding: 12px 14px;
  pointer-events: none;
  font-size: 13px;
  line-height: 1.45;
  transition: opacity 0.15s ease;
}
.mwe-popups[hidden] {
  display: none;
}
.mwe-popups-title {
  display: block;
  font-family: var(--mw-font-serif);
  font-size: 15px;
  color: #000000;
  margin-bottom: 2px;
}
.mwe-popups-category {
  display: inline-block;
  font-size: 11px;
  color: var(--mw-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.mwe-popups-text {
  margin: 0;
  color: var(--mw-text);
  font-size: 12.5px;
}

/* ---------- Toast Notification ---------- */
.wiki-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #202122;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 3px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 2000;
  animation: toastFadeIn 0.2s ease;
}
.wiki-toast[hidden] {
  display: none;
}
@keyframes toastFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Special Page Lists */
.mw-page-list {
  columns: 2 240px;
  list-style: square;
  margin: 1em 0;
  padding-left: 1.4em;
}
.mw-page-list li {
  margin: 0.3em 0;
}

/* ---------- Responsive Layout (Mobile / Tablet) ---------- */
@media (max-width: 850px) {
  #mw-head,
  #mw-head-base {
    display: none !important;
  }
  #mw-page-base {
    display: none !important;
  }
  #p-logo {
    display: none;
  }
  #p-personal {
    display: none;
  }
  .mobile-actions-portal {
    display: block;
  }
  #mobile-search-bar {
    display: block;
    position: sticky;
    top: 45px;
    z-index: 190;
    background: var(--mw-bg);
    padding: 6px 12px;
    border-bottom: 1px solid var(--mw-border);
  }
  #mobile-search-bar[hidden] {
    display: none !important;
  }
  #mobileSearchInput {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--mw-border);
    border-radius: 2px;
    font-size: 13.5px;
    background: #ffffff;
    outline: none;
  }
  #mobileSearchInput:focus {
    border-color: var(--mw-accent);
  }
  #mobileResults {
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    width: auto;
  }

  /* Mobile Header Bar */
  #mw-header-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #ffffff;
    border-bottom: 1px solid var(--mw-border);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  #menu-btn, #mobile-search-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--mw-text);
    padding: 4px 8px;
    display: flex;
    align-items: center;
  }
  .mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--mw-text);
    font-family: var(--mw-font-serif);
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
  }

  /* Navigation tabs on mobile */
  #left-navigation {
    float: none;
    margin-left: 0;
    margin-top: 0;
    overflow-x: auto;
  }
  #right-navigation {
    float: none;
    margin-right: 0;
    margin-top: 4px;
    justify-content: space-between;
  }
  #p-search {
    width: 100%;
    margin-top: 6px;
  }
  #simpleSearch {
    width: 100%;
    max-width: none;
  }

  /* Drawer sidebar */
  #mw-panel {
    position: fixed;
    top: 49px;
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--mw-content-bg);
    border-right: 1px solid var(--mw-border);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 150;
    padding: 16px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }
  body.menu-open #mw-panel {
    transform: translateX(0);
  }

  #content {
    margin-left: 0;
    padding: 12px 14px 24px;
    border-left: none;
  }
  #footer {
    margin-left: 0;
    padding: 16px 14px;
  }

  table.infobox {
    float: none;
    width: 100%;
    min-width: 0;
    margin: 1em 0;
  }
}

/* ---------- Print Stylesheet ---------- */
@media print {
  body {
    background: #ffffff;
    font-size: 12pt;
    color: #000000;
  }
  .noprint,
  #mw-head,
  #mw-navigation,
  .toctogglelink,
  .mw-editsection,
  #p-search,
  #footer-places,
  #footer-icons,
  .modal-backdrop,
  .wiki-toast,
  .mwe-popups {
    display: none !important;
  }
  #content {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    width: 100% !important;
  }
  #footer {
    margin: 2em 0 0 0 !important;
    padding: 1em 0 !important;
    border-top: 1px solid #000000 !important;
    background: none !important;
  }
  h1.firstHeading {
    font-size: 20pt;
  }
  a {
    color: #000000 !important;
    text-decoration: underline;
  }
  a.external:after {
    content: " (" attr(href) ")";
    font-size: 80%;
  }
}
