/* Investigation Notebook Styles */

.investigation-notebook {
    position: relative;
    z-index: 100;
}

/* トグルボタン */
.notebook-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 101;
}

.notebook-toggle-btn {
    background: rgba(126, 190, 165, 0.9);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.notebook-toggle-btn:hover {
    background: rgba(126, 190, 165, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* パネル */
.notebook-panel {
    position: absolute;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.notebook-panel.open {
    right: 0;
}

/* ヘッダー */
.notebook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #7EBEA5;
    color: #fff;
    border-bottom: 2px solid #6aa890;
}

.notebook-header h3 {
    margin: 0;
    font-size: 18px;
}

.notebook-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    transition: transform 0.2s;
}

.notebook-close:hover {
    transform: scale(1.2);
}

/* タブ */
.notebook-tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.notebook-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
}

.notebook-tab:hover {
    background: rgba(126, 190, 165, 0.1);
}

.notebook-tab.active {
    color: #7EBEA5;
    border-bottom-color: #7EBEA5;
    font-weight: bold;
}

/* コンテンツ */
.notebook-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.notebook-tab-content {
    display: none;
}

.notebook-tab-content.active {
    display: block;
}

/* 収集アイテム */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.item-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.item-card:hover {
    border-color: #7EBEA5;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.item-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.item-name {
    font-size: 12px;
    color: #666;
    word-break: break-word;
}

/* 年表 */
.timeline-list {
    position: relative;
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-left: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -17px;
    top: 8px;
    bottom: -20px;
    width: 2px;
    background: #e0e0e0;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 0;
    width: 28px;
    height: 28px;
    background: #7EBEA5;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.timeline-item.choice .timeline-marker {
    background: #6aa890;
    font-size: 16px;
}

.timeline-content {
    background: #f9f9f9;
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 3px solid #7EBEA5;
    font-size: 13px;
    line-height: 1.6;
}

.timeline-content strong {
    color: #7EBEA5;
    display: block;
    margin-bottom: 5px;
}

/* メモ */
.memo-textarea {
    width: 100%;
    height: 300px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 10px;
}

.memo-textarea:focus {
    outline: none;
    border-color: #7EBEA5;
}

.save-memo-btn {
    width: 100%;
    padding: 12px;
    background: #7EBEA5;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.save-memo-btn:hover {
    background: #6aa890;
}

/* 空メッセージ */
.empty-message {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 14px;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .notebook-panel {
        width: 100%;
        right: -100%;
    }
    
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}
