@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

* {
    box-sizing: border-box;
}

:root {
    /* Primary Colors */
    --primary-color: #E60012;
    --secondary-color: #4FAA00;

    /* Text Colors */
    --text-dark: #222222;
    --text-gray: #666666;

    /* Background Colors */
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
}

html, body {
    overflow-x: hidden;
    overscroll-behavior-x: none;
    width: 100%;
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

body {
    background-color: #ffffff;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    padding-top: max(32px, env(safe-area-inset-top, 32px)) !important;
}

.calendar-wrapper {
    background: #ffffff;
    border-radius: 0;
    box-shadow: none;
    padding: 10px 15px;
    width: 100%;
    max-width: 1200px;
    touch-action: pan-y;
    overflow-x: hidden;
    box-sizing: border-box;
}

.calendar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px 16px;
    border-bottom: 1px solid #e5e8eb;
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
    box-sizing: border-box;
    position: relative;
    gap: 12px;
}

.title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    padding: 4px 0;
}

.calendar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    text-align: center;
    white-space: nowrap;
    letter-spacing: -0.4px;
}

.calendar-header h2.title-month {
    font-size: 1.25rem;
    font-weight: 700;
}

.calendar-header h2.title-week {
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.calendar-header h2.title-day {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    color: #475569;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.nav-btn:hover {
    background-color: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.nav-btn:active {
    transform: scale(0.92);
}

.calendar-body {
    padding: 10px 0 0 0;
    touch-action: pan-y;
    background-color: #ffffff;
}

.weeks {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-gap: 1px;
    background-color: #e5e8eb;
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid #e5e8eb;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.weeks li {
    font-weight: 700;
    text-align: center;
    padding: 8px 0;
    background-color: #ffffff;
    color: #334155;
    font-size: 0.95rem;
}

/* Sunday Red */
.weeks li:first-child {
    color: #e74c3c;
}

/* Saturday Blue */
.weeks li:last-child {
    color: #2563eb;
}

.weeks li.active-weekday {
    background-color: #2c3e50;
    color: #ffffff !important;
    border-radius: 6px;
    padding: 6px 0;
    font-weight: 800;
}

.weeks li:first-child.active-weekday {
    background-color: #e74c3c;
    color: #ffffff !important;
}

.weeks li:last-child.active-weekday {
    background-color: #2563eb;
    color: #ffffff !important;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-gap: 1px;
    background-color: #e5e8eb;
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #e5e8eb;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.days li {
    min-height: 110px;
    background-color: #ffffff;
    padding: 4px 6px;
    cursor: pointer;
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    transition: background-color 0.15s ease;
}

.days li:hover {
    background-color: #f8fafc;
}

.days li.inactive {
    background-color: #fafbfc;
}

.days li.inactive .day-number {
    color: #cbd5e1 !important;
}

.days li.inactive .event-item {
    opacity: 0.45;
}

.days li.active,
.days li.today {
    background-color: #fff8f8 !important;
    border: 2.5px solid #ef4444 !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 2 !important;
}

.days li.active .day-number,
.days li.today .day-number {
    color: #ef4444 !important;
    font-weight: 900 !important;
}

.days li.day-sun .day-number {
    color: #e74c3c;
}

.days li.day-sat .day-number {
    color: #2563eb;
}

.day-number {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.holiday-name {
    font-size: 0.60rem;
    color: #e74c3c;
    margin-top: 1px;
    font-weight: 600;
    text-align: left;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.events-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 3px;
    margin-bottom: auto;
    overflow: hidden;
}

.icon-wrapper {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 3px !important;
    padding-top: 2px;
    flex-wrap: nowrap;
    white-space: nowrap;
    width: 100%;
}

.icon-wrapper i {
    font-size: 0.78rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #fff;
    padding: 16px 18px;
    border-radius: 14px;
    width: 100%;
    max-width: 390px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-body-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-list-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 6px 8px;
    margin-bottom: 4px;
    max-height: 85px;
    overflow-y: auto;
    border: 1px solid #eee;
}

.modal-event-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-event-list li {
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-event-list li:hover {
    background-color: #f0f0f0;
}

.modal-event-list li.selected {
    background-color: #e6f7ff;
    border-color: #0056b3;
    color: #0056b3;
    font-weight: 700;
}

.modal-event-list li.empty-message {
    text-align: center;
    color: #888;
    background: transparent;
    border: none;
    cursor: default;
}

.btn-new {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
}

.btn-new:hover {
    background-color: #218838;
}

.modal-form {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: #000;
}

#modalDate {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-dark);
    text-align: center;
    font-weight: 700;
}

#eventTitle {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 600;
    width: 100%;
    box-sizing: border-box;
}

#eventContent {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.80rem;
    font-family: inherit;
    resize: vertical;
    min-height: 42px;
    height: 42px;
    width: 100%;
    box-sizing: border-box;
}

.modal-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 6px;
}

.btn-save {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.80rem;
}

.btn-save:hover {
    background-color: #cc0010;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.80rem;
}

.event-item {
    background: transparent;
    background-color: transparent;
    color: #1e3a8a;
    border: none;
    border-radius: 0;
    font-size: 0.80rem;
    font-weight: 600;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    line-height: 1.35;
    letter-spacing: -0.2px;
    box-sizing: border-box;
    margin-bottom: 2px;
    width: 100%;
}

.event-item.recurring {
    background: transparent;
    background-color: transparent;
    color: #dc2626;
    border: none;
}

.event-item.priority-event {
    background: transparent;
    background-color: transparent;
    color: #ea580c;
    border: none;
}

.priority-input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ffcccc;
    background-color: #fff5f5;
    color: #d9534f;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
}

.daily-stats-header {
    font-size: 0.52rem;
    color: #d9534f;
    background-color: #fff5f5;
    border: 1px solid #ffcccc;
    padding: 1px 2px;
    border-radius: 3px;
    margin-left: auto;
    font-weight: 700;
    display: block;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    letter-spacing: -0.65px;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: clip;
    box-sizing: border-box;
}

.month-stats-row {
    width: 100%;
    margin-top: 1px;
    margin-bottom: 2px;
    line-height: 1;
}

.week-stats-row {
    width: 100%;
    margin-bottom: 2px;
    line-height: 1;
}

.daily-stats-memo {
    display: block;
    width: 100%;
    font-size: 0.58rem;
    color: #4338ca;
    background-color: #eef2ff;
    border: 1px solid #c7d2fe;
    border-left: 3px solid #6366f1;
    border-radius: 3px;
    padding: 1px 3px;
    margin-top: 2px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.daily-stats-memo:hover {
    background-color: #e0e7ff;
    color: #3730a3;
}

.calendar-body.view-week .daily-stats-memo {
    font-size: 0.74rem;
    padding: 2px 4px;
    white-space: normal;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.calendar-body.view-day .daily-stats-memo {
    font-size: 0.88rem;
    padding: 5px 8px;
    margin-top: 4px;
    border-radius: 6px;
    white-space: normal;
    word-break: break-word;
    border-left-width: 4px;
}

.memo-icon {
    font-size: 0.95rem;
    color: #cccccc;
    cursor: pointer;
    margin-left: 8px;
    transition: color 0.2s ease;
}

.memo-icon:hover {
    color: #888888;
}

.memo-icon.active {
    color: #4b4dbd;
}

.diary-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.diary-modal-content {
    max-width: 500px;
}

/* ===================================================
   BIBLE WORD MODAL (오늘의 성경 말씀)
   =================================================== */
.bible-modal-content {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.28);
    width: 92%;
    max-width: 640px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 16px 18px;
    position: relative;
    border: 1px solid #e2e8f0;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.bible-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 12px;
    cursor: move;
    user-select: none;
    width: 100%;
    box-sizing: border-box;
}

.bible-header-left {
    display: flex;
    align-items: center;
    gap: 7px;
}

.bible-header-icon {
    font-size: 1.15rem;
    color: #ff9800;
}

.bible-header-title {
    margin: 0;
    font-size: 1.05rem;
    color: #0f172a;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.bible-modal-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.bible-date-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f5f9;
    padding: 5px 9px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    width: 100%;
    box-sizing: border-box;
    gap: 4px;
    overflow: hidden;
}

.bible-date-left {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 1;
}

.bible-date-icon {
    color: #64748b;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.bible-date-input {
    font-size: 0.86rem;
    font-weight: 700;
    padding: 3px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    color: #0f172a;
    outline: none;
    background: #ffffff;
    font-family: inherit;
    width: auto;
    max-width: 135px;
    flex-shrink: 1;
}

.bible-day-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    flex-shrink: 0;
}

.bible-order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: #ea580c;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 2.5px 8px;
    border-radius: 6px;
    border: 1px solid #fdba74;
    white-space: nowrap;
    letter-spacing: -0.3px;
    flex-shrink: 0;
}

.bible-verse-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.bible-verse-label {
    font-weight: 800;
    font-size: 0.88rem;
    color: #0f172a;
    white-space: nowrap;
    letter-spacing: -0.3px;
}

.bible-verse-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 7px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #0f172a;
    outline: none;
    background: #f8fafc;
    box-sizing: border-box;
    font-family: inherit;
}

.bible-verse-input:focus {
    border-color: #ff9800;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.15);
}

.bible-content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

.bible-content-textarea {
    width: 100%;
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #0f172a;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
    background: #ffffff;
    font-weight: 500;
    letter-spacing: -0.2px;
}

.bible-content-textarea:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.15);
}

.bible-modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    width: 100%;
    box-sizing: border-box;
}

.bible-action-right {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.btn-bible-delete {
    display: none;
    padding: 7px 14px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
}

.btn-bible-close {
    padding: 7px 16px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-bible-save {
    padding: 7px 20px;
    border: none;
    background: #ff9800;
    color: #ffffff;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.35);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Desktop sizing */
@media screen and (min-width: 769px) {
    .bible-modal-content {
        width: 680px;
        max-width: 90vw;
        height: 82vh;
        min-height: 600px;
        max-height: 92vh;
        resize: both;
        overflow: auto;
        padding: 20px 24px;
    }
    .bible-content-textarea {
        min-height: 380px;
    }
}

/* Mobile sizing */
@media screen and (max-width: 768px) {
    .bible-modal-content {
        width: 92% !important;
        max-width: 440px !important;
        height: 82vh !important;
        max-height: 88vh !important;
        min-height: 480px !important;
        padding: 14px 14px !important;
        resize: none !important;
        overflow-y: auto !important;
    }
    .bible-content-textarea {
        min-height: 240px !important;
    }
}

.bible-icon {
    font-size: 0.95rem;
    color: #cccccc;
    cursor: pointer;
    margin: 0;
    transition: all 0.2s ease;
}

.bible-icon:hover {
    color: #f59e0b;
    transform: scale(1.15);
}

.bible-icon.completed {
    color: #ff9800 !important;
    font-weight: bold;
}

.play-icon {
    margin-left: 5px;
    color: #cccccc;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.play-icon:hover {
    color: #888888;
}

.play-icon.completed {
    color: #4CAF50;
}

.toeic-icon {
    margin-left: 5px;
    color: #cccccc;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.toeic-icon:hover {
    color: #888888;
}

.toeic-icon.completed {
    color: #2563eb !important;
}

.history-icon {
    margin-left: 5px;
    color: #cccccc;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.3s ease, transform 0.2s ease;
}

.history-icon:hover {
    color: #7c3aed;
    transform: scale(1.15);
}

.history-icon.completed {
    color: #7c3aed !important;
    font-weight: bold;
}

.listening-icon {
    margin-left: 5px;
    color: #cccccc;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.listening-icon:hover {
    color: #888888;
}

.listening-icon.completed {
    color: #3b82f6;
}

.pattern-icon {
    margin-left: 5px;
    color: #cccccc;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.pattern-icon:hover {
    color: #888888;
}

.pattern-icon.completed {
    color: #4F46E5 !important;
    font-weight: bold;
}

.routine-icon {
    margin-left: 5px;
    color: #cccccc;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.routine-icon:hover {
    color: #FFA500;
}

.routine-icon.completed {
    color: #FFA500 !important;
    font-weight: bold;
}

.quiz-container {
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    text-align: center;
}

.quiz-question {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.quiz-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.quiz-input:focus {
    border-color: #4F46E5;
}

.quiz-btn {
    background-color: #4F46E5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
}

.quiz-btn:hover {
    background-color: #4338ca;
}

.quiz-feedback {
    margin-top: 15px;
    font-weight: bold;
    min-height: 24px;
}

.pattern-item-title {
    cursor: pointer;
    transition: color 0.2s;
}

.pattern-item-title:hover {
    color: #4338ca !important;
    text-decoration: underline;
}

.pattern-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 90%;
}

.routine-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 90%;
}

#nativeExprModal .modal-content {
    max-width: 1200px;
    width: 95%;
}

.native-expr-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.native-expr-list li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.native-expr-list li:hover {
    background-color: #f9f9f9;
}

.native-expr-list li.selected {
    background-color: #e6f7ff;
    border-left: 3px solid #0056b3;
}

.native-expr-list li .expr-date {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 2px;
}

.native-expr-list li .expr-title {
    font-weight: bold;
    color: #333;
    font-size: 0.95rem;
}

#nativeExprBtn:hover {
    background-color: #1a252f !important;
    transform: translateY(-50%) scale(1.05);
}

#memoSidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

#memoSidebar.show {
    right: 0;
}

.memo-sidebar-header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.memo-sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.memo-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.memo-content-area {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-wrap;
    color: #333;
}

/* Exercise Feature */
.exercise-icon {
    font-size: 1rem;
    color: #ccc;
    cursor: pointer;
    margin-right: 5px;
    transition: color 0.3s;
}

.exercise-icon.completed {
    color: #3498db;
    font-weight: bold;
}

.running-icon {
    font-size: 1rem;
    color: #ccc;
    cursor: pointer;
    margin-right: 5px;
    transition: color 0.3s;
}

.running-icon.completed {
    color: #e74c3c;
    font-weight: bold;
}

.running-count {
    font-size: 0.75rem;
    color: #e74c3c;
    font-weight: bold;
    margin-left: 2px;
    vertical-align: middle;
}

.home-training-icon {
    font-size: 1rem;
    color: #ccc;
    cursor: pointer;
    margin-right: 3px;
    transition: color 0.3s;
}

.home-training-icon.completed {
    color: #27ae60;
    font-weight: bold;
}

.home-training-count {
    font-size: 0.75rem;
    color: #27ae60;
    font-weight: bold;
    margin-left: 1px;
    margin-right: 4px;
    vertical-align: middle;
}

.toeic-time-count {
    display: none;
    font-size: 0.75rem;
    color: #2563eb;
    font-weight: bold;
    margin-left: 2px;
    margin-right: 4px;
    vertical-align: middle;
}

.history-time-count {
    display: none;
    font-size: 0.75rem;
    color: #7c3aed;
    font-weight: bold;
    margin-left: 2px;
    margin-right: 4px;
    vertical-align: middle;
}

/* Hide all icons and stats in Monthly view (Show ONLY schedule events) */
.calendar-body.view-month .icon-wrapper,
.calendar-body.view-month .month-stats-row,
.calendar-body.view-month .daily-stats-header,
.calendar-body.view-month .daily-empty-prompt,
.calendar-body.view-month .daily-add-more-hint {
    display: none !important;
}

/* In Weekly and Daily views: Show everything (Events, all icons, time badges, stats) */
.calendar-body.view-week .icon-wrapper,
.calendar-body.view-day .icon-wrapper {
    display: flex !important;
}

.calendar-body.view-week .toeic-time-count,
.calendar-body.view-week .history-time-count,
.calendar-body.view-day .toeic-time-count,
.calendar-body.view-day .history-time-count {
    display: inline-block !important;
}

.exercise-item-label {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1rem;
    cursor: pointer;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.2s;
}

.exercise-item-label:hover {
    background: #eef2f7;
}

.exercise-item-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #3498db;
}

.exercise-item-label span {
    color: #333;
    font-weight: 500;
}

/* View Mode & Action Buttons - Modern Segmented Control */
.view-mode-buttons {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 8px auto 4px;
    padding: 4px;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
    max-width: 100%;
}

.view-mode-btn {
    padding: 7px 18px;
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
    border-radius: 9px;
    cursor: pointer;
    font-size: 0.90rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    text-transform: uppercase;
}

.view-mode-btn:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.7);
}

.view-mode-btn.active {
    background: #ffffff;
    color: #0f172a;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #cbd5e1;
}

.view-mode-btn.noti-btn {
    background: #f8fafc;
    color: #059669;
    border: 1px solid #d1fae5;
    margin-left: 2px;
    font-size: 0.78rem;
    padding: 5px 9px;
}

.view-mode-btn.noti-btn:hover {
    background: #ecfdf5;
}

.view-mode-btn.noti-btn.off {
    color: #94a3b8;
    border-color: #e2e8f0;
    background: #f8fafc;
}

.view-mode-btn.noti-btn {
    background: #27ae60;
    color: white;
    border-color: #27ae60;
}

.view-mode-btn.noti-btn:hover {
    background: #219150;
}

.memo-empty-msg {
    color: #999;
    text-align: center;
    margin-top: 50%;
    font-style: italic;
}

/* Mobile Responsiveness */
@media screen and (max-width: 1024px) {
    body {
        padding-top: max(40px, env(safe-area-inset-top, 40px)) !important;
        overflow-x: hidden;
    }

    .calendar-wrapper {
        padding: 4px 6px 12px 6px !important;
        position: relative;
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        border-radius: 0;
        overflow-x: hidden;
    }

    .view-mode-buttons {
        display: flex;
        width: 100%;
        /* Ensure buttons are centered */
    }

    .calendar-header {
        flex-direction: column;
        gap: 12px;
        padding: 10px 5px 12px;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .calendar-body {
        padding: 10px 0 0 0;
        width: 100%;
        overflow-x: hidden;
    }

    .title-row {
        width: 100%;
        justify-content: space-between;
        /* Space out arrows and title on mobile */
        padding: 8px 4px 2px 4px !important;
        align-items: center !important;
    }

    .calendar-header h2 {
        font-size: 1.35rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
        flex: 1;
        margin: 0 !important;
    }

    .calendar-header h2.title-month {
        font-size: 1.18rem !important;
        letter-spacing: -0.4px;
    }

    .calendar-header h2.title-week {
        font-size: 0.90rem !important;
        letter-spacing: -0.4px;
    }

    .calendar-header h2.title-day {
        font-size: 0.95rem !important;
        letter-spacing: -0.6px;
    }

    .nav-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    /* Mobile Month View: Micro event chips & running icon only */
    .calendar-body.view-month ul.days li {
        min-height: 85px;
        padding: 2px 1.5px;
        font-size: 0.70rem;
    }

    .calendar-body.view-month ul.days li.active,
    .calendar-body.view-month ul.days li.today {
        border: 2.5px solid #ef4444 !important;
        background-color: #fff8f8 !important;
        padding: 1px 0.5px !important;
        position: relative !important;
        z-index: 2 !important;
    }

    .calendar-body.view-month .event-item {
        font-size: 8px !important;
        transform: scale(0.80) !important;
        transform-origin: left top !important;
        width: 125% !important;
        font-weight: 700 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        text-align: left !important;
        line-height: 1.15 !important;
        letter-spacing: -0.3px !important;
        box-sizing: border-box !important;
        margin-bottom: 0 !important;
        background: transparent !important;
        background-color: transparent !important;
        color: #1e3a8a !important;
        border: none !important;
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
        text-rendering: geometricPrecision !important;
    }

    .calendar-body.view-month .event-item.recurring {
        background: transparent !important;
        background-color: transparent !important;
        color: #dc2626 !important;
        border: none !important;
    }

    .calendar-body.view-month .event-item.priority-event {
        background: transparent !important;
        background-color: transparent !important;
        color: #ea580c !important;
        border: none !important;
    }

    /* Mobile Month View: Show ONLY schedule events (Hide all icons, stats, hints) */
    .calendar-body.view-month .icon-wrapper,
    .calendar-body.view-month .month-stats-row,
    .calendar-body.view-month .daily-stats-header,
    .calendar-body.view-month .daily-empty-prompt,
    .calendar-body.view-month .daily-add-more-hint {
        display: none !important;
    }

    /* Daily View Mode Specifics */
    .calendar-body.view-day .weeks {
        display: none !important;
    }

    .calendar-body.view-day ul.days {
        display: block;
        padding: 0;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        border: none;
    }

    .calendar-body.view-day ul.days li {
        min-height: calc(100vh - 280px);
        min-height: calc(100dvh - 280px);
        padding: 12px 14px 75px 14px !important;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        background: #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        display: flex;
        flex-direction: column;
        position: relative;
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: rgba(59, 130, 246, 0.08);
    }

    .calendar-body.view-day .day-cell-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        width: 100%;
        min-height: 100%;
    }

    /* 1. Hide Date in Card (already shown in top header) */
    .calendar-body.view-day .day-number,
    .calendar-body.view-day .mobile-day-label {
        display: none !important;
    }

    .calendar-body.view-day .day-cell-top {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 12px !important;
    }

    /* 2. Compact 1-line Priority Stats Header */
    .calendar-body.view-day .daily-stats-header {
        font-size: 0.74rem !important;
        font-weight: 700 !important;
        color: #d9534f !important;
        background-color: #fff5f5 !important;
        border: 1px solid #ffcccc !important;
        padding: 6px 8px !important;
        border-radius: 8px !important;
        width: 100% !important;
        text-align: center !important;
        white-space: nowrap !important;
        letter-spacing: -0.5px !important;
        display: block !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Events in Daily View */
    .calendar-body.view-day .events-wrapper {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 4px;
        margin-bottom: 15px;
        width: 100%;
        min-height: 120px;
    }

    .calendar-body.view-day .daily-empty-prompt {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 35px 15px;
        color: #94a3b8;
        font-size: 0.95rem;
        font-weight: 600;
        gap: 10px;
        border: 2px dashed #cbd5e1;
        border-radius: 12px;
        margin: 10px 0;
        background-color: #f8fafc;
        transition: all 0.2s ease;
        text-align: center;
    }

    .calendar-body.view-day .daily-empty-prompt i {
        font-size: 2rem;
        color: #3b82f6;
    }

    .calendar-body.view-day .daily-add-more-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 10px 14px;
        color: #2563eb;
        font-size: 0.92rem;
        font-weight: 700;
        border: 1.5px dashed #93c5fd;
        border-radius: 8px;
        background-color: #eff6ff;
        margin: 5px 0 10px 0;
        text-align: center;
        cursor: pointer;
    }

    .calendar-body.view-day .event-item {
        font-size: 1.05rem !important;
        padding: 10px 14px !important;
        border-radius: 8px !important;
        border-left: 4px solid #2563eb !important;
        line-height: 1.4 !important;
        white-space: normal !important;
        background-color: #f8fafc !important;
        color: #0f172a !important;
    }

    .calendar-body.view-day .event-item.recurring {
        background-color: #fef2f2 !important;
        color: #991b1b !important;
        border-left: 4px solid #dc2626 !important;
    }

    /* 3. Fixed Bottom Icon Bar in Daily View */
    .calendar-body.view-day .icon-wrapper {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        background: #ffffff !important;
        border-top: 1px solid #e2e8f0 !important;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08) !important;
        padding: 12px 15px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        align-items: center !important;
        z-index: 999 !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .calendar-body.view-day .icon-wrapper i {
        font-size: 1.8rem !important;
        margin: 0 !important;
        cursor: pointer;
        transition: transform 0.15s ease;
    }

    .calendar-body.view-day .icon-wrapper i:active {
        transform: scale(0.9);
    }

    .calendar-body.view-day .running-count,
    .calendar-body.view-day .home-training-count,
    .calendar-body.view-day .toeic-time-count,
    .calendar-body.view-day .history-time-count {
        font-size: 1.15rem !important;
        font-weight: 800 !important;
        margin-left: 3px !important;
    }

    /* ==========================================================================
       WEEKLY VIEW: 1 Row per Day (Total 7 Rows)
       ========================================================================== */
    .calendar-body.view-week ul.weeks {
        display: none !important;
    }

    .calendar-body.view-week ul.days {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
        padding: 6px 0 30px 0 !important;
        border: none !important;
        background: transparent !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .calendar-body.view-week ul.days li {
        width: 100% !important;
        min-height: 72px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        padding: 8px 12px !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        background: #ffffff !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
        cursor: pointer !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        transition: all 0.15s ease !important;
    }

    .calendar-body.view-week ul.days li:hover {
        background: #f8fafc !important;
        border-color: #cbd5e1 !important;
    }

    .calendar-body.view-week ul.days li.active,
    .calendar-body.view-week ul.days li.today {
        border: 2.5px solid #ef4444 !important;
        background: #fff8f8 !important;
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.22) !important;
    }

    .calendar-body.view-week .day-cell-content {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        gap: 12px !important;
        box-sizing: border-box !important;
    }

    /* Left Date Badge */
    .calendar-body.view-week .day-cell-top {
        width: 56px !important;
        flex-shrink: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        border-right: 1px solid #f1f5f9 !important;
        padding-right: 10px !important;
        margin-bottom: 0 !important;
    }

    .calendar-body.view-week .day-number {
        font-size: 1.35rem !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        line-height: 1.1 !important;
    }

    .calendar-body.view-week .mobile-day-label {
        display: block !important;
        font-size: 0.82rem !important;
        font-weight: 700 !important;
        color: #64748b !important;
        margin-top: 2px !important;
    }

    .calendar-body.view-week li.day-sun .day-number,
    .calendar-body.view-week li.day-sun .mobile-day-label {
        color: #ef4444 !important;
    }

    .calendar-body.view-week li.day-sat .day-number,
    .calendar-body.view-week li.day-sat .mobile-day-label {
        color: #2563eb !important;
    }

    /* Right Column (Top Stats -> Middle Events -> Bottom Icons) */
    .calendar-body.view-week .week-right-column {
        flex: 1 !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        padding: 0 !important;
        text-align: left !important;
    }

    .calendar-body.view-week .week-stats-row {
        width: 100% !important;
        line-height: 1 !important;
    }

    .calendar-body.view-week .daily-stats-header {
        font-size: 0.65rem !important;
        font-weight: 700 !important;
        color: #d9534f !important;
        background-color: #fff5f5 !important;
        border: 1px solid #ffcccc !important;
        padding: 1.5px 5px !important;
        border-radius: 3px !important;
        white-space: nowrap !important;
        display: inline-block !important;
        letter-spacing: -0.5px !important;
        line-height: 1.15 !important;
        margin: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .calendar-body.view-week .week-events-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 2.5px !important;
        width: 100% !important;
    }

    .calendar-body.view-week .event-item {
        font-size: 0.82rem !important;
        padding: 1px 0 !important;
        border-radius: 0 !important;
        line-height: 1.35 !important;
        white-space: normal !important;
        text-overflow: unset !important;
        overflow: visible !important;
        margin: 0 !important;
        background: transparent !important;
        background-color: transparent !important;
        color: #1e3a8a !important;
        border: none !important;
        font-weight: 600 !important;
        box-sizing: border-box !important;
        transform: none !important;
        width: 100% !important;
    }

    .calendar-body.view-week .event-item.recurring {
        background: transparent !important;
        background-color: transparent !important;
        color: #dc2626 !important;
        border: none !important;
    }

    .calendar-body.view-week .holiday-name {
        font-size: 0.76rem !important;
        color: #ef4444 !important;
        font-weight: 700 !important;
        line-height: 1.1 !important;
    }

    /* Bottom Activity Icons */
    .calendar-body.view-week .icon-wrapper {
        display: flex !important;
        align-items: center !important;
        gap: 7px !important;
        margin-top: 2px !important;
        justify-content: flex-start !important;
        line-height: 1 !important;
    }

    .calendar-body.view-week .icon-wrapper i {
        font-size: 0.88rem !important;
    }

    .calendar-body.view-week .running-count,
    .calendar-body.view-week .home-training-count,
    .calendar-body.view-week .toeic-time-count,
    .calendar-body.view-week .history-time-count {
        font-size: 0.74rem !important;
        font-weight: 700 !important;
    }

    .memo-sidebar.open {
        width: 100%;
        right: 0;
    }

    .modal-content {
        max-width: 94%;
        margin: auto;
        padding: 14px 16px;
    }

    .icon-wrapper i {
        font-size: 0.8rem;
        margin: 1px;
    }

    .events-wrapper {
        font-size: 0.7rem;
    }
}

/* ==========================================================================
   Desktop / PC Screen Optimizations (>= 1025px)
   ========================================================================== */
@media screen and (min-width: 1025px) {
    body {
        padding-top: 15px !important;
    }

    .calendar-wrapper {
        padding: 15px 25px 25px !important;
        max-width: 1200px !important;
    }

    .calendar-header {
        padding: 15px 20px 20px !important;
        gap: 15px !important;
    }

    .view-mode-buttons {
        gap: 8px !important;
        padding: 5px !important;
    }

    .view-mode-btn {
        padding: 8px 24px !important;
        font-size: 0.95rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.5px !important;
    }

    .nav-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.95rem !important;
    }

    .calendar-header h2 {
        font-size: 1.4rem !important;
    }

    .calendar-header h2.title-month {
        font-size: 1.4rem !important;
    }

    .calendar-header h2.title-week {
        font-size: 1.15rem !important;
    }

    .calendar-header h2.title-day {
        font-size: 1.25rem !important;
    }

    .weeks li {
        font-size: 0.95rem !important;
        padding: 8px 0 !important;
    }

    .days li {
        min-height: 115px !important;
        padding: 5px 7px !important;
    }

    .day-number {
        font-size: 0.92rem !important;
        font-weight: 700 !important;
    }

    .holiday-name {
        font-size: 0.70rem !important;
    }

    .month-stats-row,
    .week-stats-row {
        width: 100% !important;
        margin-top: 1px !important;
        margin-bottom: 3px !important;
        line-height: 1 !important;
    }

    .calendar-body.view-month .daily-stats-header,
    .calendar-body.view-week .daily-stats-header,
    .daily-stats-header {
        font-size: 0.52rem !important;
        font-weight: 700 !important;
        color: #d9534f !important;
        background-color: #fff5f5 !important;
        border: 1px solid #ffcccc !important;
        padding: 1.5px 1px !important;
        border-radius: 3px !important;
        white-space: nowrap !important;
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        letter-spacing: -0.65px !important;
        line-height: 1.2 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        text-overflow: clip !important;
        -webkit-font-smoothing: antialiased !important;
    }

    .calendar-body.view-month .day-cell-top {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        gap: 2px !important;
    }

    /* MONTHLY View: Show ONLY schedule events (Hide all icons, stats, hints) */
    .calendar-body.view-month .icon-wrapper,
    .calendar-body.view-month .month-stats-row,
    .calendar-body.view-month .daily-stats-header,
    .calendar-body.view-month .daily-empty-prompt,
    .calendar-body.view-month .daily-add-more-hint {
        display: none !important;
    }

    /* WEEKLY View on PC: Classic 7-Column Grid */
    .calendar-body.view-week .weeks {
        display: grid !important;
        grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    }

    .calendar-body.view-week ul.days {
        display: grid !important;
        grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
        grid-gap: 1px !important;
        border: 1px solid #e5e8eb !important;
        border-radius: 0 0 8px 8px !important;
        overflow: hidden !important;
        background-color: #e5e8eb !important;
    }

    .calendar-body.view-week ul.days li {
        min-height: 480px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding: 8px 8px !important;
        background: #ffffff !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        cursor: pointer !important;
    }

    .calendar-body.view-week ul.days li.active,
    .calendar-body.view-week ul.days li.today {
        border: 2.5px solid #ef4444 !important;
        background: #fff8f8 !important;
        position: relative !important;
        z-index: 2 !important;
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.2) !important;
    }

    .calendar-body.view-week .day-cell-content {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
    }

    .calendar-body.view-week .week-right-column {
        display: contents !important;
    }

    .calendar-body.view-week .week-events-row {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 3px !important;
        width: 100% !important;
        margin-top: 4px !important;
        margin-bottom: auto !important;
    }

    .calendar-body.view-week .event-item,
    .calendar-body.view-month .event-item {
        font-size: 0.82rem !important;
        padding: 1px 0 !important;
        border-radius: 0 !important;
        line-height: 1.35 !important;
        white-space: normal !important;
        word-break: break-all !important;
        background: transparent !important;
        background-color: transparent !important;
        border: none !important;
        color: #1e3a8a !important;
    }

    .calendar-body.view-week .event-item.recurring,
    .calendar-body.view-month .event-item.recurring {
        color: #dc2626 !important;
        background: transparent !important;
        border: none !important;
    }

    .calendar-body.view-week .event-item.priority-event,
    .calendar-body.view-month .event-item.priority-event {
        color: #ea580c !important;
        background: transparent !important;
        border: none !important;
    }

    .calendar-body.view-week .icon-wrapper {
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 5px !important;
        margin-top: auto !important;
        padding-top: 6px !important;
        width: 100% !important;
    }

    .calendar-body.view-week .icon-wrapper i {
        font-size: 0.88rem !important;
    }

    /* Hide Notification button on desktop site */
    #notiPermBtn,
    .noti-btn {
        display: none !important;
    }

    /* DAILY View on PC: 1 Day Single Centered Card */
    .calendar-body.view-day .weeks {
        display: none !important;
    }

    .calendar-body.view-day ul.days {
        display: flex !important;
        justify-content: center !important;
        align-items: flex-start !important;
        width: 100% !important;
        border: none !important;
        background: transparent !important;
        padding: 10px 0 !important;
        margin: 0 !important;
    }

    .calendar-body.view-day ul.days li {
        min-height: 520px !important;
        width: 100% !important;
        max-width: 720px !important;
        margin: 0 auto !important;
        padding: 24px 28px 24px 28px !important;
        border-radius: 14px !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
        border: 1px solid #e2e8f0 !important;
        background: #ffffff !important;
        display: flex !important;
        flex-direction: column !important;
        cursor: pointer !important;
    }

    .calendar-body.view-day .day-number,
    .calendar-body.view-day .mobile-day-label {
        display: none !important;
    }

    .calendar-body.view-day .day-cell-top {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 16px !important;
    }

    .calendar-body.view-day .daily-stats-header {
        font-size: 0.90rem !important;
        padding: 8px 16px !important;
        border-radius: 8px !important;
        background-color: #fff5f5 !important;
        border: 1px solid #ffcccc !important;
        width: 100% !important;
        text-align: center !important;
        display: block !important;
        color: #d9534f !important;
        font-weight: 700 !important;
    }

    .calendar-body.view-day .events-wrapper {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        min-height: 180px !important;
        margin-bottom: 20px !important;
    }

    .calendar-body.view-day .event-item {
        font-size: 1.15rem !important;
        padding: 6px 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        background-color: transparent !important;
        border: none !important;
        color: #1e3a8a !important;
        font-weight: 600 !important;
        white-space: normal !important;
        word-break: break-all !important;
    }

    .calendar-body.view-day .icon-wrapper {
        position: static !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
        padding-top: 14px !important;
        border-top: 1px solid #f1f5f9 !important;
        margin-top: auto !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .calendar-body.view-day .icon-wrapper i {
        font-size: 1.3rem !important;
    }

    .calendar-body.view-day .running-count,
    .calendar-body.view-day .home-training-count,
    .calendar-body.view-day .toeic-time-count,
    .calendar-body.view-day .history-time-count {
        font-size: 1.0rem !important;
        font-weight: 800 !important;
    }

    /* Hide Voice Control on PC / Desktop Web */
    #voiceControlFab,
    .voice-fab,
    #voiceControlOverlay,
    .voice-overlay,
    #voiceHelpModal {
        display: none !important;
    }
}

/* ==========================================================================
   HEALTH REPORT MODAL & PRINT STYLES
   ========================================================================== */

.view-mode-btn.health-report-btn {
    background: #0284c7;
    color: #ffffff;
    border: 1px solid #0284c7;
    font-size: 0.78rem;
    padding: 5px 10px;
    margin-left: 2px;
}

.view-mode-btn.health-report-btn:hover {
    background: #0369a1;
}

.view-mode-btn.apk-download-btn {
    background: #4f46e5 !important;
    color: #ffffff !important;
    border: 1px solid #4f46e5 !important;
    font-size: 0.78rem !important;
    padding: 5px 10px !important;
    margin-left: 2px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    border-radius: 6px !important;
}

.view-mode-btn.apk-download-btn:hover {
    background: #4338ca !important;
}

/* Smartphone and Mobile: Only show DAILY, WEEKLY, MONTHLY buttons */
@media screen and (max-width: 1024px) {
    #healthReportBtn,
    .health-report-btn,
    #downloadApkBtn,
    .apk-download-btn,
    #notiPermBtn,
    .noti-btn {
        display: none !important;
    }
}

.health-report-modal-content {
    max-width: 840px !important;
    width: 95% !important;
    padding: 20px 24px !important;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    max-height: 92vh;
    overflow-y: auto;
}

.health-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.health-report-close-btn {
    background: none;
    border: none;
    font-size: 1.7rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.health-report-close-btn:hover {
    color: #0f172a;
}

.health-report-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.date-range-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.date-input-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.date-input-wrap input[type="date"] {
    padding: 5px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
}

.range-separator {
    font-weight: 700;
    color: #94a3b8;
}

.btn-report-search {
    padding: 6px 14px;
    background: #0ea5e9;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s ease;
}

.btn-report-search:hover {
    background: #0284c7;
}

.btn-report-print {
    padding: 7px 16px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
    transition: background 0.2s ease;
}

.btn-report-print:hover {
    background: #1d4ed8;
}

/* Document Area (On-Screen & Print) */
.health-report-print-area {
    background: #ffffff;
    padding: 6px 4px;
}

.report-doc-header {
    text-align: center;
    margin-bottom: 14px;
}

.report-doc-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
}

.report-doc-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.86rem;
    color: #64748b;
    padding: 0 4px;
}

.report-table-wrapper {
    overflow-x: auto;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.health-report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: center;
}

.health-report-table th, .health-report-table td {
    padding: 9px 8px;
    border: 1px solid #e2e8f0;
    vertical-align: middle;
}

.health-report-table thead th {
    background: #f1f5f9;
    color: #1e293b;
    font-weight: 700;
    border-bottom: 2px solid #cbd5e1;
}

.health-report-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.health-report-table tbody tr:hover {
    background: #f1f5f9;
}

.health-report-table tfoot th {
    background: #e2e8f0;
    color: #0f172a;
    font-weight: 800;
    border-top: 2px solid #94a3b8;
}

.remark-cell {
    text-align: left !important;
    padding: 4px 6px !important;
}

.health-remark-input {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid transparent;
    background: transparent;
    font-family: inherit;
    font-size: 0.84rem;
    color: #1e293b;
    border-radius: 4px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.health-remark-input:hover, .health-remark-input:focus {
    border-color: #cbd5e1;
    background: #ffffff;
}

.report-doc-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 10px;
    padding: 0 4px;
}

/* PRINT MEDIA QUERY */
@media print {
    @page {
        size: A4 portrait;
        margin: 15mm 12mm;
    }

    body {
        background: white !important;
        color: black !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body > *:not(#healthReportModal) {
        display: none !important;
    }

    #healthReportModal {
        display: block !important;
        position: static !important;
        width: 100% !important;
        height: auto !important;
        background: white !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: 99999 !important;
    }

    .health-report-modal-content {
        max-width: 100% !important;
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    .no-print {
        display: none !important;
    }

    .health-report-table {
        border-collapse: collapse !important;
        width: 100% !important;
        font-size: 10pt !important;
    }

    .health-report-table th, .health-report-table td {
        border: 1px solid #333333 !important;
        padding: 7px 5px !important;
        color: #000000 !important;
    }

    .health-report-table thead th {
        background-color: #f0f0f0 !important;
        font-weight: 700 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .health-report-table tfoot th {
        background-color: #f0f0f0 !important;
        font-weight: 700 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .health-remark-input {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        font-size: 9.5pt !important;
        color: #000000 !important;
    }

    .health-remark-input::placeholder {
        color: transparent !important;
        opacity: 0 !important;
        display: none !important;
    }
}