* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#birthday-banner {
    background: #fff3cd;
    border-bottom: 1px solid #ffc107;
    text-align: center;
    padding: 10px 16px;
    font-size: 15px;
    font-family: Georgia, serif;
}

#birthday-banner a {
    color: #856404;
    font-weight: bold;
    text-decoration: underline;
}

body {
    font-family: Georgia, 'Linux Libertine', serif;
    font-size: 14px;
    color: #202122;
    background: #eaecf0;
    line-height: 1.6;
}

a {
    color: #3366cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:visited {
    color: #0b0080;
}

/* ── Top header bar ── */
#wiki-header {
    background: #fff;
    border-bottom: 1px solid #a2a9b1;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#wiki-wordmark {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

#wiki-icon {
    font-size: 2rem;
}

#wiki-site-name {
    font-family: 'Linux Libertine', Georgia, serif;
    font-size: 1.3rem;
    font-weight: bold;
    color: #202122;
}

#wiki-tagline {
    font-size: 0.7rem;
    color: #54595d;
}

#wiki-search-bar {
    display: flex;
    gap: 4px;
}

#wiki-search-bar input {
    border: 1px solid #a2a9b1;
    border-radius: 2px;
    padding: 4px 8px;
    font-size: 0.85rem;
    width: 220px;
    font-family: inherit;
}

#wiki-search-bar button {
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
    padding: 4px 10px;
    font-size: 0.85rem;
    cursor: default;
    border-radius: 2px;
    font-family: inherit;
}

/* ── Main two-column layout ── */
#wiki-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    background: #fff;
    border-left: 1px solid #a2a9b1;
    border-right: 1px solid #a2a9b1;
    min-height: calc(100vh - 100px);
}

/* ── Left sidebar ── */
#wiki-sidebar {
    width: 160px;
    flex-shrink: 0;
    background: #f8f9fa;
    border-right: 1px solid #a2a9b1;
    padding: 8px 0;
    align-self: stretch;
}

.sidebar-box {
    margin-bottom: 4px;
    border-bottom: 1px solid #a2a9b1;
    padding-bottom: 4px;
}

.sidebar-box:last-child {
    border-bottom: none;
}

.sidebar-heading {
    background: #cee0f2;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: bold;
    color: #202122;
    font-family: system-ui, sans-serif;
}

.sidebar-box ul {
    list-style: none;
    padding: 4px 8px;
}

.sidebar-box li {
    font-size: 0.78rem;
    padding: 2px 0;
    font-family: system-ui, sans-serif;
    color: #54595d;
}

/* ── Article area ── */
#wiki-article {
    flex: 1;
    padding: 16px 24px 32px;
    min-width: 0;
    background: #fff;
}

/* ── Article title + tab nav ── */
#article-title {
    font-family: 'Linux Libertine', Georgia, serif;
    font-size: 2rem;
    font-weight: normal;
    color: #202122;
    border-bottom: 1px solid #a2a9b1;
    padding-bottom: 4px;
    margin-bottom: 0;
}

#tab-nav {
    display: flex;
    border-bottom: 1px solid #a2a9b1;
    margin: 0 0 16px;
    gap: 0;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-family: system-ui, sans-serif;
    cursor: pointer;
    color: #3366cc;
    margin-bottom: -1px;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #202122;
}

.tab-btn.active {
    border-bottom: 3px solid #3366cc;
    color: #202122;
    font-weight: bold;
}

/* ── Tab panels ── */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ── Article typography ── */
h2 {
    font-family: 'Linux Libertine', Georgia, serif;
    font-size: 1.5rem;
    font-weight: normal;
    border-bottom: 1px solid #a2a9b1;
    margin: 1.5em 0 0.4em;
    padding-bottom: 2px;
    color: #202122;
}

h3 {
    font-family: 'Linux Libertine', Georgia, serif;
    font-size: 1.15rem;
    font-weight: bold;
    margin: 1em 0 0.3em;
    color: #202122;
}

p {
    margin: 0.6em 0;
}

sup {
    font-size: 0.7em;
    color: #3366cc;
    cursor: default;
}

/* ── Infobox ── */
.infobox {
    float: right;
    clear: right;
    margin: 0 0 1em 2em;
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
    font-size: 0.875rem;
    width: 260px;
    border-collapse: collapse;
    line-height: 1.4;
}

.infobox-above {
    background: #cee0f2;
    font-weight: bold;
    text-align: center;
    padding: 6px 8px;
    font-size: 1rem;
    font-family: 'Linux Libertine', Georgia, serif;
}

.infobox-image {
    padding: 0;
    text-align: center;
}

.infobox-image img {
    width: 100%;
    height: auto;
    display: block;
}

.infobox th {
    background: #eaecf0;
    padding: 4px 8px;
    font-weight: bold;
    text-align: left;
    border-top: 1px solid #a2a9b1;
    vertical-align: top;
    width: 40%;
    font-family: system-ui, sans-serif;
    font-size: 0.8rem;
}

.infobox td {
    padding: 4px 8px;
    border-top: 1px solid #a2a9b1;
    vertical-align: top;
    font-family: system-ui, sans-serif;
    font-size: 0.8rem;
}

.small {
    font-size: 0.85em;
    color: #54595d;
}

/* ── Table of Contents ── */
#toc {
    background: #f8f9fa;
    border: 1px solid #a2a9b1;
    display: inline-block;
    padding: 12px 16px;
    margin: 1em 0;
    font-size: 0.9rem;
    min-width: 200px;
}

#toc-title {
    font-weight: bold;
    margin-bottom: 6px;
    font-family: system-ui, sans-serif;
    text-align: center;
}

#toc ol {
    padding-left: 1.5em;
}

#toc li {
    margin: 2px 0;
    font-family: system-ui, sans-serif;
}

/* ── Hatnote / notices ── */
.hatnote {
    padding: 4px 0 4px 1.6em;
    color: #54595d;
    font-style: italic;
    margin-bottom: 1em;
    font-size: 0.9rem;
    border-left: 3px solid #a2a9b1;
}

.hatnote a {
    font-style: normal;
}

/* ── Ambox (article message box) ── */
.ambox {
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
    padding: 10px 12px;
    margin: 1em 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-family: system-ui, sans-serif;
    font-size: 0.875rem;
}

.ambox-image {
    font-size: 1.8rem;
    flex-shrink: 0;
    line-height: 1;
}

.ambox-text {
    line-height: 1.5;
}

/* ── Stub notice ── */
.stub-notice {
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
    padding: 8px 12px;
    margin: 1em 0;
    font-size: 0.85rem;
    font-family: system-ui, sans-serif;
    color: #54595d;
}

/* ── Reference list ── */
.reflist {
    border-top: 1px solid #a2a9b1;
    margin-top: 2em;
    padding-top: 0.5em;
    font-size: 0.85rem;
    font-family: system-ui, sans-serif;
    clear: both;
}

.reflist-title {
    font-weight: bold;
    margin-bottom: 4px;
}

.reflist ol {
    padding-left: 2em;
    color: #54595d;
}

.reflist li {
    margin: 2px 0;
}

/* ── Talk page ── */
.talk-header {
    background: #eaf3fb;
    border: 1px solid #a2a9b1;
    padding: 8px 12px;
    margin-bottom: 1em;
    font-family: system-ui, sans-serif;
    font-size: 0.875rem;
}

.talk-archive-notice {
    background: #f8f9fa;
    border: 1px solid #a2a9b1;
    padding: 6px 10px;
    font-size: 0.85rem;
    font-family: system-ui, sans-serif;
    color: #54595d;
    margin-bottom: 1em;
}

.chat-log-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 1em;
}

.chat-log-item {
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
    cursor: pointer;
    overflow: hidden;
}

.chat-log-item:hover {
    border-color: #3366cc;
}

.chat-log-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Clips tab ── */
.clip-entry {
    margin-bottom: 2em;
}

.clip-entry h3 {
    border-bottom: 1px solid #eaecf0;
    padding-bottom: 2px;
}

.edit-link {
    font-size: 0.75rem;
    font-weight: normal;
    color: #54595d;
    font-family: system-ui, sans-serif;
}

.twitch-embed-wrapper {
    margin-top: 0.75em;
    border: 1px solid #a2a9b1;
    overflow: hidden;
}

.twitch-embed-wrapper iframe {
    display: block;
    border: none;
}

/* ── Gallery tab ── */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 1em;
}

.wiki-figure {
    border: 1px solid #c8ccd1;
    background: #f8f9fa;
    padding: 5px;
    text-align: center;
    cursor: pointer;
    margin: 0;
}

.wiki-figure:hover {
    border-color: #3366cc;
    background: #eaf3fb;
}

.wiki-figure img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

.wiki-figure figcaption {
    font-size: 0.72rem;
    color: #54595d;
    margin-top: 4px;
    font-family: system-ui, sans-serif;
}

/* ── Tweets tab ── */
.tweet-container {
    background: #fff;
    border: 1px solid #a2a9b1;
    padding: 12px;
    margin: 1em 0;
}

/* ── Coverage list ── */
.coverage-list {
    padding-left: 2em;
    margin: 0.75em 0;
    font-family: system-ui, sans-serif;
    font-size: 0.9rem;
}

.coverage-list li {
    margin: 0.6em 0;
    line-height: 1.5;
}

.coverage-source {
    color: #54595d;
    font-style: italic;
}

/* ── Lightbox ── */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.88);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border: 2px solid #fff;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 24px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    font-family: system-ui, sans-serif;
}

.lightbox-close:hover {
    color: #ccc;
}

.nav-arrows {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    pointer-events: none;
}

.nav-arrow {
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    pointer-events: all;
    line-height: 1;
    font-family: system-ui, sans-serif;
    opacity: 0.7;
}

.nav-arrow:hover {
    opacity: 1;
}

/* ── Footer ── */
#wiki-footer {
    background: #f8f9fa;
    border-top: 1px solid #a2a9b1;
    padding: 12px 16px;
    text-align: center;
    font-family: system-ui, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    border-left: 1px solid #a2a9b1;
    border-right: 1px solid #a2a9b1;
}

#wiki-footer-links {
    margin-bottom: 4px;
    font-size: 0.8rem;
}

#wiki-footer-links a {
    margin: 0 4px;
}

#wiki-footer-info {
    color: #54595d;
    font-size: 0.78rem;
    line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 720px) {
    #wiki-sidebar {
        display: none;
    }

    #wiki-article {
        padding: 12px 14px 24px;
    }

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

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #wiki-search-bar input {
        width: 140px;
    }

    #article-title {
        font-size: 1.5rem;
    }
}
