.mod-page {
    min-height: 100vh;
    background: #0a0a12;
    color: #e2e8f0;
    font-family: system-ui, sans-serif;
    padding: 24px;
}
.mod-wrap { max-width: 1100px; margin: 0 auto; }
.mod-back {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
}
.mod-back:hover { color: #fbbf24; }
.mod-title { margin: 16px 0 8px; font-size: 1.5rem; letter-spacing: 0.06em; }
.mod-note { font-size: 0.85rem; color: #64748b; margin-bottom: 24px; max-width: 640px; }
.mod-note code { font-size: 0.8em; color: #94a3b8; }

.mod-gate {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 24px;
}
.mod-gate label { font-size: 0.85rem; color: #94a3b8; }
.mod-gate input {
    background: #111827;
    border: 1px solid #334155;
    color: #f1f5f9;
    padding: 8px 12px;
    border-radius: 6px;
    min-width: 200px;
}
.mod-gate button, .mod-toolbar button {
    background: #1e293b;
    border: 1px solid #fbbf24;
    color: #fbbf24;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}
.mod-gate button:hover, .mod-toolbar button:hover {
    background: #fbbf24;
    color: #0a0a12;
}
.mod-feedback { color: #f87171; width: 100%; margin: 0; font-size: 0.9rem; }

.mod-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #64748b;
}
.mod-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mod-section-title {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: 0.05em;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.mod-active-section {
    margin-bottom: 28px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1e293b;
}
.mod-active-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6em;
    padding: 2px 8px;
    border-radius: 999px;
    background: #1e293b;
    border: 1px solid #334155;
    color: #fbbf24;
    font-size: 0.8rem;
    font-weight: 700;
}
.mod-active-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #1e293b;
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
}
.mod-active-item + .mod-active-item {
    border-top: 1px solid #1e293b;
}
.mod-active-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    text-align: left;
    font: inherit;
}
.mod-active-toggle:hover {
    background: rgba(251, 191, 36, 0.06);
}
.mod-active-name {
    flex: 1;
    min-width: 0;
    color: #7dd3fc;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.mod-active-toggle:hover .mod-active-name { color: #fbbf24; }
.mod-active-game-chip {
    flex-shrink: 0;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    background: #111827;
    border: 1px solid #334155;
    color: #cbd5e1;
}
.mod-active-chev {
    flex-shrink: 0;
    color: #fbbf24;
    width: 1em;
    text-align: center;
}
.mod-active-dropdown {
    padding: 0 14px 14px;
    border-top: 1px dashed #1e293b;
    background: #020617;
}
.mod-active-meta {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 6px 12px;
    margin: 12px 0;
    font-size: 0.85rem;
}
.mod-active-meta dt {
    margin: 0;
    color: #64748b;
}
.mod-active-meta dd {
    margin: 0;
    color: #e2e8f0;
    word-break: break-word;
}
.mod-active-profile-btn {
    margin-top: 4px;
}
#mod-active-empty {
    margin: 10px 0 0;
}
#mod-active-empty[hidden] {
    display: none;
}
.mod-table-wrap {
    overflow-x: auto;
    border: 1px solid #1e293b;
    border-radius: 8px;
}
.mod-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.mod-table th, .mod-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #1e293b;
}
.mod-table th {
    background: #111827;
    color: #94a3b8;
    font-weight: 600;
}
.mod-table tr:hover td { background: rgba(251, 191, 36, 0.06); }
.mod-chip {
    display: inline-block;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: #1e293b;
    margin-right: 4px;
    color: #cbd5e1;
}
.mod-chip.on { color: #4ade80; }
.mod-status-waiting { color: #38bdf8; }
.mod-status-playing { color: #fbbf24; }

.mod-th-narrow { width: 40px; }
.mod-td-expand { vertical-align: middle; }
.mod-expand-btn {
    background: transparent;
    border: 1px solid #334155;
    color: #fbbf24;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}
.mod-expand-btn:hover { background: #1e293b; border-color: #fbbf24; }

.mod-detail-row td {
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    padding: 0;
}
.mod-detail-inner {
    padding: 16px 20px 20px;
    max-height: 420px;
    overflow: auto;
}
.mod-detail-heading {
    margin: 12px 0 8px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}
.mod-detail-heading:first-child { margin-top: 0; }
.mod-detail-players {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}
.mod-detail-players li { margin-bottom: 8px; }
.mod-name-link {
    background: none;
    border: none;
    color: #7dd3fc;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.mod-name-link:hover { color: #fbbf24; }
.mod-detail-meta { color: #64748b; font-size: 0.85rem; }
.mod-detail-events {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.75rem;
    color: #94a3b8;
}
.mod-event-pre {
    margin: 4px 0 10px;
    white-space: pre-wrap;
    word-break: break-word;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 6px;
    padding: 8px 10px;
    color: #cbd5e1;
    font-family: ui-monospace, monospace;
    font-size: 0.72rem;
}
.mod-muted { color: #64748b; }
.mod-small { font-size: 0.8rem; }
.mod-mono {
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    color: #94a3b8;
    word-break: break-all;
    margin: 0 0 12px;
}

.mod-drawer {
    position: fixed;
    inset: 0;
    z-index: 80;
    pointer-events: none;
    visibility: hidden;
}
.mod-drawer.mod-drawer-open {
    pointer-events: auto;
    visibility: visible;
}
.mod-drawer-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    padding: 0;
    margin: 0;
    background: rgba(2, 6, 23, 0.72);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.mod-drawer-open .mod-drawer-backdrop { opacity: 1; }

.mod-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(420px, 100vw);
    height: 100%;
    background: #0f172a;
    border-left: 1px solid #334155;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
    transform: translateX(100%);
    transition: transform 0.22s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.mod-drawer-open .mod-drawer-panel { transform: translateX(0); }

.mod-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #1e293b;
    flex-shrink: 0;
}
.mod-drawer-title {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
}
.mod-drawer-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
}
.mod-drawer-close:hover { color: #fbbf24; background: #1e293b; }

.mod-drawer-body {
    padding: 16px 18px 24px;
    overflow-y: auto;
    flex: 1;
}
.mod-drawer-section-title {
    margin: 18px 0 8px;
    font-size: 0.85rem;
    color: #fbbf24;
    letter-spacing: 0.05em;
}
.mod-drawer-section-title:first-of-type { margin-top: 0; }
.mod-drawer-list {
    margin: 0;
    padding-left: 1.1rem;
    color: #e2e8f0;
    font-size: 0.88rem;
}
.mod-drawer-list li { margin-bottom: 6px; }
.mod-drawer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.mod-drawer-tags li {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.85rem;
    color: #e2e8f0;
}
.mod-drawer-loading { color: #64748b; margin: 0; }
