/*
 * Bootstrap をベースCSSとして読み込んだ上で、Bootstrap だけでは賄えない
 * Wiki固有のスタイル（フォント・Markdown本文の見た目・写真ギャラリー）のみを
 * ここで上書き定義する。レイアウト（サイドバー/グリッド等)は Bootstrap の
 * ユーティリティ/グリッドクラスを直接テンプレート側で使用している。
 */

html, body {
    background-color: var(--bs-body-bg, #212529);
    color: #fff;
}

/* 背景色に近い灰色で見えにくくなっていたテキストを白に統一する。 */
.text-secondary,
.text-body-secondary,
.text-muted {
    color: #fff !important;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

main {
    background-color: var(--bs-body-bg, #212529);
}

.wiki-nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.15rem;
    border-radius: 0.5rem;
    color: var(--bs-body-color, #dee2e6);
    text-decoration: none;
    font-size: 0.925rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.wiki-nav-link i {
    font-size: 1.05rem;
    width: 1.2rem;
    text-align: center;
    color: var(--bs-secondary-color, #9ca3af);
    transition: color 0.15s ease;
}

.wiki-nav-link:hover {
    background-color: var(--bs-tertiary-bg, rgba(255, 255, 255, 0.06));
    color: var(--bs-body-color, #dee2e6);
}

.wiki-nav-link.active {
    background-color: var(--bs-primary, #0d6efd);
    color: #fff;
    font-weight: 600;
}

.wiki-nav-link.active i {
    color: #fff;
}

.wiki-nav-divider {
    border-color: var(--bs-border-color, #334155);
    opacity: 0.5;
    margin: 0.5rem 0;
}

.wiki-content h1 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #334155;
}

.wiki-content code {
    background-color: #334155;
    color: #e2e8f0;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

.wiki-content pre {
    background-color: #1e293b;
    color: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}

.wiki-editor {
    min-height: 500px;
    font-family: 'JetBrains Mono', monospace;
}

.photo-gallery-item {
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 1px solid #334155;
    background-color: #1e293b;
    padding: 0;
    cursor: pointer;
}

.photo-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.2s;
}

.photo-gallery-item:hover img {
    transform: scale(1.05);
}

.detail-summary {
    cursor: pointer;
}

.photo-lightbox .carousel-item img {
    max-height: 75vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.video-gallery-item {
    position: relative;
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 1px solid #334155;
    background-color: #1e293b;
    padding: 0;
    cursor: pointer;
}

.video-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.2s;
}

.video-gallery-item:hover img {
    transform: scale(1.05);
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 3rem;
    pointer-events: none;
}

.calendar-table th,
.calendar-table td {
    width: 14.28%;
}

.calendar-cell {
    height: 9.5rem;
    overflow: hidden;
}

.calendar-day-content {
    cursor: pointer;
    border-radius: 0.375rem;
    overflow: hidden;
}

.calendar-day-thumb {
    width: 100%;
    /* メイン画像が縦に間延びしないよう上限を決め、残りをカテゴリ一覧に充てる */
    height: 4rem;
    max-height: 4rem;
    object-fit: cover;
    display: block;
    border-radius: 0.375rem;
}

.calendar-day-number {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    background-color: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.7rem;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}

.calendar-day-categories {
    overflow: hidden;
    max-height: 4.8rem;
}

.calendar-day-mini-badge {
    font-size: 0.62rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-fullimg-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    padding: 2rem;
}

.calendar-fullimg-overlay img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.6);
}
