/* ========== styles/3_notes.css ========== */
/* ノート・分析機能 */

/* 相場ノート簡素化スタイル */
.note-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    color: #00ff88;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
}

/* チャート画像2枚対応 */
.chart-images-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-images-container .image-upload-area {
    flex: 1;
    max-width: 300px;
}

/* 相場ノート強化スタイル(新規追加) */
.note-input-area {
    margin-bottom: 40px;
}

.note-date-selector {
    margin-bottom: 25px;
}

.date-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.date-input-wrapper input[type="date"] {
    flex: 1;
    max-width: 300px;
}

.calendar-icon-btn {
    background: #FF6B35;
    border: none;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.calendar-icon-btn:hover {
    background: #FF8557;
    transform: scale(1.1);
}

.date-navigation {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.date-nav-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.date-nav-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
}

/* 週間プレビューと詳細表示 */
.note-display-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
    align-items: stretch;  /* 左右の高さを揃える */
    min-height: 600px;  /* 最小高さを確保 */
}

/* タブレット対応 → 6_responsive.css へ移動 */

/* 週間プレビュー */
.weekly-preview {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 100%;  /* 親要素の高さに合わせる */
    display: flex;
    flex-direction: column;
}

.weekly-preview h3 {
    color: #00ff88;
    margin-bottom: 20px;
}

.week-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.week-navigation button {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.week-navigation button:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
}

#currentWeekRange {
    font-weight: bold;
    color: #fff;
}

.week-days {
    display: grid;
    gap: 15px;
    flex: 1;  /* 残りのスペースを使う */
    overflow-y: auto;  /* 必要に応じてスクロール */
}

.day-preview {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 140px;  /* 追加:最小高さ確保 */
}

.day-preview:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: #00ff88;
    transform: translateX(5px);
}

.day-preview.selected {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
}

.day-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    height: 20px;
}

.day-preview-date {
    font-weight: bold;
    color: #00ff88;
}

.day-preview-weekday {
    color: #888;
    font-size: 0.85rem;
}

.day-preview-content {
    font-size: 0.85rem;
    color: #ccc;
    height: 85px !important;      /* !important追加 */
    min-height: 85px !important;
    max-height: 85px !important;
    overflow: hidden;
}

.day-preview-line {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 17px !important;
    height: 17px !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 黄色のハイライトなどがはみ出さないように */
.day-preview-line * {
    vertical-align: baseline;
}

/* 空の行でも高さを確保 */
.day-preview-line:empty::before {
    content: '\00a0';  /* 非改行スペース */
    display: inline-block;
}

/* 装飾タグのスタイル継承 */
.day-preview-line b {
    font-weight: bold;
}

.day-preview-line u {
    text-decoration: underline;
}

.day-preview-line .text-red {
    color: #ff4444;
}

.day-preview-line .text-blue {
    color: #4169e1;
}

.day-preview-line .highlight-yellow {
    background-color: rgba(255, 255, 0, 0.3);
    padding: 0 2px;
    display: inline;  /* 追加 */
}

.day-preview-empty {
    color: #666;
    font-style: italic;
}

/* 詳細表示 */
.note-detail {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    height: 100%;  /* 親要素の高さに合わせる */
}

.detail-placeholder {
    text-align: center;
    color: #888;
    padding: 40px;
    font-size: 1.1rem;
}

.note-detail-content {
    display: grid;
    gap: 20px;
}

.detail-heading {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #00ff88;
}

.detail-heading-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #00ff88;
    font-weight: bold;
}

.detail-heading-content {
    color: #e0e0e0;
    line-height: 1.8;
    white-space: pre-wrap;
}

.detail-heading-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.detail-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.detail-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* ノートエントリー */
.note-entry {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #00ff88;
    position: relative;
    transition: all 0.3s ease;
}

.note-entry:hover {
    background: rgba(255, 255, 255, 0.08);
}

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

.note-date {
    color: #888;
    font-size: 0.9rem;
}

.note-content {
    line-height: 1.8;
    color: #e0e0e0;
}

.note-actions {
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.note-entry:hover .note-actions {
    opacity: 1;
}

/* 統計サマリーカード */
.stats-summary {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid #00ff88;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
}

.stat-item .stat-label {
    color: #888;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 5px;
}

.stat-item .stat-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #00ff88;
}

/* カレンダー追加スタイル(新規追加) */
.calendar-section {
    margin: 40px 0;
}

.calendar-container {
    background: #1a1a1a; 
    border-radius: 15px;
    padding: 25px; 
    margin-bottom: 25px;
    max-width: 800px;
    width: 100%;
}

.calendar-header {
    display: flex; 
    justify-content: space-between;
    align-items: center; 
    margin-bottom: 20px;
}

.calendar-nav {
    background: rgba(0, 255, 136, 0.2); 
    border: 1px solid #00ff88;
    color: #00ff88; 
    padding: 8px 16px; 
    border-radius: 8px;
    cursor: pointer; 
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.calendar-nav:hover { 
    background: rgba(0, 255, 136, 0.3); 
    transform: translateY(-1px);
}

#currentMonth { 
    font-size: 1.2rem; 
    font-weight: bold; 
    color: #fff; 
}

.calendar-grid { 
    display: grid; 
    grid-template-columns: repeat(7, 1fr); 
    gap: 3px; 
}

.calendar-weekday {
    text-align: center; 
    padding: 10px; 
    color: #888;
    font-weight: bold; 
    font-size: 0.8rem;
}

.calendar-date {
    aspect-ratio: 1.2; 
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center; 
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px; 
    cursor: pointer; 
    transition: all 0.3s ease;
    position: relative; 
    font-size: 0.85rem;
    padding: 5px;
    overflow: hidden;
}

.calendar-date:hover { 
    background: rgba(0, 255, 136, 0.2); 
    transform: scale(1.05);
}

.calendar-date.has-trades {
    background: rgba(0, 255, 136, 0.3);
    border: 1px solid #00ff88;
}

.calendar-date.has-note {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid #ffd700;
}

.calendar-date.selected { 
    background: #00ff88; 
    color: #000; 
    font-weight: bold; 
}

.calendar-date.other-month { 
    color: #555; 
    background: rgba(255, 255, 255, 0.02); 
}

.calendar-date.today {
    border: 2px solid #00ff88;
}

/* 既存の.calendar-dayスタイルも維持(互換性のため) */
.calendar-day {
    aspect-ratio: 1.2; 
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center; 
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px; 
    cursor: pointer; 
    transition: all 0.3s ease;
    position: relative; 
    font-size: 0.85rem;
    padding: 5px;
    overflow: hidden;
}

.calendar-day:hover { 
    background: rgba(0, 255, 136, 0.2); 
    transform: scale(1.05);
}

.calendar-day.has-note {
    background: rgba(0, 255, 136, 0.3);
    border: 1px solid #00ff88;
}

.calendar-day.holiday {
    background: rgba(255, 68, 68, 0.15);
}

.calendar-day.us-holiday {
    background: rgba(70, 130, 180, 0.15);
}

.calendar-day.uk-holiday {
    background: rgba(255, 165, 0, 0.15);
}

.calendar-day.selected { 
    background: #00ff88; 
    color: #000; 
    font-weight: bold; 
}

.calendar-day.other-month { 
    color: #555; 
    background: rgba(255, 255, 255, 0.02); 
}

.trade-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #00ff88;
    color: #000;
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
}

.day-number {
    font-size: 1rem;
}

.holiday-name {
    font-size: 0.65rem;
    margin-top: 2px;
    line-height: 1.1;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400;
}

.holiday-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.65rem;
}

.selected-note {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px; 
    padding: 25px; 
    margin-top: 20px;
}

.selected-note h4 { 
    color: #00ff88; 
    margin-bottom: 15px; 
    font-size: 1.1rem;
}

/* ノート画像表示 */
.note-image-section {
    margin-top: 20px;
    text-align: center;
}

.note-image-section img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.note-image-section img:hover {
    transform: scale(1.02);
    border-color: #00ff88;
}

/* レポート */
.report-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.report-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.report-btn.active {
    background: #00ff88;
    color: #000;
    border-color: #00ff88;
}

.report-btn:hover:not(.active) {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
}

.report-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
}

.report-header {
    text-align: center;
    margin-bottom: 30px;
}

.report-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #00ff88;
    margin-bottom: 10px;
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: rgba(0, 0, 0, 0.5);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-card .value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.summary-card .label {
    color: #888;
    font-size: 0.9rem;
}

/* テーブル */
.trades-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.trades-table th,
.trades-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trades-table th {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    font-weight: bold;
    position: sticky;
    top: 0;
    font-size: 0.85rem;
}

.trades-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.trades-table tbody tr {
    cursor: pointer;
    transition: all 0.3s ease;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-badge.win {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.status-badge.loss {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
}

.status-badge.draw {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

/* エディタツールバー */
.editor-toolbar {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px 8px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
}

.editor-btn {
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.editor-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
}

/* textareaと同じ見た目のエディタ */
.note-editor.textarea-style {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 12px;
    border-radius: 0 0 8px 8px;
    font-size: 1rem;
    line-height: 1.5;
    font-family: inherit;
    transition: all 0.3s ease;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    resize: vertical;
    min-height: 100px;
    max-height: 800px;
}

/* リサイズグリップのスタイル */
.note-editor.textarea-style::-webkit-resizer {
    background: transparent;
}

.note-editor.textarea-style::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, 0.3) 50%);
    pointer-events: none;
}

.note-editor.textarea-style:focus {
    outline: none;
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.05);
}

/* プレースホルダー */
.note-editor.textarea-style:empty:before {
    content: attr(data-placeholder);
    color: #666;
    font-style: italic;
}

/* エディタ内のスタイル */
.note-editor b {
    font-weight: bold;
}

.note-editor u {
    text-decoration: underline;
}

.note-editor .text-red {
    color: #ff4444;
}

.note-editor .text-blue {
    color: #4169e1;
}

.note-editor .highlight-yellow {
    background-color: rgba(255, 255, 0, 0.3);
    padding: 0 2px;
}

/* ノート画像コンテナ */
.note-images-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.note-image-wrapper {
    position: relative;
    display: inline-block;
    margin: 5px;
}

/* 日付選択部分 */
.date-selector {
    margin-bottom: 25px;
}

.date-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.date-input-group input[type="date"] {
    flex: 1;
    max-width: 300px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 8px;
    font-size: 1rem;
}

/* カレンダー関連の追加スタイル */
.calendar-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

#calendar {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    min-height: 400px;
}

#monthYear {
    text-align: center;
    font-size: 1.2rem;
    color: #fff;
    min-width: 150px;
}

/* 詳細セクション */
.detail-section {
    margin-bottom: 20px;
}

.detail-section h4 {
    color: #00ff88;
    margin-bottom: 10px;
}

.detail-text {
    color: #e0e0e0;
    line-height: 1.8;
}

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

/* ノート詳細のアクション */
.note-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.note-detail-actions {
    display: flex;
    gap: 10px;
}

/* 統計情報 */
.quick-stats {
    background: #1a1a1a;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-box {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.stat-box:hover {
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-2px);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #00ff88;
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    color: #888;
    font-size: 0.85rem;
}

/* レスポンシブ対応 → 6_responsive.css へ移動 */

/* ========== 編集モード関連 ========== */
/* 編集インジケーター */
.editing-indicator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.editing-badge {
    font-weight: bold;
    margin-right: 10px;
}

#editingDate {
    flex-grow: 1;
    font-size: 14px;
}

/* 編集モード時の編集エリアハイライト */
.note-input-area.editing-mode {
    border: 2px solid #667eea;
    background: rgba(102, 126, 234, 0.05);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
    animation: editingPulse 2s infinite;  /* editingPulseを使用 */
}

/* スムーズスクロール */
html {
    scroll-behavior: smooth;
}

/* ========================================
   月次カレンダー（収支管理タブ）
   MonthlyCalendarModule
   ======================================== */

/* カレンダーコントロール */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 8px;
}

.calendar-controls-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.calendar-controls-left label {
    color: #aaa;
    font-size: 14px;
}

.calendar-controls-left select {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
}

.calendar-controls-left select:hover {
    border-color: #007bff;
}

.calendar-controls-center {
    display: flex;
    align-items: center;
    gap: 20px;
}

.calendar-nav-btn {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-nav-btn:hover {
    background: #333;
    border-color: #007bff;
}

.calendar-month-label {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    min-width: 80px;
    text-align: center;
}

.calendar-today-btn {
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.calendar-today-btn:hover {
    background: #0056b3;
}

/* カレンダーグリッド */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 20px;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 8px;
}

/* 曜日ヘッダー */
.calendar-header-cell {
    text-align: center;
    font-weight: bold;
    color: #aaa;
    padding: 10px;
    font-size: 14px;
    border-bottom: 2px solid #444;
}

.calendar-header-cell.sunday {
    color: #ff6b6b;
}

.calendar-header-cell.saturday {
    color: #4dabf7;
}

/* 日付セル */
.calendar-day-cell {
    background: #1a1a1a;
    border-radius: 4px;
    padding: 10px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.calendar-day-cell:hover {
    background: #2a2a2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.calendar-day-cell.empty {
    background: transparent;
    cursor: default;
}

.calendar-day-cell.empty:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

.calendar-day-cell.today {
    border: 2px solid #007bff;
    background: #1a3a5a;
}

/* 日付番号 */
.calendar-day-number {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

.calendar-day-cell.sunday .calendar-day-number {
    color: #ff6b6b;
}

.calendar-day-cell.saturday .calendar-day-number {
    color: #4dabf7;
}

/* 損益表示 */
.calendar-day-profit {
    font-size: 16px;           /* 14px → 16px */
    font-weight: bold;
    margin-top: 5px;
}

.calendar-day-profit.positive {
    color: #4ade80;
}

.calendar-day-profit.negative {
    color: #f87171;
}

.calendar-day-profit.zero {
    color: #aaa;
}

/* トレード件数 */
.calendar-day-count {
    font-size: 13px;           /* 11px → 13px */
    color: #888;
    margin-top: 3px;
}

/* 月間サマリー */
.month-summary {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.summary-profit {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.summary-profit.positive {
    color: #4ade80;
}

.summary-profit.negative {
    color: #f87171;
}

.summary-profit.zero {
    color: #aaa;
}

.summary-count {
    font-size: 14px;
    color: #888;
}

/* ツールチップ */
.day-tooltip {
    position: fixed;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    z-index: var(--z-modal-auth);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    max-width: 300px;
}

.tooltip-date {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 10px;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
}

.tooltip-profit {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
}

.tooltip-profit.positive {
    color: #4ade80;
}

.tooltip-profit.negative {
    color: #f87171;
}

.tooltip-count {
    font-size: 12px;
    color: #888;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .calendar-grid {
        gap: 4px;
        padding: 10px;
    }
    
    .calendar-day-cell {
        min-height: 60px;
        padding: 5px;
    }
    
    .calendar-day-number {
        font-size: 14px;
    }
    
    .calendar-day-profit {
        font-size: 12px;
    }
    
    .calendar-day-count {
        font-size: 10px;
    }
    
    .summary-profit {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .calendar-grid {
        gap: 2px;
    }
    
    .calendar-day-cell {
        min-height: 50px;
        padding: 3px;
    }
    
    .calendar-day-number {
        font-size: 12px;
    }
    
    .calendar-day-profit {
        font-size: 11px;
    }
    
    .calendar-month-label {
        font-size: 16px;
    }
}

/* ========================================
   相場ノート機能改善 - 検索・月メモ
   追加日: 2025-11-27
   ======================================== */

/* ================
   検索ボタン
   ================ */

.note-search-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 15px;
}

.search-btn-text {
    display: inline;
}

/* ================
   月メモコンテナ
   ================ */

.monthly-memo-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.monthly-memo-header {
    margin-bottom: 10px;
}

.monthly-memo-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #00ff88;
}

/* ================
   月メモセクション（アノマリー・月次）
   ================ */

.monthly-memo-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

.monthly-memo-section:last-child {
    margin-bottom: 0;
}

.monthly-memo-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.monthly-memo-section-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.collapse-icon {
    font-size: 0.8em;
    color: #888;
    width: 16px;
    text-align: center;
    transition: transform 0.2s;
}

.section-icon {
    font-size: 1em;
}

.section-label {
    flex: 1;
    font-size: 0.95em;
    color: #ccc;
}

.memo-edit-btn {
    font-size: 0.8em;
    padding: 4px 10px;
}

/* 折りたたみ時のコンテンツ非表示 */
.monthly-memo-section.collapsed .monthly-memo-section-content {
    display: none;
}

/* 折りたたみ時のアイコン変更 - JSで制御するためコメントアウト */
/* .monthly-memo-section.collapsed .collapse-icon {
    transform: rotate(180deg);
} */

/* ================
   月メモコンテンツ
   ================ */

.monthly-memo-section-content {
    padding: 10px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9em;
    line-height: 1.6;
    white-space: pre-wrap;
    color: #ddd;
}

.memo-placeholder {
    color: #666;
    cursor: pointer;
    padding: 5px 0;
}

.memo-placeholder:hover {
    color: #888;
}

/* メモテキスト表示 */
.memo-text {
    color: #ddd;
}

/* ================
   検索モーダル
   ================ */

.note-search-modal-content {
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.search-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-input-container input {
    flex: 1;
    padding: 12px;
    font-size: 1em;
}

.search-results-container {
    flex: 1;
    overflow-y: auto;
    max-height: 50vh;
}

.search-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.search-result-count {
    padding: 10px 0;
    color: #888;
    font-size: 0.9em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

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

.search-result-date {
    font-weight: bold;
    color: #00ff88;
    margin-bottom: 5px;
}

.search-result-preview {
    font-size: 0.9em;
    color: #aaa;
    line-height: 1.4;
}

.search-result-preview mark {
    background: rgba(255, 255, 0, 0.3);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.search-result-arrow {
    color: #666;
    font-size: 1.2em;
}

.search-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

/* ================
   月メモ編集モーダル
   ================ */

.monthly-memo-edit-modal-content {
    max-width: 500px;
    width: 90%;
}

.monthly-memo-textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    font-size: 1em;
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    resize: vertical;
}

.monthly-memo-textarea:focus {
    outline: none;
    border-color: #00ff88;
}

/* 月メモ編集モーダルのテキストエリア文字サイズ */
#monthlyMemoEditModal textarea {
    font-size: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ================
   日付選択部の調整（検索ボタン追加対応）
   ================ */

.date-selector {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* ================
   週間プレビュー修正（スクロール問題対応）
   ================ */

.weekly-preview {
    max-height: none;
    height: auto;
}

#weekDays {
    overflow: visible;
    height: auto;
    max-height: none;
}

/* ================
   相場観エディタの初期高さ調整
   ================ */

#noteMarketView {
    min-height: 200px;
}

/* ========== 3_notes.css 終了 ========== */