:root {
    --wiki-border: #e0e0e0;
    --wiki-accent: #0357AF;
}

/* --- 共通コンテナ --- */
.wiki-container {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* --- 検索フォーム --- */
.wiki-search-form {
    display: flex;
    gap: 0.5rem;
}

/* --- カテゴリ一覧 --- */
.wiki-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.wiki-category-card {
    display: block;
    padding: 1rem;
    border: 1px solid var(--wiki-border);
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: box-shadow 0.15s ease;
}

.wiki-category-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wiki-category-card__label {
    font-weight: 600;
}

.wiki-category-card__count {
    font-size: 0.85rem;
    color: #666;
}

/* --- 記事一覧・検索結果 --- */
.wiki-list,
.wiki-search-results {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wiki-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--wiki-border);
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    background: #fff;
}

.wiki-item:hover {
    background: #f7f9fc;
}

.wiki-item__category {
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    background: var(--wiki-accent);
    color: #fff;
    white-space: nowrap;
}

/* --- 記事詳細 --- */
.wiki-detail-container {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.wiki-detail-content {
    line-height: 1.8;
}

/* --- 安全カテゴリの免責事項 --- */
.wiki-safety-disclaimer {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d32f2f;
    border-radius: 6px;
    background: #fdecea;
    color: #d32f2f;
    font-size: 0.9rem;
    font-weight: 600;
}

.wiki-detail-content h2 {
    margin-top: 2rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--wiki-border);
}

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

.wiki-detail-content th,
.wiki-detail-content td {
    border: 1px solid var(--wiki-border);
    padding: 0.5rem;
}

/* --- 出典セクション(アコーディオン) --- */
.wiki-sources-heading {
    font-size: 0.95rem;
    color: #555;
}

.wiki-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 10px;
}

.wiki-view-count {
    font-size: 0.8rem;
    color: #888;
}

/* --- Good/Bad投票 --- */
.wiki-feedback {
    margin-top: 3rem;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--wiki-border);
    border-radius: 8px;
    background: #fafafa;
}

.wiki-feedback__question {
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.wiki-feedback__buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.wiki-feedback__btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--wiki-border);
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.wiki-feedback__btn:hover {
    background: #f0f4fa;
}

.wiki-feedback__btn.is-selected {
    border-color: var(--wiki-accent);
    background: #e8f0fb;
    font-weight: 600;
}

/* --- WIKIとは --- */
.wiki-about {
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--wiki-border);
    border-radius: 8px;
    background: #f7f9fc;
}

.wiki-about__title {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--wiki-accent);
}

.wiki-about__text {
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #555;
}

.wiki-about__text a {
    color: var(--wiki-accent);
}
