/* ================================================================
   QuestSaber Wiki — Stylesheet
   Layout: Left tree sidebar + Main content + Right ToC
   Uses shared theme variables from config.js via style.css
   ================================================================ */

/* === Wiki Layout Shell === */
.wiki-layout {
    display: flex;
    flex-grow: 1;
    position: relative;
    max-width: 100vw;
    min-height: calc(100vh - 75px);
}

/* === Wiki Left Sidebar === */
.wiki-sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-color);
    position: sticky;
    top: 75px;
    height: calc(100vh - 75px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
    z-index: 10;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.wiki-sidebar::-webkit-scrollbar { width: 4px; }
.wiki-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.wiki-sidebar .sidebar-brand {
    padding: 0 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wiki-sidebar .sidebar-brand h3 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.wiki-sidebar .sidebar-brand i {
    color: var(--primary-color);
    width: 22px;
    height: 22px;
}

/* Sidebar search */
.wiki-sidebar-search {
    padding: 0 1.25rem;
    margin-bottom: 1rem;
}

.wiki-sidebar-search input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.55rem 0.85rem 0.55rem 2.4rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: var(--font-family);
    transition: all 0.3s ease;
    outline: none;
}

.wiki-sidebar-search input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent);
    background: rgba(255,255,255,0.06);
}

.wiki-sidebar-search .search-wrap {
    position: relative;
}

.wiki-sidebar-search .search-wrap i,
.wiki-sidebar-search .search-wrap svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: var(--text-muted);
    pointer-events: none;
}

.wiki-sidebar-search .search-kbd {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-family);
    font-weight: 600;
    pointer-events: none;
}

/* ===================================================================
   TREE NAVIGATION — Unlimited nesting with visual connector lines
   Matches the BSMG Wiki style from the screenshot.
   =================================================================== */

.wiki-tree {
    padding: 0 0.75rem;
}

/* Tree Controls (Expand/Collapse All) */
.wiki-tree-controls {
    padding: 0 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.wiki-tree-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wiki-tree-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.wiki-tree-btn i {
    width: 16px;
    height: 16px;
}

/* A single tree item (can be a leaf or a parent with children) */
.wiki-tree-item {
    position: relative;
    margin-bottom: 2px;
}

/* The clickable link/label for each tree node */
.wiki-tree-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 10px;
    font-size: 0.88rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    position: relative;
    line-height: 1.4;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 32px;
}

.wiki-tree-link:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.04);
}

/* Active page */
.wiki-tree-link.active {
    color: var(--primary-color);
    font-weight: 600;
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
}

/* Toggle arrow for expandable parents */
.wiki-tree-toggle {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: transform 0.2s ease, background 0.15s;
    color: var(--text-muted);
}

.wiki-tree-toggle:hover {
    background: rgba(255,255,255,0.06);
}

.wiki-tree-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.wiki-tree-item.expanded > .wiki-tree-link .wiki-tree-toggle svg {
    transform: rotate(90deg);
}

/* Children container */
.wiki-tree-children {
    overflow: hidden;
    position: relative;
}

.wiki-tree-children.collapsed {
    display: none;
}

/* === TREE CONNECTOR LINES ===
   Vertical line from parent, with horizontal branches to each child.
   Creates the classic tree structure visualization. */

.wiki-tree-children {
    padding-left: 12px;
    margin-left: 8px;
    border-left: 1px solid var(--border-color);
}

/* Horizontal connector from vertical line to each child */
.wiki-tree-children > .wiki-tree-item > .wiki-tree-link::before {
    content: '';
    position: absolute;
    left: -13px;
    top: 50%;
    width: 12px;
    height: 0;
    border-top: 1px solid var(--border-color);
}

/* Active item — highlight the connector line */
.wiki-tree-children > .wiki-tree-item > .wiki-tree-link.active::before {
    border-top-color: var(--primary-color);
}

/* Active item — highlight the vertical line segment leading to it */
.wiki-tree-children > .wiki-tree-item.active-trail {
    /* The parent border-left will be highlighted via JS class */
}

.wiki-tree-children.has-active-child {
    border-left-color: color-mix(in srgb, var(--primary-color) 40%, var(--border-color));
}

/* Label text */
.wiki-tree-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Item count badge */
.wiki-tree-count {
    font-size: 0.68rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 1px 6px;
    border-radius: 100px;
    font-weight: 600;
    flex-shrink: 0;
    opacity: 0.6;
}

/* Search highlight */
.wiki-tree-link.search-match {
    background: color-mix(in srgb, var(--primary-color) 6%, transparent);
}

.wiki-tree-link.search-match .wiki-tree-label {
    color: var(--text-main);
}

/* Hidden during search */
.wiki-tree-item.search-hidden {
    display: none;
}

/* === Main Content Area === */
.wiki-main {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.wiki-content-wrapper {
    display: flex;
    flex: 1;
    max-width: 100%;
}

.wiki-article {
    flex: 1;
    min-width: 0;
    max-width: 860px;
    padding: 2.5rem 3rem 4rem;
    margin: 0 auto;
}

/* === Right "On this page" ToC === */
.wiki-toc {
    width: 240px;
    min-width: 240px;
    position: sticky;
    top: 75px;
    height: calc(100vh - 75px);
    overflow-y: auto;
    padding: 2rem 1.5rem 2rem 0;
    scrollbar-width: none;
}

.wiki-toc::-webkit-scrollbar { display: none; }

.wiki-toc-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 1rem;
    padding-left: 1rem;
}

.wiki-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 1px solid var(--border-color);
}

.wiki-toc-item { margin: 0; }

.wiki-toc-link {
    display: block;
    padding: 0.35rem 0.75rem 0.35rem 1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    margin-left: -1px;
    line-height: 1.4;
    font-weight: 500;
}

.wiki-toc-link:hover { color: var(--text-main); }

.wiki-toc-link.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.wiki-toc-link.depth-3 {
    padding-left: 1.75rem;
    font-size: 0.78rem;
}

/* === Markdown Rendered Content === */
.wiki-content {
    line-height: 1.75;
    font-size: 0.95rem;
    color: var(--text-main);
}

.wiki-content h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    line-height: 1.25;
    letter-spacing: -0.5px;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.wiki-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.3;
    scroll-margin-top: 100px;
}

.wiki-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    line-height: 1.35;
    scroll-margin-top: 100px;
}

.wiki-content h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    scroll-margin-top: 100px;
}

.wiki-content h5,
.wiki-content h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
    scroll-margin-top: 100px;
    color: var(--text-muted);
}

.wiki-content .heading-anchor {
    color: var(--primary-color);
    text-decoration: none;
    opacity: 0;
    margin-left: 8px;
    font-weight: 400;
    transition: opacity 0.2s ease;
    font-size: 0.85em;
}

.wiki-content h2:hover .heading-anchor,
.wiki-content h3:hover .heading-anchor,
.wiki-content h4:hover .heading-anchor { opacity: 1; }

.wiki-content p { margin: 0 0 1.25rem; }

.wiki-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    border-bottom: 1px solid transparent;
}

.wiki-content a:hover {
    color: var(--neon-blue);
    border-bottom-color: var(--neon-blue);
}

.wiki-content a[target="_blank"]::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 3px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
    background-size: contain;
    vertical-align: middle;
    opacity: 0.5;
}

.wiki-content ul { list-style: disc; padding-left: 1.75rem; margin: 0.5rem 0 1.25rem; }
.wiki-content ol { list-style: decimal; padding-left: 1.75rem; margin: 0.5rem 0 1.25rem; }
.wiki-content li { margin-bottom: 0.4rem; line-height: 1.7; }
.wiki-content li > ul, .wiki-content li > ol { margin: 0.35rem 0 0.35rem 0; }

.wiki-content .task-list { list-style: none; padding-left: 0.5rem; }
.wiki-content .task-list li { display: flex; align-items: flex-start; gap: 8px; }
.wiki-content .task-list input[type="checkbox"] { margin-top: 5px; accent-color: var(--primary-color); width: 16px; height: 16px; flex-shrink: 0; }

.wiki-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 0.75rem 1.25rem;
    margin: 1rem 0 1.25rem;
    background: color-mix(in srgb, var(--primary-color) 5%, transparent);
    border-radius: 0 8px 8px 0;
    color: var(--text-main);
    font-style: italic;
}

.wiki-content blockquote p:last-child { margin-bottom: 0; }

/* Alerts */
.wiki-alert {
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 8px;
    border-left: 4px solid;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.wiki-alert-icon { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.wiki-alert-content { flex: 1; min-width: 0; }
.wiki-alert-title { font-weight: 700; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.wiki-alert-body { font-size: 0.9rem; line-height: 1.6; }
.wiki-alert-body p:last-child { margin-bottom: 0; }

.wiki-alert.tip { border-color: #22c55e; background: rgba(34, 197, 94, 0.06); }
.wiki-alert.tip .wiki-alert-icon, .wiki-alert.tip .wiki-alert-title { color: #22c55e; }
.wiki-alert.warning { border-color: #f59e0b; background: rgba(245, 158, 11, 0.06); }
.wiki-alert.warning .wiki-alert-icon, .wiki-alert.warning .wiki-alert-title { color: #f59e0b; }
.wiki-alert.danger { border-color: #ef4444; background: rgba(239, 68, 68, 0.06); }
.wiki-alert.danger .wiki-alert-icon, .wiki-alert.danger .wiki-alert-title { color: #ef4444; }
.wiki-alert.info { border-color: var(--primary-color); background: color-mix(in srgb, var(--primary-color) 6%, transparent); }
.wiki-alert.info .wiki-alert-icon, .wiki-alert.info .wiki-alert-title { color: var(--primary-color); }

/* Code */
.wiki-content code {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 2px 7px;
    font-size: 0.85em;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    color: var(--neon-blue);
    white-space: nowrap;
}

.wiki-content pre {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    margin: 1rem 0 1.5rem;
    overflow: hidden;
    position: relative;
}

.wiki-content pre code {
    display: block;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--text-main);
    background: transparent;
    border: none;
    border-radius: 0;
    white-space: pre;
    tab-size: 4;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-copy-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-family);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.code-copy-btn:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.code-copy-btn.copied { background: #22c55e; border-color: #22c55e; color: #fff; }

/* Tables */
.wiki-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.wiki-table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; border-radius: 12px; }
.wiki-content thead { background: rgba(255,255,255,0.04); }
.wiki-content th { padding: 0.75rem 1rem; text-align: left; font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.wiki-content td { padding: 0.65rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.04); }
.wiki-content tbody tr:hover { background: rgba(255,255,255,0.02); }
.wiki-content tbody tr:last-child td { border-bottom: none; }

.wiki-content hr { border: none; border-top: 1px solid var(--border-color); margin: 2rem 0; }
.wiki-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 1rem 0; border: 1px solid var(--border-color); }
.wiki-content strong { font-weight: 700; color: var(--text-main); }
.wiki-content em { font-style: italic; }
.wiki-content mark { background: color-mix(in srgb, var(--primary-color) 25%, transparent); color: var(--text-main); padding: 1px 5px; border-radius: 3px; }
.wiki-content del { color: var(--text-muted); text-decoration: line-through; }

.wiki-content details {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin: 1rem 0;
    overflow: hidden;
}

.wiki-content details[open] { border-color: var(--primary-color); }
.wiki-content summary { padding: 0.85rem 1.25rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background 0.2s; user-select: none; }
.wiki-content summary:hover { background: rgba(255,255,255,0.03); }
.wiki-content summary::marker { color: var(--primary-color); }
.wiki-content details > *:not(summary) { padding: 0 1.25rem; }
.wiki-content details > *:last-child { padding-bottom: 1rem; }

/* Breadcrumb */
.wiki-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.wiki-breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; font-weight: 500; cursor: pointer; }
.wiki-breadcrumb a:hover { color: var(--primary-color); }
.wiki-breadcrumb .sep { color: var(--text-muted); opacity: 0.4; }

/* Page nav buttons */
.wiki-page-nav {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.wiki-page-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 1rem 1.25rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.25s ease;
    cursor: pointer;
}

.wiki-page-nav-btn:hover { border-color: var(--primary-color); background: color-mix(in srgb, var(--primary-color) 5%, transparent); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.wiki-page-nav-btn.next { text-align: right; align-items: flex-end; }
.wiki-page-nav-btn .nav-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); font-weight: 700; }
.wiki-page-nav-btn .nav-title { font-size: 1rem; font-weight: 600; color: var(--primary-color); }

/* Meta bar */
.wiki-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 10px;
}

.wiki-meta-bar a { color: var(--primary-color); text-decoration: none; font-weight: 600; display: flex; align-items: center; gap: 5px; transition: color 0.2s; }

/* Mobile */
.wiki-mobile-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    z-index: 9999;
    cursor: pointer;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--primary-color) 50%, transparent);
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.wiki-mobile-toggle:hover { transform: scale(1.1); }

.wiki-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 150;
    backdrop-filter: blur(4px);
}

/* Back to top */
.wiki-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 80px;
    width: 42px;
    height: 42px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.wiki-back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.wiki-back-to-top:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* Responsive */
@media (max-width: 1200px) { .wiki-toc { display: none; } }

@media (max-width: 900px) {
    .wiki-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 160;
        transform: translateX(-100%);
        opacity: 0;
        box-shadow: 4px 0 30px rgba(0,0,0,0.4);
    }
    .wiki-sidebar.mobile-open { transform: translateX(0); opacity: 1; }
    .wiki-mobile-toggle { display: flex; }
    .wiki-mobile-overlay.visible { display: block; }
    .wiki-article { padding: 1.5rem 1.25rem 3rem; }
    .wiki-page-nav { flex-direction: column; }
    .wiki-content h1 { font-size: 1.7rem; }
    .wiki-content h2 { font-size: 1.3rem; }
}

@media (max-width: 600px) {
    .wiki-article { padding: 1rem 1rem 2rem; }
    .wiki-content pre code { font-size: 0.78rem; padding: 1rem; }
}

html { scroll-behavior: smooth; }

.wiki-content ::selection { background: color-mix(in srgb, var(--primary-color) 30%, transparent); color: var(--text-main); }

.wiki-nav-link:focus-visible,
.wiki-toc-link:focus-visible,
.wiki-page-nav-btn:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }

/* Skeleton */
.wiki-skeleton {
    animation: wiki-pulse 1.5s ease-in-out infinite;
    background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    background-size: 200% 100%;
    border-radius: 6px;
}

@keyframes wiki-pulse { 0%, 100% { background-position: 200% 0; } 50% { background-position: -200% 0; } }

.wiki-skeleton-line { height: 14px; margin-bottom: 10px; border-radius: 4px; }
.wiki-skeleton-line:nth-child(odd) { width: 90%; }
.wiki-skeleton-line:nth-child(even) { width: 70%; }

/* Print */
@media print {
    .wiki-sidebar, .wiki-toc, .wiki-mobile-toggle, .navbar, .wiki-page-nav, .code-copy-btn { display: none !important; }
    .wiki-article { max-width: 100%; padding: 0; }
}

kbd {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.78em;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-main);
}

.wiki-content .footnotes { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); font-size: 0.85rem; color: var(--text-muted); }

.wiki-video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 12px; margin: 1rem 0 1.5rem; border: 1px solid var(--border-color); }
.wiki-video-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
