:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --accent-color: #555555;
    --border-color: #e0e0e0;
    --header-height: 60px;
    --max-content-width: 800px;
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-top: var(--header-height);
    /* ヘッダー固定分の余白 */
}

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

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.site-header nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    /* 項目が増えたので少し詰める */
    padding: 0 10px;
    overflow-x: auto;
    /* スマホで項目が多い場合横スクロール */
    white-space: nowrap;
    width: 100%;
    justify-content: center;
}

.site-header nav a {
    font-weight: 500;
    font-size: 0.85rem;
    /* 項目が増えたので少し小さく */
    padding: 10px 5px;
    transition: color 0.3s;
    display: block;
}

.site-header nav a.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

/* Main Container */
main {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - var(--header-height));
}

/* Sections */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-left: 4px solid var(--text-color);
    padding-left: 10px;
}

.subsection-title {
    font-size: 1.2rem;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: bold;
}

/* Profile Section */
.profile-item {
    margin-bottom: 20px;
}

.mine-item {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.mine-level {
    font-weight: bold;
    color: #cc0000;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.mine-reason {
    font-size: 0.95rem;
}

/* Scenarios Section (Common List Styles) */
.scenario-list {
    list-style: none;
}

.scenario-item {
    padding: 4px 8px;
    /* 左右に少し余白 */
    border-bottom: 1px dotted var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* 左右に配置 */
}

.scenario-left {
    display: flex;
    align-items: center;
}

.scenario-item.is-favorite {
    background-color: #fff9e6;
    font-weight: bold;
}

.favorite-star {
    color: #ffd700;
    font-size: 1.1em;
    margin-left: 10px;
    /* 左マージン */
}

.scenario-ho {
    font-size: 0.8rem;
    color: #666;
    margin-left: 10px;
    background: #eee;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: normal;
}

/* Planned Schedule Styles */
.planned-section {
    padding: 15px;
    background-color: #fff;
    border-radius: 4px;
}

.planned-note {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #acc;
    border-radius: 2px;
    line-height: 1.8;
}

.planned-block {
    margin-bottom: 30px;
}

.planned-month-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 10px;
    padding-bottom: 5px;
    padding-left: 5px;
    display: flex;
    align-items: center;
}

.planned-month-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #2c3e50;
    margin-right: 8px;
    transform: rotate(45deg);
}

.planned-list {
    list-style: none;
    padding-left: 0;
}

.planned-item {
    font-size: 0.95rem;
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s;
}

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

.planned-item:hover {
    background-color: #fafafa;
}

.planned-item-title {
    font-weight: 500;
    color: #333;
}

.planned-item-role {
    font-size: 0.8rem;
    color: #555;
    background-color: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 10px;
    white-space: nowrap;
    border: 1px solid #dee2e6;
}

/* PC List Section */
.pc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.pc-thumbnail {
    cursor: pointer;
    text-align: center;
    transition: opacity 0.2s;
}

.pc-thumbnail:hover {
    opacity: 0.8;
}

.pc-icon {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    background-color: #eee;
    margin-bottom: 5px;
}

.pc-name-thumb {
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* PC Detail Section */
.pc-detail-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.pc-tachie-container {
    width: 100%;
    text-align: center;
    background-color: #fafafa;
    padding: 10px;
    border-radius: 8px;
}

.pc-tachie {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.pc-info {
    flex: 1;
}

.pc-basic-info dl {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.pc-basic-info dt {
    font-weight: bold;
    color: #666;
}

.pc-diff-images {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    overflow-x: auto;
}

.pc-diff-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    pointer-events: none;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.gallery-item {
    cursor: pointer;
}

.gallery-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.2s;
}

.gallery-thumb:hover {
    transform: scale(1.05);
}

.artist-name {
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
}

/* Works Section (New) */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.work-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.work-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.work-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.work-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
    border-bottom: none;
    padding-bottom: 0;
    flex: 1;
}

/* Badges */
.work-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.status-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
}

.status-published {
    background-color: #28a745;
}

.status-wip {
    background-color: #17a2b8;
}

.status-private {
    background-color: #6c757d;
}

.rating-badge {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    background-color: #dc3545;
    /* 赤 */
}

.work-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #555;
    clear: both;
}

.work-spec-item {
    background-color: #f0f2f5;
    padding: 3px 10px;
    border-radius: 15px;
}

.work-summary {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
}

/* Modal for Art */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    position: relative;
}

.modal-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

#modal-caption {
    color: #fff;
    margin-top: 10px;
}

.close-modal {
    position: absolute;
    top: -30px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

/* PC View (Desktop) */
@media (min-width: 768px) {
    .pc-detail-container {
        flex-direction: row;
        align-items: flex-start;
    }

    .pc-tachie-container {
        flex: 1;
        position: sticky;
        top: 80px;
    }

    .pc-info {
        flex: 1;
    }

    /* ヘッダーのスクロール解除 */
    .site-header nav ul {
        justify-content: center;
        width: auto;
    }
}

/* Profile Icon */
.profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Accordion (Details/Summary) */
details {
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #fff;
    overflow: hidden;
}

summary {
    padding: 15px;
    background-color: #fafafa;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    position: relative;
    list-style: none;
    /* デフォルトの三角形を消す（一部ブラウザ向け） */
    display: flex;
    /* Flexboxでアイコン配置制御 */
    align-items: center;
    justify-content: space-between;
}

/* 標準のマーカーを消す（Chrome/Safari） */
summary::-webkit-details-marker {
    display: none;
}

/* カスタムマーカー */
summary::after {
    content: '›';
    /* アイコンを > に変更 */
    font-size: 1.5rem;
    font-weight: bold;
    color: #999;
    transition: transform 0.2s;
    line-height: 1;
    margin-left: 10px;
}

details[open] summary::after {
    transform: rotate(90deg);
    /* 90度回転して下向きにする */
}

details[open] summary {
    border-bottom: 1px solid var(--border-color);
}

.accordion-content {
    padding: 15px;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

/* Generic List Styles (for likes/elements) - 黒丸なし */
.simple-list {
    list-style: none;
    /* disc から none に変更 */
    padding-left: 5px;
    margin-left: 0;
}

.simple-list li {
    margin-bottom: 8px;
    border-bottom: 1px dashed #eee;
    /* 薄い区切り線を入れる */
    padding-bottom: 4px;
}

.simple-list li:last-child {
    border-bottom: none;
}