:root {
    --bg-dark: #0a0a0a;
    --bg-card: rgba(30, 30, 30, 0.6);
    --primary: #ff2e7e;
    /* Magenta from logo */
    --secondary: #00f2ff;
    /* Cyan from logo */
    --accent: #8a2be2;
    /* Purple from logo */
    --text-main: #ffffff;
    --text-muted: #b0b0b0;
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Noto Sans JP', 'Outfit', sans-serif;
    background-color: #050505;
    background-image:
        linear-gradient(rgba(8, 6, 12, 0.72), rgba(8, 6, 12, 0.72)),
        url("/assets/los-santos-bg.png?v=2");
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    color: #fff;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

p {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: 'Outfit', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 46, 126, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 46, 126, 0.5);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.btn-discord {
    background: #5865F2;
    color: white;
}

.btn-discord:hover {
    background: #4752c4;
    transform: translateY(-3px);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Header & Navigation */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

#navbar.scrolled {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.6rem 0;
}

#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 46, 126, 0.4));
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 800;
    font-size: 1.5rem;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
}


.logo span {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 4px;
}

nav a:hover {
    color: var(--secondary);
}

nav a.active {
    color: #fff;
}

nav a.nav-panel-link {
    color: var(--text-muted);
}

nav a.nav-panel-link:hover {
    color: #fff;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 2px;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
    z-index: 1001;
}

/* Hero Section */
.hero {
    display: block;
    position: relative;
    overflow-x: hidden;
    padding-top: 120px;
    padding-bottom: 0;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(255, 46, 126, 0.15), transparent 40%),
        radial-gradient(circle at 20% 70%, rgba(0, 242, 255, 0.1), transparent 40%);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.05;
    animation: move-bg 60s linear infinite;
}

@keyframes move-bg {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(-50%, -50%);
    }
}


.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-logo {
    max-width: 220px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 24px rgba(255, 46, 126, 0.5));
}

.hero h1 span {
    color: var(--primary);
    position: relative;
}

.hero h1 span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--secondary);
    opacity: 0.3;
    z-index: -1;
}

.hero p {
    font-size: 1.25rem;
    margin: 1.5rem 0 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.server-status-group {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.server-status {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

.server-status-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    background-color: #2ecc71;
    border-radius: 50%;
    box-shadow: 0 0 10px #2ecc71;
    animation: pulse 2s infinite;
}

.player-list-bar {
    margin-top: 0.5rem;
    padding: 0.25rem 0;
    margin-bottom: 1.5rem;
}

.player-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.player-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 242, 255, 0.35);
    border-radius: 50px;
    padding: 0.4rem 0.6rem;
    font-size: 0.78rem;
    color: #e0e0e0;
    transition: var(--transition);
    backdrop-filter: blur(6px);
    width: 100%;
    text-align: center;
}

.player-name:hover {
    border-color: var(--secondary);
    color: #fff;
}

.player-name i {
    color: var(--secondary);
    font-size: 0.8rem;
}

/* Main server players — 薄紫色 */
.player-name--main {
    border-color: rgba(160, 100, 255, 0.5);
    background: rgba(120, 60, 220, 0.15);
}

.player-name--main:hover {
    border-color: rgba(180, 130, 255, 0.85);
}

.player-name--main i {
    color: #b06aff;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.status-text {
    font-size: 0.9rem;
    font-weight: 600;
}

#main-player-status {
    color: #b06aff;
}

#test-player-status {
    color: #00f2ff;
}

.shares-info {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 46, 126, 0.1), rgba(0, 242, 255, 0.1));
    padding: 2.5rem 4rem;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.shares-info:hover {
    border-color: var(--secondary);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
}

.shares-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.shares-value-container {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.shares-value {
    font-size: 4rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(to right, #fff, var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.shares-unit {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary);
    letter-spacing: 2px;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* Features Section */
.features-inner {
    margin-top: 3rem;
    padding-bottom: 4rem;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 2px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Community Section */
.community {
    padding: 3rem 0 4rem;
}

.community-box {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.1), rgba(138, 43, 226, 0.1));
    border-radius: 30px;
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    border: 1px solid rgba(88, 101, 242, 0.3);
    position: relative;
    overflow: hidden;
}

.community-content {
    flex: 1;
}

.community-content h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
}

.community-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.community-img {
    font-size: 10rem;
    color: #5865F2;
    opacity: 0.2;
    transform: rotate(15deg);
}


/* Footer */
footer {
    background: #050505;
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-info img {
    height: 50px;
    margin-bottom: 1.5rem;
}

.footer-links h4,
.footer-social h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icons a {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--secondary);
    transform: scale(1.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
}

/* Rules Section */
.rules {
    padding: 8rem 0 8rem;
    padding-top: calc(80px + 5rem);
    background: linear-gradient(180deg, var(--bg-dark), #111);
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.rule-card {
    background: rgba(255, 255, 255, 0.02);
    padding: 3rem 2rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.rule-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
    border-color: var(--primary);
}

.rule-num {
    font-size: 4rem;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    position: absolute;
    top: -10px;
    right: -10px;
    opacity: 0.05;
    color: var(--primary);
}

.rule-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: var(--primary);
}

/* Stock Section */
.stock-section {
    padding: 10rem 0;
    padding-top: calc(80px + 6rem);
    background: radial-gradient(circle at center, #111, var(--bg-dark));
}

.stock-display {
    margin-top: 4rem;
}

.stock-desc {
    margin-top: 2rem;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Music Section */
.music {
    padding: 8rem 0;
    padding-top: calc(80px + 5rem);
    background: #080808;
}

.music-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 968px) {
    .music-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .music-grid {
        grid-template-columns: 1fr;
    }
}

.music-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    cursor: pointer;
}

.music-card:hover {
    transform: translateY(-6px);
    border-color: var(--secondary);
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.15);
}

.music-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.music-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.music-card h3 {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Utils */
.text-center {
    text-align: center;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stock Section Upgrade: Owner List Style */
.stock-total-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 3rem 2rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    text-align: center;
    margin-bottom: 3rem;
    transition: var(--transition);
}

.stock-total-header:hover {
    border-color: var(--secondary);
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.1);
}

.stock-total-header .stat-label {
    display: block;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stock-total-header .stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}

.stock-total-header .stat-value small {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-left: 0.5rem;
}

.stock-owners-container {
    background: rgba(255, 255, 255, 0.02);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.stock-owners-container h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.stock-owners-container h3::before {
    content: '';
    width: 4px;
    height: 1.5rem;
    background: var(--primary);
    border-radius: 2px;
}

.owners-table {
    width: 100%;
    border-collapse: collapse;
}

.owners-table th,
.owners-table td {
    padding: 1.2rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.owners-table th {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.owners-table td {
    color: #fff;
    font-size: 1.1rem;
}

.owners-table tr:last-child td {
    border-bottom: none;
}

.owners-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Responsive */
@media (max-width: 968px) {
    .stock-total-header .stat-value {
        font-size: 2.2rem;
    }

    h1 {
        font-size: 2.8rem;
    }

    .hero-btns {
        flex-direction: column;
        align-items: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .footer-info img {
        margin: 0 auto 1.5rem;
    }

    .social-icons {
        justify-content: center;
    }

    .community-box {
        flex-direction: column;
        text-align: center;
        padding: 3rem 2rem;
    }

    .community-img {
        display: none;
    }
}

/* ══════════════════════════════════════════════════
   Wiki System
══════════════════════════════════════════════════ */

/* Wiki teaser section (home page) */
.wiki-teaser {
    padding: 6rem 0;
    background: linear-gradient(180deg, #111, var(--bg-dark));
}

.wiki-teaser-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.wiki-teaser-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    display: block;
    cursor: pointer;
    color: #fff;
}

.wiki-teaser-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.wiki-teaser-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.wiki-teaser-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.wiki-teaser-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 768px) {
    .wiki-teaser-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Wiki tab layout */
#tab-wiki {
    min-height: 100vh;
}

.wiki-topbar {
    background: rgba(8, 8, 8, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.5rem 0;
    position: sticky;
    top: 84px;
    z-index: 1001;
}

.wiki-topbar-inner {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem;
}

.wiki-user-info-text {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.wiki-topbar-btn {
    padding: 0.35rem 0.9rem !important;
    font-size: 0.82rem !important;
    border-radius: 20px !important;
}

/* Wiki body wrapper */
.wiki-wrapper {
    display: flex;
    min-height: calc(100vh - 140px);
    position: relative;
}

/* Sidebar */
.wiki-nav-sidebar {
    width: 280px;
    min-width: 280px;
    background: rgba(12, 12, 14, 0.97);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 140px;
    height: calc(100vh - 140px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.wiki-nav-sidebar::-webkit-scrollbar {
    width: 5px;
}

.wiki-nav-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.wiki-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.5rem 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.05rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    background: rgba(0, 242, 255, 0.04);
}

.wiki-nav-brand a {
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.wiki-nav-brand a:hover {
    color: var(--secondary);
}

.wiki-nav-home-item {
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.wiki-nav-top-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.wiki-nav-top-link:hover,
.wiki-nav-top-link.active {
    background: rgba(0, 242, 255, 0.12);
    color: var(--secondary);
}

.wiki-nav-tree {
    flex: 1;
    padding: 0.5rem 0;
    display: block;
    writing-mode: horizontal-tb;
}

.wiki-nav-category {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: block;
    writing-mode: horizontal-tb;
}

.wiki-nav-cat-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.4rem;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    transition: var(--transition);
    user-select: none;
    letter-spacing: 0.2px;
    writing-mode: horizontal-tb;
}

.wiki-nav-cat-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.wiki-nav-cat-header span {
    flex: 1;
}

.wiki-nav-chevron {
    transition: transform 0.2s ease;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
}

.wiki-nav-page-list {
    list-style: none;
    padding: 0.2rem 0 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    display: block;
}

.wiki-nav-page-list li {
    display: block;
}

.wiki-nav-page-list.collapsed {
    display: none;
}

.wiki-nav-empty {
    padding: 0.4rem 1.4rem 0.4rem 2.8rem;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

.wiki-nav-page-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 1.4rem 0.5rem 2.2rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.86rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
    line-height: 1.4;
    writing-mode: horizontal-tb;
}

.wiki-nav-page-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-left-color: rgba(255, 255, 255, 0.2);
}

.wiki-nav-page-link.active {
    color: var(--secondary);
    background: rgba(0, 242, 255, 0.08);
    border-left-color: var(--secondary);
    font-weight: 600;
}

.wiki-nav-page-link .fa-file-lines {
    font-size: 0.72rem;
    opacity: 0.4;
    flex-shrink: 0;
}

.wiki-nav-page-link .fa-folder {
    font-size: 0.72rem;
    opacity: 0.6;
    flex-shrink: 0;
    color: var(--secondary);
}

.wiki-nav-sub {
    background: rgba(0, 0, 0, 0.15);
    padding: 0;
}

.wiki-nav-sub .wiki-nav-page-link {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

.wiki-nav-sub .wiki-nav-sub .wiki-nav-page-link {
    font-size: 0.79rem;
    color: rgba(255, 255, 255, 0.4);
}

.wiki-nav-add {
    padding: 0.9rem 1.2rem;
    border-top: 1px solid var(--glass-border);
}

.wiki-nav-add-btn {
    width: 100%;
    padding: 0.55rem 1rem;
    background: rgba(255, 46, 126, 0.08);
    border: 1px solid rgba(255, 46, 126, 0.25);
    border-radius: 8px;
    color: var(--primary);
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.wiki-nav-add-btn:hover {
    background: rgba(255, 46, 126, 0.18);
    border-color: var(--primary);
}

.wiki-nav-social {
    padding: 0.9rem 1.2rem;
    display: flex;
    gap: 1rem;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
}

.wiki-nav-social a {
    color: var(--text-muted);
    font-size: 1.05rem;
    transition: var(--transition);
    text-decoration: none;
}

.wiki-nav-social a:hover {
    color: var(--secondary);
    transform: scale(1.15);
}

/* Mobile sidebar toggle */
.wiki-sidebar-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 46, 126, 0.15);
    color: var(--primary);
    border: 1px solid rgba(255, 46, 126, 0.3);
    cursor: pointer;
    font-size: 1rem;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.wiki-sidebar-toggle:hover {
    background: rgba(255, 46, 126, 0.25);
}

.wiki-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 250;
}

.wiki-sidebar-backdrop.open {
    display: block;
}

/* Main wiki area */
.wiki-main {
    flex: 1;
    padding: 2.5rem;
    max-width: calc(100% - 280px);
    overflow-x: hidden;
}

/* Breadcrumb */
.wiki-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.83rem;
    flex-wrap: wrap;
}

.wiki-bc-link {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

.wiki-bc-link:hover {
    text-decoration: underline;
}

.wiki-bc-sep {
    color: var(--text-muted);
    font-size: 0.68rem;
}

.wiki-bc-current {
    color: var(--text-muted);
}

/* ── Wiki Home Page ── */
.wiki-home-banner {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2.5rem 3rem;
    background: linear-gradient(135deg, rgba(255, 46, 126, 0.05), rgba(138, 43, 226, 0.05));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin-bottom: 2.5rem;
    backdrop-filter: blur(10px);
}

.wiki-home-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(255, 46, 126, 0.4));
}

.wiki-home-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    line-height: 1.2;
}

.wiki-home-title span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wiki-home-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.wiki-home-cat-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.wiki-home-cat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    text-decoration: none;
    transition: var(--transition);
    writing-mode: horizontal-tb;
}

.wiki-home-cat-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
    border-color: var(--secondary);
}

.wiki-home-cat-icon {
    font-size: 1.8rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    flex-shrink: 0;
}

.wiki-home-cat-card h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
    flex: 1;
}

.wiki-home-cat-card p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.wiki-home-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.wiki-home-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.6rem;
}

.wiki-home-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.1rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.75rem;
}

/* Recent changes */
.wiki-recent-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.4rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.wiki-recent-item:last-child {
    border-bottom: none;
}

.wiki-recent-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.wiki-recent-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 7px;
    flex-shrink: 0;
}

.wiki-recent-info {
    flex: 1;
    min-width: 0;
}

.wiki-recent-title {
    display: block;
    color: #fff;
    font-size: 0.87rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wiki-recent-meta {
    display: block;
    color: var(--text-muted);
    font-size: 0.73rem;
    margin-top: 0.1rem;
}

.wiki-recent-arrow {
    color: var(--text-muted);
    font-size: 0.68rem;
    flex-shrink: 0;
}

/* Staff list */
.wiki-staff-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wiki-staff-item:last-child {
    border-bottom: none;
}

.wiki-staff-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.wiki-staff-info {
    flex: 1;
    min-width: 0;
}

.wiki-staff-name {
    display: block;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.wiki-staff-role {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.wiki-staff-detail {
    display: block;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.77rem;
    margin-top: 0.25rem;
    line-height: 1.5;
}

.wiki-staff-detail .fa-id-badge {
    color: var(--secondary);
    margin-right: 0.3rem;
}

.wiki-staff-detail .fa-list-check {
    color: var(--primary);
    margin-right: 0.3rem;
}

.wiki-empty {
    color: var(--text-muted);
    font-size: 0.88rem;
    text-align: center;
    padding: 1.2rem 0;
}

/* ── Wiki Page Tabs ── */
.wiki-page-tabs {
    display: flex;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.8rem;
    gap: 0;
}

.wiki-ptab {
    padding: 0.6rem 1.4rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--text-muted);
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
    font-family: inherit;
    font-weight: 500;
    white-space: nowrap;
}

.wiki-ptab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.wiki-ptab.active {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
    font-weight: 700;
}

/* ── Wiki Article Card ── */
.wiki-article-card {
    padding: 0;
    overflow: hidden;
}

.wiki-article-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.8rem 1.2rem;
    flex-wrap: wrap;
    border-bottom: 2px solid rgba(0, 242, 255, 0.15);
    background: rgba(0, 242, 255, 0.03);
}

.wiki-article-header>div:first-child {
    flex: 1;
    min-width: 0;
}

.wiki-article-card>.wiki-content {
    padding: 1.8rem;
}

#wiki-page-content {
    padding: 1.8rem !important;
    background: none;
    border: none;
    border-radius: 0;
}

/* ── Wiki Page View ── */
.wiki-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

.wiki-pg-title {
    font-size: 1.6rem;
    margin-bottom: 0.2rem;
    font-weight: 700;
}

.wiki-pg-meta {
    color: var(--text-muted);
    font-size: 0.83rem;
}

.wiki-page-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.wiki-delete-btn {
    background: rgba(255, 71, 87, 0.1) !important;
    color: #ff4757 !important;
    border: 1px solid rgba(255, 71, 87, 0.25) !important;
}

.wiki-delete-btn:hover {
    background: rgba(255, 71, 87, 0.22) !important;
}

/* Wiki article container — styling is now on .wiki-article-card */

/* Wiki content */
.wiki-content {
    line-height: 1.9;
    font-size: 0.97rem;
}

.wiki-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 2rem 0 0.9rem;
    padding: 0.5rem 0.9rem;
    color: #fff;
    background: linear-gradient(90deg, rgba(0, 242, 255, 0.08), transparent);
    border-left: 3px solid var(--secondary);
    border-radius: 0 6px 6px 0;
}

.wiki-content h2:first-child {
    margin-top: 0;
}

.wiki-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 1.6rem 0 0.7rem;
    color: #fff;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.wiki-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.2rem 0 0.5rem;
    color: var(--text-main);
}

.wiki-content p {
    color: #d8d8d8;
    margin-bottom: 1rem;
}

.wiki-content ul,
.wiki-content ol {
    padding-left: 1.8rem;
    margin-bottom: 1rem;
    color: #d8d8d8;
}

.wiki-content li {
    margin-bottom: 0.4rem;
}

.wiki-content strong {
    color: #fff;
}

.wiki-content a {
    color: var(--secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.wiki-content a:hover {
    color: var(--primary);
}

.wiki-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.92rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.wiki-content table th {
    background: rgba(0, 242, 255, 0.07);
    padding: 0.7rem 1rem;
    text-align: left;
    color: var(--secondary);
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wiki-content table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #d5d5d5;
}

.wiki-content table tr:last-child td {
    border-bottom: none;
}

.wiki-content table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.wiki-content blockquote {
    border-left: 3px solid var(--secondary);
    padding: 0.8rem 1.2rem;
    background: rgba(0, 242, 255, 0.04);
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
}

.wiki-content blockquote p {
    color: #c8c8c8;
    margin: 0;
    font-style: italic;
}

.wiki-content hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 2rem 0;
}

/* ── Editor ── */
.wiki-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.wiki-title-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    outline: none;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
    min-width: 180px;
}

.wiki-title-input:focus {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.08);
}

.wiki-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

.wiki-tool-btn {
    padding: 0.45rem 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.87rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    transition: var(--transition);
}

.wiki-tool-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.wiki-tool-sep {
    width: 1px;
    background: var(--glass-border);
    margin: 0.2rem 0.05rem;
    align-self: stretch;
}

.wiki-editor-body {
    min-height: 420px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 0 0 10px 10px;
    color: #e0e0e0;
    outline: none;
    font-size: 0.95rem;
    line-height: 1.8;
}

.wiki-editor-body:focus {
    border-color: rgba(255, 255, 255, 0.18);
}

.wiki-editor-body h2 {
    font-size: 1.35rem;
    margin: 1.2rem 0 0.5rem;
    color: #fff;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.3rem;
}

.wiki-editor-body h3 {
    font-size: 1.1rem;
    margin: 1rem 0 0.4rem;
    color: var(--secondary);
}

.wiki-editor-body blockquote {
    border-left: 4px solid var(--accent);
    padding: 0.5rem 1rem;
    background: rgba(138, 43, 226, 0.07);
    border-radius: 0 8px 8px 0;
    margin: 0.8rem 0;
}

.wiki-editor-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.wiki-editor-body th,
.wiki-editor-body td {
    padding: 0.5rem;
    border: 1px solid var(--glass-border);
    font-size: 0.88rem;
}

.wiki-editor-body th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.wiki-editor-body a {
    color: var(--secondary);
}

.wiki-editor-body ul,
.wiki-editor-body ol {
    padding-left: 1.5rem;
}

.wiki-editor-hint {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 0.5rem;
}

/* ── Form elements ── */
.wiki-form-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.wiki-form-group {
    margin-bottom: 1rem;
}

.wiki-label {
    display: block;
    margin-bottom: 0.4rem;
    color: #333;
    font-size: 0.88rem;
    font-weight: 600;
}

.wiki-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 10px;
    color: #111;
    outline: none;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.93rem;
    transition: var(--transition);
}

.wiki-input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 46, 126, 0.12);
}

.wiki-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 10px;
    color: #111;
    outline: none;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.93rem;
    transition: var(--transition);
    cursor: pointer;
}

.wiki-select option {
    background: #fff;
    color: #111;
}

/* ── Login Modal ── */
.wiki-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.wiki-modal {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.wiki-modal-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #111;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.wiki-modal h3 {
    color: #111;
}

.wiki-modal p {
    color: #444;
}

.wiki-modal label {
    color: #333;
}

.wiki-error {
    color: #e53935;
    font-size: 0.88rem;
    padding: 0.5rem 0.8rem;
    background: rgba(229, 57, 53, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(229, 57, 53, 0.2);
}

.wiki-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.wiki-modal-close:hover {
    background: #e0e0e0;
    color: #111;
}

.wiki-modal {
    position: relative;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
    .wiki-home-cat-grid {
        flex-direction: column;
    }

    .wiki-home-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .wiki-nav-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100%;
        z-index: 300;
        transition: left 0.3s ease;
        padding-top: 120px;
    }

    .wiki-nav-sidebar.open {
        left: 0;
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
    }

    .wiki-sidebar-toggle {
        display: flex;
    }

    .wiki-topbar-inner {
        justify-content: space-between;
        padding: 0 1rem;
    }

    .wiki-main {
        max-width: 100%;
        padding: 1.5rem;
    }

    .wiki-home-banner {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .wiki-home-title {
        font-size: 1.7rem;
    }
}

@media (max-width: 600px) {
    .wiki-home-cat-grid {
        flex-direction: column;
    }

    .wiki-page-header {
        flex-direction: column;
    }

    .wiki-page-actions {
        width: 100%;
    }

    /* テーブルを横スクロール可能に */
    .wiki-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.82rem;
    }

    /* モーダルを画面幅に合わせる */
    .wiki-modal {
        padding: 1.5rem 1.2rem;
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }

    /* トップバーをコンパクトに */
    .wiki-topbar-inner {
        padding: 0 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .wiki-user-info-text {
        font-size: 0.78rem;
    }

    /* コンテンツのパディングを縮小 */
    .wiki-main {
        padding: 1rem;
    }

    .wiki-home-banner {
        padding: 1.5rem 1rem;
    }

    .wiki-home-title {
        font-size: 1.4rem;
    }

    /* エディタのツールバーを折り返し */
    .wiki-editor-toolbar {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
}

@media (max-width: 768px) {

    nav,
    .cta-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    nav.open {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(8, 8, 8, 0.97);
        backdrop-filter: blur(20px);
        z-index: 999;
        align-items: center;
        justify-content: center;
    }

    nav.open ul {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }

    nav.open a {
        font-size: 1.5rem;
        color: var(--text-main);
    }

    .cta-nav.open {
        display: flex;
        position: fixed;
        bottom: 3rem;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
    }

    .mobile-menu-btn.open i::before {
        content: "\f00d";
        /* fa-xmark */
    }
}

/* ── Admin Tab ──────────────────────────────────────────────── */
.admin-tab-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 6rem 1.5rem 4rem;
}

.admin-tab-login-gate {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-tab-login-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 420px;
}

.admin-tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-tab-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.admin-tab-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.admin-stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-stat-card i {
    font-size: 1.75rem;
    color: var(--secondary);
}

.admin-stat-card div {
    display: flex;
    flex-direction: column;
}

.admin-stat-card span {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

.admin-stat-card small {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.admin-tab-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 1.25rem;
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-tab-section>h2,
.admin-section-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
    color: var(--text-main);
}

.admin-section-header h2 {
    margin-bottom: 0;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th {
    text-align: left;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.admin-role-badge {
    display: inline-block;
    padding: 0.2em 0.7em;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-role-badge.admin {
    background: rgba(255, 46, 126, 0.2);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.admin-role-badge.editor {
    background: rgba(0, 242, 255, 0.15);
    color: var(--secondary);
    border: 1px solid var(--secondary);
}

.admin-staff-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-staff-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
}

.admin-staff-emoji {
    font-size: 1.75rem;
    width: 2.5rem;
    text-align: center;
    flex-shrink: 0;
}

.admin-staff-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.admin-staff-info strong {
    color: var(--text-main);
    font-size: 0.95rem;
}

.admin-staff-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.admin-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.admin-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    font-size: 0.9rem;
    font-weight: 600;
}

.wiki-home-cat-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.wiki-home-cat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    text-decoration: none;
    transition: var(--transition);
    writing-mode: horizontal-tb;
}

.wiki-home-cat-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
    border-color: var(--secondary);
}

.wiki-home-cat-icon {
    font-size: 1.8rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    flex-shrink: 0;
}

.wiki-home-cat-card h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
    flex: 1;
}

.wiki-home-cat-card p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.admin-link-card i {
    font-size: 1.75rem;
    color: var(--secondary);
}

.admin-link-card:hover {
    background: rgba(0, 242, 255, 0.08);
    border-color: var(--secondary);
    transform: translateY(-2px);
    color: var(--text-main);
}

/* ──────────────────────────────────────────────────────────── */

/* ── Stock Notice ───────────────────────────────────────────── */
.stock-notice {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 1.75rem 2rem;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.stock-notice-block {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: rgba(0, 242, 255, 0.05);
    border-left: 3px solid var(--secondary);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
}

.stock-notice-block i {
    color: var(--secondary);
    font-size: 1.2rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.stock-notice-block p {
    margin: 0 0 0.4rem;
    color: var(--text-sub);
    font-size: 0.95rem;
    line-height: 1.7;
}

.stock-notice-block p:last-child {
    margin-bottom: 0;
}

.stock-notice-rules h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stock-notice-rules h4 i {
    color: var(--primary);
}

.stock-notice-rules ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.stock-notice-rules ul li {
    padding-left: 1.2rem;
    position: relative;
    color: var(--text-sub);
    font-size: 0.9rem;
    line-height: 1.7;
}

.stock-notice-rules ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.stock-notice-rules ul li strong {
    color: var(--text-main);
}

.stock-highlight {
    display: inline-block;
    background: rgba(255, 46, 126, 0.15);
    color: var(--primary);
    border: 1px solid rgba(255, 46, 126, 0.3);
    border-radius: 0.3rem;
    padding: 0.05em 0.5em;
    font-weight: 700;
    font-size: 0.9em;
}

/* ──────────────────────────────────────────────────────────── */

/* ── Streamers Tab ──────────────────────────────────────────── */
.streamers-section {
    padding: 8rem 0 5rem;
}

.streamers-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-top: -1.5rem;
    margin-bottom: 3rem;
    font-size: 1.05rem;
}

.streamers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.streamer-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    transition: var(--transition);
}

.streamer-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 46, 126, 0.15);
}

.official-stream-card {
    position: relative;
    border-color: rgba(255, 200, 0, 0.5);
    background: rgba(255, 180, 0, 0.07);
    grid-column: 1 / -1;
}

.official-stream-card:hover {
    border-color: rgba(255, 200, 0, 0.9);
}

.official-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    background: rgba(255, 180, 0, 0.2);
    border: 1px solid rgba(255, 200, 0, 0.5);
    color: #ffd700;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.streamer-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.streamer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.streamer-info {
    flex: 1;
    min-width: 0;
}

.streamer-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.streamer-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.streamer-platform {
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ──────────────────────────────────────────────────────────── */

/* ── AI Chatbot Widget ──────────────────────────────────────────── */
.ai-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: inherit;
}

.ai-chat-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 1.8rem;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 46, 126, 0.4);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 46, 126, 0.6);
}

.ai-chat-btn.pulsate {
    animation: pulse-chat 2s infinite;
}

@keyframes pulse-chat {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 46, 126, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(255, 46, 126, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 46, 126, 0);
    }
}

.ai-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    transform-origin: bottom right;
    animation: chatPopUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes chatPopUp {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ai-chat-header {
    padding: 1rem 1.2rem;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.ai-chat-actions {
    display: flex;
    gap: 10px;
}

.ai-chat-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-action-btn:hover {
    color: #fff;
    transform: scale(1.1);
}

.ai-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-chat-body::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.ai-message {
    max-width: 85%;
    display: flex;
    flex-direction: column;
}

.ai-message-bot {
    align-self: flex-start;
}

.ai-message-user {
    align-self: flex-end;
}

.ai-message-content {
    padding: 0.8rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

.ai-message-bot .ai-message-content {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 5px;
}

.ai-message-user .ai-message-content {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border-bottom-right-radius: 5px;
}

.ai-chat-settings-area {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid var(--glass-border);
}

.ai-chat-footer {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
}

.ai-chat-input-text {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 0.7rem 1rem;
    border-radius: 20px;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

.ai-chat-input-text:focus {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.1);
}

.ai-chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary);
    color: #000;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.ai-chat-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    background: #fff;
}

.ai-chat-send-btn:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    color: rgba(255, 255, 255, 0.5);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
    height: 20px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .ai-chat-window {
        width: 300px;
        height: 450px;
        bottom: 70px;
    }
}

/* ──────────────────────────────────────────────────────────── */
/* Support Page Styles */
.support-hero {
    padding: 6rem 0 4rem;
    text-align: center;
    background: radial-gradient(circle at 50% 50%, rgba(255, 46, 126, 0.1), transparent 70%);
}

.support-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.support-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.support-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(255, 46, 126, 0.1);
}

.support-card .icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    display: block;
}

.support-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.support-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.support-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(0, 242, 255, 0.1);
    color: var(--secondary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}