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

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo,
        sans-serif;
    background-color: #f5f5f5;
    color: #2c3e50;
    max-width: 480px;
    margin: 0 auto;
}

/* ヘッダー */
.header {
    background-color: #fff;
    padding: 16px 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.header-icons {
    display: flex;
    gap: 16px;
}

.header-icons i {
    font-size: 20px;
    color: #7f8c8d;
    cursor: pointer;
}

/* フィルタータブ */
.filter-tabs {
    background-color: #fff;
    padding: 8px 20px 12px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    justify-content: center;
    border-bottom: 1px solid #e0e0e0;
}

.filter-tab {
    padding: 7px 14px;
    border-radius: 20px;
    border: none;
    background-color: #f5f5f5;
    color: #7f8c8d;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.filter-tab.active {
    background-color: #2c3e50;
    color: #fff;
}

/* タスクリスト */
.task-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.task-group {
    margin-bottom: 24px;
}

.task-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.task-group-title {
    font-size: 14px;
    font-weight: 600;
    color: #e74c3c;
}


/* 日付グループヘッダー（グループ化表示用） */
.date-group-header {
    padding: 12px 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    margin-top: 8px;
}


.date-group-header:first-child {
    margin-top: 0;
}


.task-group-count {
    background-color: #e8f4ff;
    color: #3498db;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.task-item {
    background-color: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s;
}

.task-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.task-item-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.task-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.task-checkbox.priority-high {
    border-color: #e74c3c;
}

.task-checkbox.priority-medium {
    border-color: #f39c12;
}

.task-title {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.5;
}

.task-meta {
    display: flex;
    gap: 12px;
    margin-left: 36px;
    flex-wrap: wrap;
}

.task-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #7f8c8d;
}

.task-meta-item i {
    font-size: 12px;
}

.task-meta-item.priority-high {
    color: #e74c3c;
}

.task-meta-item.priority-medium {
    color: #f39c12;
}

.task-meta-item.overdue-date {
    color: #e74c3c;
}

/* 録音中バー */
.recording-bar {
    display: none;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: #fff;
    padding: 12px 20px;
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 200;
}

.recording-bar.active {
    display: flex;
}

.recording-bar-icon {
    color: #e74c3c;
    font-size: 16px;
    animation: pulse 1s infinite;
}

.recording-bar-waves {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 20px;
    margin: 0 20px;
}

.recording-bar-waves span {
    display: block;
    width: 3px;
    border-radius: 999px;
    background: #fff;
    animation: wave 0.8s ease-in-out infinite;
    transform-origin: center;
}

.recording-bar-waves span:nth-child(1) { animation-delay: 0s;    height: 6px; }
.recording-bar-waves span:nth-child(2) { animation-delay: 0.1s;  height: 12px; }
.recording-bar-waves span:nth-child(3) { animation-delay: 0.2s;  height: 18px; }
.recording-bar-waves span:nth-child(4) { animation-delay: 0.3s;  height: 12px; }
.recording-bar-waves span:nth-child(5) { animation-delay: 0.4s;  height: 6px; }

@keyframes wave {
    0%, 100% { transform: scaleY(1); opacity: 0.6; }
    50%       { transform: scaleY(1.6); opacity: 1; }
}

.recording-bar-stop {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e74c3c;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: background 0.2s;
}

.recording-bar-stop:hover {
    background: #c0392b;
}

.recording-bar-label {
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    margin-left: 8px;
}

.recording-bar.analyzing .recording-bar-icon {
    color: #f39c12;
    animation: none;
}

.recording-bar.analyzing .recording-bar-waves {
    display: none;
}

.recording-bar.analyzing .recording-bar-stop {
    display: none;
}

.recording-bar.analyzing .recording-bar-label {
    color: #f39c12;
}

/* 解析中オーバーレイ（全操作をブロック） */
.analyzing-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(0, 0, 0, 0.15);
    cursor: not-allowed;
}

.analyzing-overlay.active {
    display: block;
}

/* 右下フローティングボタン群 */
.floating-btns {
    position: fixed;
    bottom: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 100;
}

.text-input-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s;
}

.text-input-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.5);
}

.voice-input-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #fff;
    color: #e74c3c;
    border: 2px solid #e74c3c;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
}

/* WhisperボタンはWeb Speech APIボタンと色で区別 */
.whisper-input-btn {
    color: #2980b9;
    border-color: #2980b9;
}

.whisper-input-btn:hover {
    box-shadow: 0 6px 16px rgba(41, 128, 185, 0.3);
}

.whisper-input-btn:disabled {
    color: #bbb;
    border-color: #ddd;
}

.voice-input-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.3);
}

.voice-input-btn:disabled {
    background-color: #f0f0f0;
    color: #bbb;
    border-color: #ddd;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ボトムナビ */
.bottom-nav {
    background-color: #fff;
    padding: 12px 0;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 8px 24px;
    color: #95a5a6;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item.active {
    color: #e74c3c;
}

.nav-item i {
    font-size: 20px;
}

.nav-item span {
    font-size: 12px;
    font-weight: 500;
}

/* モーダル共通スタイル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #fff;
    width: 100%;
    max-width: 480px;
    border-radius: 24px 24px 0 0;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* 入力モーダル */
.input-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.input-modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #7f8c8d;
    cursor: pointer;
}

.input-area {
    margin-bottom: 24px;
}

.input-area textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
}

.input-area textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    background-color: #c0392b;
}

.submit-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* タスク詳細モーダル */
.task-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.task-detail-header .close-btn {
    font-size: 24px;
}

.delete-btn {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 20px;
    cursor: pointer;
}

.task-detail-content {
    margin-bottom: 24px;
}

.task-detail-title {
    margin-bottom: 12px;
}

.detail-field {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.detail-field:hover {
    background-color: #ecf0f1;
}

.detail-field-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.detail-field-label i {
    color: #e74c3c;
    font-size: 14px;
}

.detail-field-value {
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
}

.detail-field-input {
    width: 100%;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    border: none;
    background: transparent;
    outline: none;
    padding: 0;
    margin-top: 2px;
    font-family: inherit;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.task-detail-title.detail-field {
    cursor: default;
}

.task-detail-title.detail-field:hover {
    background-color: #f8f9fa;
}

.priority-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.priority-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.priority-btn.active.high {
    background-color: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
}

.priority-btn.active.medium {
    background-color: #f39c12;
    border-color: #f39c12;
    color: #fff;
}

.priority-btn.active.low {
    background-color: #95a5a6;
    border-color: #95a5a6;
    color: #fff;
}

.task-detail-actions {
    display: flex;
    gap: 12px;
}

.complete-btn {
    flex: 1;
    padding: 16px;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.complete-btn.hidden {
    display: none;
}

.complete-btn:hover {
    background-color: #f8f9fa;
}

.save-btn {
    flex: 2;
    padding: 16px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.save-btn:hover {
    background-color: #c0392b;
}

.uncomplete-btn {
    flex: 1;
    padding: 16px;
    background-color: #fff;
    border: 2px solid #27ae60;
    border-radius: 12px;
    color: #27ae60;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.uncomplete-btn:hover {
    background-color: #f0faf4;
}

/* メンバー選択モーダル */
.member-select-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.member-select-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    background-color: #f8f9fa;
}

.search-box input:focus {
    outline: none;
    border-color: #e74c3c;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
}

.member-list {
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.member-item:hover {
    background-color: #f8f9fa;
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 18px;
}

.member-name {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
}

.member-check {
    width: 24px;
    height: 24px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-check.selected {
    background-color: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
}

.member-select-actions {
    display: flex;
    gap: 12px;
}

.clear-btn {
    flex: 1;
    padding: 16px;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.apply-btn {
    flex: 2;
    padding: 16px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* ローディング */
.loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

/* 空状態 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
}

/* グループ表示 */
.task-group {
    margin-bottom: 24px;
}

.task-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px;
}

.task-group-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.task-group-count {
    background-color: #e8f4ff;
    color: #3498db;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.task-group-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 完了済みタスク用のスタイル */
.completed-task {
    opacity: 1;
}

.completed-task .task-checkbox {
    background-color: #27ae60;
    border-color: #27ae60;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.completed-task .task-checkbox i {
    font-size: 12px;
}

.completed-task .task-title {
    color: #7f8c8d;
    text-decoration: line-through;
}

.completed-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #27ae60;
    margin-top: 8px;
    margin-bottom: 8px;
}

.completed-time {
    font-weight: 500;
}

.completed-by {
    color: #7f8c8d;
}

.completed-by-name {
    font-weight: 600;
    font-size: 13px;
    color: #27ae60;
}

.completed-task .task-item-top {
    margin-left: 36px;
}

/* チェックボックスのアニメーション */
@keyframes checkmarkAppear {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes taskCompleting {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-5px) scale(0.98);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}

.task-checkbox.completing {
    background-color: #27ae60;
    border-color: #27ae60;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-checkbox.completing i {
    font-size: 12px;
    animation: checkmarkAppear 0.3s ease-out forwards;
}

.task-item.completing {
    animation: taskCompleting 0.4s ease-out forwards;
    pointer-events: none;
}

/* 詳細モーダル内の完了済みタスクスタイル */
.task-detail-title.completed-style {
    opacity: 0.6;
}


.detail-field.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.detail-field.disabled .detail-field-value {
    color: #95a5a6;
}

/* 日付選択モーダル */
.date-select-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.date-shortcuts {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.shortcut-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.shortcut-btn i {
    font-size: 18px;
    color: #7f8c8d;
}

.shortcut-btn span {
    font-size: 12px;
    color: #2c3e50;
}

.shortcut-btn:hover {
    background-color: #f8f9fa;
}

.shortcut-btn.active {
    background-color: #fff5f5;
    border-color: #e74c3c;
}

.shortcut-btn.active i {
    color: #e74c3c;
}

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

.month-nav {
    background: none;
    border: none;
    font-size: 18px;
    color: #7f8c8d;
    cursor: pointer;
    padding: 8px;
}

.current-month {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.calendar-container {
    margin-bottom: 20px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #7f8c8d;
    padding: 8px 0;
}

.weekday.sunday {
    color: #e74c3c;
}

.weekday.saturday {
    color: #3498db;
}

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

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    color: #2c3e50;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

.calendar-day.other-month {
    color: #bdc3c7;
}

.calendar-day.today {
    font-weight: 600;
    border: 2px solid #e74c3c;
}

.calendar-day.selected {
    background-color: #e74c3c;
    color: #fff;
    font-weight: 600;
}

.calendar-day.sunday {
    color: #e74c3c;
}

.calendar-day.saturday {
    color: #3498db;
}

.calendar-day.other-month.sunday,
.calendar-day.other-month.saturday {
    color: #bdc3c7;
}

/* 時間ピッカー */
.time-picker-container {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.time-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.time-picker-header span {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.time-clear-btn {
    background: none;
    border: none;
    color: #7f8c8d;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.time-clear-btn:hover {
    color: #e74c3c;
}

.time-picker-selectors {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.time-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.time-selector label {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 500;
}

.time-select {
    width: 80px;
    padding: 12px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background-color: #fff;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s;
}

.time-select:focus {
    outline: none;
    border-color: #e74c3c;
}

.time-separator {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 20px;
}

.date-select-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.time-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.2s;
}

.time-btn:hover {
    background-color: #f8f9fa;
}

.time-btn.active {
    background-color: #fff5f5;
    border-color: #e74c3c;
    color: #e74c3c;
}

.clear-date-btn {
    padding: 12px 20px;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-date-btn:hover {
    background-color: #f8f9fa;
}

.save-date-btn {
    padding: 12px 32px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.save-date-btn:hover {
    background-color: #c0392b;
}

/* 設定画面 */
.settings-screen {
    display: none;
    flex-direction: column;
    height: 100dvh;
    background-color: #f5f5f5;
}

.settings-screen.active {
    display: flex;
}

.settings-header {
    background-color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.settings-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.settings-content {
    flex: 1;
    padding: 20px;
    overflow: hidden;
}

.settings-section {
    background-color: #fff;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}

.settings-item {
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.settings-item:hover {
    background-color: #f8f9fa;
}

.settings-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 20px;
    color: #fff;
}

.settings-item-icon.account {
    background-color: #ff6b35;
}

.settings-item-icon.general {
    background-color: #4a90e2;
}

.settings-item-icon.notification {
    background-color: #f5a623;
}

.settings-item-icon.logout {
    background-color: #e74c3c;
}

.settings-item-content {
    flex: 1;
}

.settings-item-title {
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
}

.settings-item-subtitle {
    font-size: 14px;
    color: #7f8c8d;
}

.settings-item-arrow {
    color: #bdc3c7;
    font-size: 16px;
}

.settings-footer {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
}

.app-version {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.app-description {
    font-size: 14px;
}

/* アラートモーダル */
/* 削除確認モーダル */
.confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.confirm-modal.active {
    display: flex;
}

.confirm-modal-content {
    background-color: #fff;
    width: 100%;
    max-width: 280px;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    animation: alertSlideUp 0.25s ease-out;
}

.confirm-modal-message {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 20px;
    line-height: 1.5;
}

.confirm-modal-actions {
    display: flex;
    gap: 10px;
}

.confirm-modal-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.confirm-modal-btn.cancel {
    background-color: #f0f0f0;
    color: #7f8c8d;
}

.confirm-modal-btn.cancel:hover {
    background-color: #e0e0e0;
}

.confirm-modal-btn.delete {
    background-color: #e74c3c;
    color: #fff;
}

.confirm-modal-btn.delete:hover {
    background-color: #c0392b;
}

.alert-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.alert-modal.active {
    display: flex;
}

.alert-modal-content {
    background-color: #fff;
    width: 100%;
    max-width: 320px;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    animation: alertSlideUp 0.3s ease-out;
}

@keyframes alertSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #4a90e2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    color: #fff;
}

.alert-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.alert-message {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.5;
    margin-bottom: 24px;
}

.alert-actions {
    display: flex;
    gap: 12px;
}

.alert-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.alert-btn.cancel {
    background-color: #f0f0f0;
    color: #7f8c8d;
}

.alert-btn.cancel:hover {
    background-color: #e0e0e0;
}

.alert-btn.confirm {
    background-color: #4a90e2;
    color: #fff;
}

.alert-btn.confirm:hover {
    background-color: #357abd;
}

/* 画面切り替え */
.screen {
    display: flex;
    flex-direction: column;
    height: 100dvh;
}

.screen.hidden {
    display: none;
}

/* ========================================
   認証画面スタイル
   ======================================== */

/* 認証コンテナ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    padding: 20px;
}

.auth-content {
    width: 100%;
    max-width: 400px;
    background-color: #fff;
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ロゴエリア */
.auth-logo {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 36px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.auth-logo-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.auth-logo-subtitle {
    font-size: 14px;
    color: #7f8c8d;
}

/* フォーム */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.account-form {
    gap: 0;
}


/* フィールド */
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.account-form .auth-label {
    margin-top: 20px;
}

.auth-label i {
    color: #e74c3c;
    font-size: 14px;
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    color: #2c3e50;
    transition: all 0.3s;
}

.auth-input:focus {
    outline: none;
    border-color: #e74c3c;
    background-color: #fff5f5;
}

/* チェックボックス */
.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -8px 0;
}

.auth-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #e74c3c;
}

.auth-checkbox label {
    font-size: 14px;
    color: #2c3e50;
    cursor: pointer;
}

/* ボタン */
.auth-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.auth-btn.primary {
    background-color: #e74c3c;
    color: #fff;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.auth-btn.primary:hover {
    background-color: #c0392b;
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

.auth-btn.primary:active {
    transform: translateY(1px);
}

/* リンク */
.auth-link-container {
    text-align: center;
}

.auth-link {
    font-size: 14px;
    color: #7f8c8d;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-link:hover {
    color: #e74c3c;
}

/* 区切り線 */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 8px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e0e0e0;
}

.auth-divider span {
    position: relative;
    background-color: #fff;
    padding: 0 16px;
    font-size: 14px;
    color: #7f8c8d;
}

/* フッター */
.auth-footer {
    text-align: center;
    margin-top: 8px;
}

.auth-footer p {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.auth-link-primary {
    font-size: 16px;
    font-weight: 600;
    color: #e74c3c;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-link-primary:hover {
    color: #c0392b;
}

/* ヘッダー（戻るボタン付き） */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e50;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.2s;
}

.auth-back-btn:hover {
    background-color: #ecf0f1;
}

.auth-header-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.auth-header-spacer {
    width: 40px;
}

/* フィールドヒント */
.auth-field-hint {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: -4px;
}

.auth-input-wrapper {
    position: relative;
}

.auth-input-wrapper .auth-input {
    padding-right: 48px;
}

.password-toggle-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

.password-toggle-btn:hover {
    color: #e74c3c;
}

/* 説明文 */
.auth-description {
    text-align: center;
    margin-bottom: 24px;
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 12px;
}

.auth-description p {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.6;
    margin: 0;
}

.auth-description p + p {
    margin-top: 8px;
}

/* 成功メッセージ */
.auth-success {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 12px;
    color: #27ae60;
}

.auth-success i {
    font-size: 18px;
    flex-shrink: 0;
}

.auth-success span {
    font-size: 14px;
    line-height: 1.5;
}

/* 無効化された入力フィールド */
.auth-input-disabled {
    background-color: #f8f9fa;
    color: #7f8c8d;
    cursor: not-allowed;
}

/* アカウント設定セクション */
.account-section {
    margin-bottom: 32px;
}

.account-section:last-of-type {
    border-bottom: none;
    margin-bottom: 24px;
}

.account-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.account-section-description {
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.5;
}

/* エラーメッセージ（複数行対応） */
.auth-error-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-error-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
    .auth-content {
        padding: 32px 24px;
    }

    .auth-logo-icon {
        width: 64px;
        height: 64px;
        font-size: 28px;
    }

    .auth-logo-title {
        font-size: 24px;
    }
}

/* エラーメッセージ */
.auth-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: #fee;
    border: 1px solid #fcc;
    border-radius: 12px;
    color: #c0392b;
}

.auth-error i {
    font-size: 18px;
    flex-shrink: 0;
}

.auth-error span {
    font-size: 14px;
    line-height: 1.5;
}


/* ─── 絞り込みフィルター ─── */
.header {
    padding: 16px 20px 0;
}

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

.search-filter-toggle-btn {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    color: #7f8c8d;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-family: inherit;
}

.search-filter-toggle-btn.has-filter {
    border-color: #e74c3c;
    color: #e74c3c;
    background-color: #fff5f5;
}

.search-filter-toggle-btn i {
    font-size: 12px;
}

/* 検索アイコンが絞り込み中のとき赤くなる */
#searchFilterToggleBtn.has-filter {
    color: #e74c3c;
}

.search-filter-panel {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease, padding 0.3s ease;
    flex-shrink: 0;
}

.search-filter-panel.open {
    max-height: 120px;
    padding: 10px 20px;
}

.search-filter-panel-inner {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    justify-content: center;
}

.search-filter-panel-inner::-webkit-scrollbar {
    display: none;
}

.search-filter-select {
    padding: 7px 28px 7px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    color: #2c3e50;
    background-color: #f8f9fa;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2395a5a6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    flex-shrink: 0;
}

.search-filter-select:focus {
    outline: none;
    border-color: #e74c3c;
}

.search-filter-select.active {
    border-color: #e74c3c;
    background-color: #fff5f5;
    color: #e74c3c;
}

.search-filter-select:disabled {
    opacity: 0.5;
    cursor: default;
}
