:root {
    --primary: #1a1a2e;
    --primary-light: #16213e;
    --accent: #e8511a;
    --accent-hover: #c94010;
    --bg: #f0f2f5;
    --white: #ffffff;
    --text: #1a1a1a;
    --text-sub: #666;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 6px 20px rgba(0,0,0,0.14);
    --cat-beginner: #27ae60;
    --cat-skill: #2980b9;
    --cat-boss: #c0392b;
    --cat-tips: #16a085;
    --cat-system: #8e44ad;
    --cat-reroll: #e74c3c;
    --cat-event: #1abc9c;
    --cat-rank: #d35400;
    --cat-gacha: #6c3483;
    --cat-party: #1a5276;
    --cat-intro: #b7950b;
    --cat-default: #7f8c8d;
}

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

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.75;
    font-size: 14px;
}

a { color: inherit; text-decoration: none; }

/* ===== ヘッダー ===== */
header {
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 0.02em;
}
.logo-icon { color: var(--accent); font-size: 1.3rem; }
.logo-text span { color: var(--accent); }
nav { display: flex; gap: 0.25rem; }
nav a {
    color: #bbb;
    font-size: 0.82rem;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ===== ゲームバナー（ヒーロー） ===== */
.hero {
    background: linear-gradient(120deg, #0d1b3e 0%, #1a1a2e 50%, #2d1b4e 100%);
    color: white;
    padding: 2rem 1rem 1.75rem;
    border-bottom: 3px solid var(--accent);
}
.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.hero-icon {
    width: 80px;
    height: 80px;
    background: var(--accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(232,81,26,0.4);
}
.hero-text h1 { font-size: clamp(1.1rem, 3vw, 1.6rem); margin-bottom: 0.3rem; }
.hero-text p { color: #9ab; font-size: 0.82rem; }
.hero-tags { display: flex; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; }
.hero-tag {
    background: rgba(255,255,255,0.12);
    color: #cde;
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

/* ===== カテゴリフィルター ===== */
.filter-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 52px;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.filter-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.filter-inner::-webkit-scrollbar { display: none; }
.filter-btn {
    flex-shrink: 0;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    font-weight: bold;
    border: none;
    background: none;
    color: var(--text-sub);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    font-family: inherit;
}
.filter-btn:hover { color: var(--accent); }
.filter-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ===== メインコンテンツ ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 1.25rem 1rem; }
.content-layout { display: grid; grid-template-columns: 1fr 280px; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) {
    .content-layout { grid-template-columns: 1fr; }
    .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
}
@media (max-width: 600px) {
    .sidebar { grid-template-columns: 1fr; }
}

/* ===== セクションタイトル ===== */
.section-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}
.section-head h2 { font-size: 1rem; color: var(--text); }
.section-head-accent { width: 4px; height: 1rem; background: var(--accent); border-radius: 2px; }

/* ===== 記事カード ===== */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.article-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.18s, box-shadow 0.18s;
    display: flex;
    flex-direction: column;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.article-card a { display: flex; flex-direction: column; height: 100%; }

.card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: rgba(255,255,255,0.9);
    font-weight: bold;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}
.card-thumb::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}

.card-body { padding: 0.85rem; flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }
.cat-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: bold;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    color: white;
    align-self: flex-start;
}
.cat-beginner { background: var(--cat-beginner); }
.cat-skill    { background: var(--cat-skill); }
.cat-boss     { background: var(--cat-boss); }
.cat-tips     { background: var(--cat-tips); }
.cat-system   { background: var(--cat-system); }
.cat-reroll   { background: var(--cat-reroll); }
.cat-event    { background: var(--cat-event); }
.cat-rank     { background: var(--cat-rank); }
.cat-gacha    { background: var(--cat-gacha); }
.cat-party    { background: var(--cat-party); }
.cat-intro    { background: var(--cat-intro); }
.cat-default  { background: var(--cat-default); }

.card-title {
    font-size: 0.88rem;
    font-weight: bold;
    color: var(--text);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-excerpt {
    font-size: 0.78rem;
    color: var(--text-sub);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; }
.card-date { font-size: 0.7rem; color: #aaa; }
.card-new {
    font-size: 0.65rem;
    font-weight: bold;
    background: var(--accent);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}

/* ===== サイドバー ===== */
.sidebar-widget {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1rem;
}
.widget-head {
    background: var(--primary);
    color: white;
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.widget-body { padding: 0.5rem 0; }

/* ランキング */
.rank-list { list-style: none; }
.rank-item a {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}
.rank-item:last-child a { border-bottom: none; }
.rank-item a:hover { background: #f9f9f9; }
.rank-num {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
    margin-top: 1px;
}
.rank-1 { background: #e8b300; }
.rank-2 { background: #aaa; }
.rank-3 { background: #cd7f32; }
.rank-other { background: var(--primary-light); }
.rank-title { font-size: 0.8rem; color: var(--text); line-height: 1.4; }

/* カテゴリ一覧 */
.cat-list { padding: 0.5rem 1rem 0.75rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cat-link {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    border: 1px solid;
    transition: background 0.15s, color 0.15s;
}
.cat-link:hover { color: white !important; }

/* ===== 広告 ===== */
.ad-banner {
    background: #ebebeb;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.72rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    border: 1px dashed #ddd;
}
.ad-sidebar {
    background: #ebebeb;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.72rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px dashed #ddd;
}

/* ===== 記事ページ ===== */
.article-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 1rem;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 900px) { .article-wrap { grid-template-columns: 1fr; } }
.article-container {
    background: var(--white);
    border-radius: 8px;
    padding: 1.75rem;
    box-shadow: var(--shadow);
}
.breadcrumb { font-size: 0.75rem; color: var(--text-sub); margin-bottom: 1rem; }
.breadcrumb a { color: var(--accent); }
.breadcrumb span { margin: 0 0.3rem; }
.article-meta { color: var(--text-sub); font-size: 0.78rem; margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.5rem; }
.article-title { font-size: clamp(1.1rem, 2.5vw, 1.5rem); color: var(--text); margin-bottom: 1.25rem; line-height: 1.5; font-weight: bold; }
.article-body h2 {
    font-size: 1.05rem;
    color: var(--white);
    background: var(--primary);
    margin: 2rem 0 0.75rem;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    border-left: 4px solid var(--accent);
}
.article-body h3 {
    font-size: 0.95rem;
    color: var(--text);
    margin: 1.5rem 0 0.5rem;
    padding: 0.4rem 0.75rem;
    background: #f5f7ff;
    border-left: 3px solid var(--accent);
    border-radius: 0 4px 4px 0;
}
.article-body p { margin-bottom: 1rem; font-size: 0.92rem; }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-body li { margin-bottom: 0.3rem; font-size: 0.92rem; }
.article-body table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 0.85rem; }
.article-body th { background: var(--primary); color: white; padding: 0.5rem 0.75rem; text-align: left; }
.article-body td { padding: 0.5rem 0.75rem; border-bottom: 1px solid #eee; }
.article-body tr:nth-child(even) td { background: #fafafa; }
.back-link { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 2rem; color: var(--accent); font-size: 0.85rem; }
.back-link:hover { text-decoration: underline; }

/* ===== フッター ===== */
footer {
    background: var(--primary);
    color: #7a8a9a;
    padding: 2rem 1rem 1.5rem;
    margin-top: 2.5rem;
    font-size: 0.8rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-links { margin: 0.75rem 0; display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: #9ab; transition: color 0.15s; }
.footer-links a:hover { color: var(--accent); }
.copyright { font-size: 0.72rem; margin-top: 0.5rem; color: #556; }

/* ===== フォーム ===== */
.form-wrap { max-width: 680px; margin: 2rem auto; background: var(--white); border-radius: 8px; padding: 2rem; box-shadow: var(--shadow); }
.form-wrap h1 { font-size: 1.2rem; color: var(--text); margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--border); }
.form-wrap label { display: block; margin-bottom: 0.25rem; font-size: 0.82rem; color: #555; font-weight: bold; }
.form-wrap input, .form-wrap textarea {
    width: 100%; border: 1px solid var(--border); border-radius: 4px;
    padding: 0.6rem 0.75rem; font-size: 0.88rem; margin-bottom: 1rem;
    font-family: inherit; transition: border-color 0.15s;
}
.form-wrap input:focus, .form-wrap textarea:focus { outline: none; border-color: var(--accent); }
.form-wrap textarea { height: 140px; resize: vertical; }
.form-wrap button {
    background: var(--accent); color: white; border: none;
    padding: 0.7rem 2rem; border-radius: 4px; font-size: 0.88rem;
    cursor: pointer; transition: background 0.2s; font-family: inherit; font-weight: bold;
}
.form-wrap button:hover { background: var(--accent-hover); }

.loading { color: var(--text-sub); font-size: 0.88rem; text-align: center; padding: 2rem; }
