.wiki-layout {
    display: flex;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    gap: 0;
    align-items: flex-start;
}

body {
    padding: 0;
    background: var(--bg-body);
}

.wiki-sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--bg-container);
    border-right: 1px solid var(--border-main);
    padding: 24px 0 40px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}

.wiki-sidebar-header {
    padding: 0 16px 20px;
    border-bottom: 1px solid var(--border-main);
    margin-bottom: 16px;
}

.wiki-back-link {
    display: inline-block;
    font-size: 0.82em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 10px;
    text-decoration: none;
    transition: color 0.2s;
}
.wiki-back-link:hover { color: var(--c-indigo); }

.wiki-sidebar-title {
    font-size: 1.1em;
    font-weight: 900;
    color: var(--text-strong);
    margin: 0;
}

.wiki-group {
    padding: 0 8px 8px;
    margin-bottom: 4px;
}

.wiki-group-label {
    font-size: 0.75em;
    font-weight: 900;
    letter-spacing: 0.5px;
    padding: 6px 8px 4px;
    text-transform: uppercase;
}

.wiki-type-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.87em;
    margin-bottom: 2px;
    transition: background 0.15s, color 0.15s;
}
.wiki-type-link:hover {
    background: var(--bg-card);
    color: var(--text-strong);
}
.wiki-type-link.active {
    font-weight: 700;
}

.wiki-type-code {
    font-family: monospace;
    font-weight: 900;
    font-size: 0.88em;
    min-width: 40px;
}

.wiki-type-name {
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95em;
}

.wiki-main {
    flex: 1;
    min-width: 0;
    padding: 0 0 60px;
}

.wiki-type-header {
    padding: 40px 40px 36px;
    color: #fff;
    border-radius: 0 0 20px 20px;
    margin-bottom: 32px;
}

.wiki-reaction-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 40px;
    background: var(--bg-container);
    border-bottom: 1px solid var(--border-main);
    margin-bottom: 28px;
}
.wiki-reaction-prompt {
    font-size: 0.9em;
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 4px;
    white-space: nowrap;
}
.wiki-react-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 20px;
    border: 2px solid var(--border-main);
    background: var(--bg-section);
    color: var(--text-muted);
    font-size: 0.95em;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Pretendard', sans-serif;
}
.wiki-react-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.wiki-react-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.wiki-react-like.active  { background: var(--c-blue-bg); border-color: var(--c-blue); color: var(--c-blue); }
.wiki-react-dislike.active { background: var(--c-red-bg); border-color: var(--c-red); color: var(--c-red); }

@media (max-width: 640px) {
    .wiki-reaction-bar { padding: 12px 20px; flex-wrap: wrap; gap: 8px; }
    .wiki-reaction-prompt { width: 100%; margin-bottom: 2px; }
}

.wiki-type-header-inner { max-width: 680px; }

.wiki-cat-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.82em;
    font-weight: 700;
    margin-bottom: 14px;
}

.wiki-type-code-big {
    font-family: monospace;
    font-size: 1em;
    font-weight: 900;
    opacity: 0.75;
    margin-bottom: 6px;
    letter-spacing: 4px;
}

.wiki-type-title {
    font-size: 2em;
    font-weight: 900;
    margin: 0 0 10px;
    color: #fff;
    letter-spacing: -0.5px;
    text-align: left;
}

.wiki-tagline {
    font-size: 1.1em;
    font-style: italic;
    opacity: 0.88;
    margin: 0;
    font-weight: 600;
}

.wiki-section {
    padding: 0 40px;
    margin-bottom: 36px;
}

.wiki-section-title {
    font-size: 1.05em;
    font-weight: 900;
    color: var(--text-strong);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-main);
}

.wiki-traits-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wiki-trait-tag {
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 20px;
    font-size: 0.88em;
    font-weight: 700;
    color: var(--text-main);
}

.wiki-prose {
    background: var(--bg-section);
    border: 1px solid var(--border-main);
    border-radius: 12px;
    padding: 20px 24px;
    font-size: 0.97em;
    line-height: 1.85;
    color: var(--text-main);
}

.wiki-prose-detail {
    background: var(--c-indigo-bg);
    border-color: var(--c-indigo);
    color: var(--text-strong);
    font-style: normal;
    font-weight: 500;
    line-height: 1.95;
}

.wiki-guide-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.wiki-guide-card {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-left: 4px solid var(--border-main);
    border-radius: 10px;
    padding: 18px 20px;
}
.wiki-guide-hardest { border-left-color: var(--c-red); }
.wiki-guide-with    { border-left-color: var(--c-blue); }
.wiki-guide-self    { border-left-color: var(--c-green); }

.wiki-guide-card-title {
    font-weight: 700;
    font-size: 0.95em;
    margin-bottom: 10px;
    color: var(--text-strong);
}
.wiki-guide-hardest .wiki-guide-card-title { color: var(--c-red); }
.wiki-guide-with    .wiki-guide-card-title { color: var(--c-blue); }
.wiki-guide-self    .wiki-guide-card-title { color: var(--c-green); }

.wiki-guide-card-body {
    font-size: 0.9em;
    line-height: 1.85;
    color: var(--text-main);
}
.wiki-guide-tips {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wiki-guide-tips li {
    font-size: 0.9em;
    line-height: 1.75;
    color: var(--text-main);
}

.wiki-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0 40px;
    margin-bottom: 36px;
}

.wiki-card {
    border-radius: 14px;
    padding: 20px 22px;
    font-size: 0.93em;
    line-height: 1.75;
}

.wiki-card-icon-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.wiki-card-icon {
    font-size: 1.2em;
    line-height: 1;
    flex-shrink: 0;
}

.wiki-card-title {
    font-size: 0.88em;
    font-weight: 900;
    margin: 0;
    letter-spacing: 0.3px;
}

.wiki-card p { margin: 0; color: var(--text-main); }

.wiki-card-power {
    background: var(--c-green-bg);
    border: 1px solid var(--c-green);
}
.wiki-card-power .wiki-card-title { color: var(--c-green); }

.wiki-card-shadow {
    background: var(--c-purple-bg);
    border: 1px solid var(--c-purple);
}
.wiki-card-shadow .wiki-card-title { color: var(--c-purple); }

.wiki-conflict-box {
    background: var(--c-red-bg);
    border: 1px solid var(--c-red);
    border-radius: 12px;
    padding: 18px 22px;
    font-size: 0.97em;
    line-height: 1.8;
    color: var(--text-main);
    font-weight: 600;
}

.wiki-scenes-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wiki-scenes-list li {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 10px;
    padding: 13px 18px;
    font-size: 0.95em;
    line-height: 1.65;
    color: var(--text-main);
    position: relative;
    padding-left: 42px;
}

.wiki-scenes-list li::before {
    content: '💬';
    position: absolute;
    left: 14px;
    top: 13px;
    font-size: 1em;
}

.wiki-compat-card {
    display: block;
    border-radius: 14px;
    padding: 20px 22px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.wiki-compat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.wiki-compat-good {
    background: var(--c-green-bg);
    border: 1px solid var(--c-green);
}
.wiki-compat-bad {
    background: var(--c-red-bg);
    border: 1px solid var(--c-red);
}

.wiki-compat-label {
    font-size: 0.8em;
    font-weight: 900;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.wiki-compat-type {
    font-size: 1.05em;
    font-weight: 900;
    color: var(--text-strong);
    margin-bottom: 8px;
}

.wiki-compat-desc {
    font-size: 0.88em;
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
}

.wiki-rank-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wiki-rank-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.88em;
    transition: background 0.15s, transform 0.15s;
}
.wiki-rank-row:hover {
    background: var(--bg-section);
    transform: translateX(3px);
}

.wiki-rank-num {
    width: 22px;
    text-align: right;
    font-weight: 900;
    color: var(--text-muted);
    font-size: 0.85em;
    flex-shrink: 0;
}

.wiki-rank-code {
    font-family: monospace;
    font-weight: 900;
    min-width: 44px;
    flex-shrink: 0;
    color: var(--text-strong);
    font-size: 0.95em;
}

.wiki-rank-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.wiki-rank-bar-wrap {
    width: 90px;
    height: 6px;
    background: var(--border-main);
    border-radius: 3px;
    flex-shrink: 0;
    overflow: hidden;
}

.wiki-rank-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.wiki-rank-score {
    min-width: 36px;
    text-align: right;
    font-weight: 900;
    font-size: 0.92em;
    flex-shrink: 0;
}

.wiki-rank-label {
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.78em;
    font-weight: 700;
    flex-shrink: 0;
    min-width: 32px;
    text-align: center;
}

.wiki-cta {
    margin: 40px 40px 0;
    background: linear-gradient(135deg, var(--c-indigo), var(--c-blue));
    border-radius: 16px;
    padding: 30px 36px;
    text-align: center;
    color: #fff;
}

.wiki-cta p {
    margin: 0 0 14px;
    font-size: 1em;
    font-weight: 700;
    opacity: 0.9;
}

.wiki-cta-btn {
    display: inline-block;
    background: #fff;
    color: var(--c-indigo);
    font-weight: 900;
    font-size: 0.95em;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.wiki-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.wiki-home-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 48px 40px 44px;
    border-radius: 0 0 20px 20px;
    margin-bottom: 36px;
    color: #fff;
}
.wiki-home-hero-inner { max-width: 620px; }
.wiki-home-hero-sub {
    font-size: 0.82em;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #94a3b8;
    text-transform: uppercase;
    margin: 0 0 10px;
}
.wiki-home-hero-title {
    font-size: 2.4em;
    font-weight: 900;
    margin: 0 0 14px;
    color: #fff;
    letter-spacing: -1px;
    text-align: left;
}
.wiki-home-hero-desc {
    font-size: 1em;
    line-height: 1.7;
    color: #cbd5e1;
    margin: 0 0 24px;
    font-weight: 500;
}

.wiki-home-tier {
    padding: 0 40px;
    margin-bottom: 40px;
}
.wiki-home-tier-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.wiki-home-tier-rank {
    font-size: 0.78em;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0 0 4px;
}
.wiki-home-tier-badge {
    font-size: 1.05em;
    font-weight: 900;
    color: var(--text-strong);
}
.wiki-home-tier-desc {
    font-size: 0.9em;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
    flex: 1;
    padding-top: 4px;
}

.wiki-home-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.wiki-home-type-card {
    display: block;
    background: var(--bg-container);
    border: 1px solid var(--border-main);
    border-radius: 12px;
    padding: 14px 14px 16px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.wiki-home-type-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.wiki-home-type-code {
    font-family: monospace;
    font-size: 0.78em;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 6px;
}
.wiki-home-type-title {
    font-size: 0.95em;
    font-weight: 900;
    color: var(--text-strong);
    margin: 0 0 6px;
    line-height: 1.3;
}
.wiki-home-type-tagline {
    font-size: 0.78em;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.4;
}

.wiki-philosophy-section {
    padding: 0 40px;
    margin-bottom: 48px;
}

.wiki-philosophy-header {
    text-align: center;
    padding: 40px 20px 36px;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    border-radius: 20px;
    margin-bottom: 24px;
    color: #fff;
}

.wiki-philosophy-eyebrow {
    font-size: 0.78em;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #818cf8;
    margin-bottom: 12px;
}

.wiki-philosophy-title {
    font-size: 1.9em;
    font-weight: 900;
    margin: 0 0 16px;
    color: #fff;
    letter-spacing: -0.5px;
}

.wiki-philosophy-lead {
    font-size: 1em;
    line-height: 1.75;
    color: #cbd5e1;
    margin: 0;
    font-weight: 500;
}

.wiki-philosophy-lead strong {
    color: #a5b4fc;
}

.wiki-axis-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.wiki-axis-card {
    border-radius: 14px;
    padding: 20px 18px;
    border: 1px solid transparent;
}

.wiki-axis-letter {
    font-family: monospace;
    font-size: 2em;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 8px;
}

.wiki-axis-name {
    font-size: 0.82em;
    font-weight: 900;
    margin-bottom: 10px;
    color: var(--text-strong);
    letter-spacing: 0.2px;
}

.wiki-axis-desc {
    font-size: 0.88em;
    line-height: 1.7;
    color: var(--text-main);
    margin: 0 0 14px;
}

.wiki-axis-desc em {
    font-style: normal;
    font-weight: 700;
    color: var(--text-strong);
}

.wiki-axis-tags {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wiki-axis-tags span {
    font-size: 0.75em;
    font-weight: 700;
    font-family: monospace;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0,0,0,0.04);
    color: var(--text-muted);
    display: inline-block;
}

.wiki-axis-d {
    background: var(--c-purple-bg);
    border-color: var(--c-purple);
}
.wiki-axis-d .wiki-axis-letter { color: var(--c-purple); }

.wiki-axis-a {
    background: var(--c-orange-bg);
    border-color: var(--c-orange);
}
.wiki-axis-a .wiki-axis-letter { color: var(--c-orange); }

.wiki-axis-r {
    background: var(--c-blue-bg);
    border-color: var(--c-blue);
}
.wiki-axis-r .wiki-axis-letter { color: var(--c-blue); }

.wiki-axis-t {
    background: var(--c-green-bg);
    border-color: var(--c-green);
}
.wiki-axis-t .wiki-axis-letter { color: var(--c-green); }

.wiki-insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.wiki-insight-card {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 14px;
    padding: 22px 20px;
}

.wiki-insight-icon {
    font-size: 1.5em;
    margin-bottom: 10px;
    line-height: 1;
}

.wiki-insight-card h4 {
    font-size: 0.92em;
    font-weight: 900;
    color: var(--text-strong);
    margin: 0 0 10px;
    line-height: 1.4;
}

.wiki-insight-card p {
    font-size: 0.87em;
    line-height: 1.75;
    color: var(--text-main);
    margin: 0;
}

@media (max-width: 768px) {
    .wiki-layout {
        flex-direction: column;
    }
    .wiki-sidebar {
        width: 100%;
        min-width: 0;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border-main);
        padding-bottom: 0;
    }
    .wiki-sidebar-header { display: flex; align-items: center; justify-content: space-between; }
    .wiki-sidebar-title { margin: 0; }
    .wiki-group { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 8px; }
    .wiki-group-label { display: none; }
    .wiki-type-link { padding: 5px 10px; font-size: 0.82em; }
    .wiki-type-name { display: none; }

    .wiki-type-header { padding: 28px 20px 24px; border-radius: 0; }
    .wiki-type-title { font-size: 1.5em; }
    .wiki-section { padding: 0 20px; }
    .wiki-two-col { padding: 0 20px; grid-template-columns: 1fr; }
    .wiki-cta { margin: 32px 20px 0; padding: 24px 20px; }
    .wiki-rank-name { display: none; }
    .wiki-rank-bar-wrap { width: 60px; }

    .wiki-home-hero { padding: 30px 20px; border-radius: 0; }
    .wiki-home-hero-title { font-size: 1.7em; }
    .wiki-home-tier { padding: 0 20px; }
    .wiki-home-type-grid { grid-template-columns: repeat(2, 1fr); }
    .wiki-home-tier-header { flex-direction: column; gap: 8px; }

    .wiki-philosophy-section { padding: 0 20px; }
    .wiki-philosophy-title { font-size: 1.4em; }
    .wiki-axis-grid { grid-template-columns: repeat(2, 1fr); }
    .wiki-insights-grid { grid-template-columns: 1fr; }
}
