/* ===== メモタブ ===== */
#memo .memo-input-panel {
    background: var(--bg-secondary, #16213e);
    border: 1px solid var(--border-light, #2a3a5a);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}
.memo-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}
.memo-input-row label.memo-field-label {
    font-size: 13px;
    opacity: 0.8;
    min-width: 64px;
}
#memo select, #memo input[type="text"] {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-light, #2a3a5a);
    background: var(--bg-primary, #1a1a2e);
    color: var(--text-primary, #e0e0e0);
    font-size: 14px;
}
#memoPersonInput { flex: 1; min-width: 180px; }
.memo-or-sep { opacity: 0.5; font-size: 12px; padding: 0 4px; }

/* ===== 日付ホイールピッカー ===== */
.memo-wheel {
    position: relative;
    width: 100%;
    max-width: 320px;
    height: 200px; /* itemHeight(40) * 5 */
    overflow: hidden;
    border: 1px solid var(--border-light, #2a3a5a);
    border-radius: 12px;
    background: var(--bg-primary, #1a1a2e);
    -webkit-mask-image: linear-gradient(to bottom,
        transparent 0%, #000 25%, #000 75%, transparent 100%);
    mask-image: linear-gradient(to bottom,
        transparent 0%, #000 25%, #000 75%, transparent 100%);
}
.memo-wheel-highlight {
    position: absolute;
    top: 80px;       /* (200-40)/2 */
    left: 0; right: 0;
    height: 40px;
    border-top: 1px solid var(--hall-accent, #e94560);
    border-bottom: 1px solid var(--hall-accent, #e94560);
    background: rgba(233, 69, 96, 0.08);
    pointer-events: none;
    z-index: 1;
}
.memo-wheel-scroll {
    position: absolute;
    inset: 0;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.memo-wheel-scroll::-webkit-scrollbar { display: none; }
.memo-wheel-item {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--text-secondary, #8a8aa0);
    scroll-snap-align: center;
    transition: color 0.15s, transform 0.15s, font-weight 0.15s;
    user-select: none;
}
.memo-wheel-item.active {
    color: var(--text-primary, #fff);
    font-weight: 700;
    font-size: 16px;
    transform: scale(1.04);
}
.memo-wheel-pad { height: 40px; }
.memo-wheel-empty { padding: 80px 16px; text-align: center; opacity: 0.6; }

/* ===== 設定入力チップ（色分け） ===== */
.memo-setting-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.memo-setting-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--border-light, #2a3a5a);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
    transition: all 0.15s;
}
.memo-setting-chip input { margin: 0; }
/* 選択時に設定色を反映 */
.memo-set-chip-6:has(input:checked) { background: #e74c3c22; border-color: #e74c3c; color: #ff7065; }
.memo-set-chip-5:has(input:checked) { background: #e67e2222; border-color: #e67e22; color: #f3963c; }
.memo-set-chip-4:has(input:checked) { background: #d4ac0d22; border-color: #d4ac0d; color: #e9c43a; }
.memo-set-chip-3:has(input:checked) { background: #27ae6022; border-color: #27ae60; color: #4cd685; }
.memo-set-chip-2:has(input:checked) { background: #16a08522; border-color: #16a085; color: #3fc9ab; }
.memo-set-chip-1:has(input:checked) { background: #2980b922; border-color: #2980b9; color: #4aa3df; }

.memo-input-actions { display: flex; gap: 10px; margin-top: 8px; }

/* ===== メモ一覧テーブル ===== */
.memo-list-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.memo-list-table th, .memo-list-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-light, #2a3a5a);
    text-align: left;
}
.memo-list-table th { opacity: 0.7; font-size: 12px; }
.memo-cell-num { font-weight: bold; text-align: center; }
.memo-cell-author { opacity: 0.7; font-size: 12px; }
.memo-del-btn { background: none; border: none; cursor: pointer; font-size: 15px; opacity: 0.7; }
.memo-del-btn:hover { opacity: 1; }
.memo-list-empty { padding: 16px; opacity: 0.6; text-align: center; }

/* ===== バッジ（メモ一覧・日別タブ共通） ===== */
.memo-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}
.memo-person-badge {
    background: rgba(74, 144, 226, 0.18);
    border: 1px solid #4a90e2;
    color: #6bb0ff;
    margin-right: 4px;
}
.memo-setting-badges { display: inline-flex; gap: 3px; vertical-align: middle; }
.memo-setting-badge {
    min-width: 18px;
    justify-content: center;
    padding: 2px 6px;
    border-radius: 9px;
    color: #fff;
}
/* 設定色: 6=赤 → 1=青 */
.memo-set-6 { background: #e74c3c; }
.memo-set-5 { background: #e67e22; }
.memo-set-4 { background: #d4ac0d; }
.memo-set-3 { background: #27ae60; }
.memo-set-2 { background: #16a085; }
.memo-set-1 { background: #2980b9; }

/* 日別タブのメモ列 */
#data-table td.memo-col-cell {
    white-space: nowrap;
}
#data-table td.memo-col-cell .memo-badge { font-size: 11px; }
