/* ============================================================
   Korean Calendar — Premium Desktop Design
   컨셉: 깔끔한 정보 밀도 + 강한 시각적 위계 + 프리미엄 질감
   ============================================================ */

:root {
    /* Core palette */
    --primary: #2563EB;
    --primary-light: #3B82F6;
    --primary-bg: rgba(37, 99, 235, 0.06);
    --primary-bg-strong: rgba(37, 99, 235, 0.12);

    --red: #DC2626;
    --red-bg: rgba(220, 38, 38, 0.06);
    --orange: #EA580C;
    --green: #16A34A;
    --green-bg: rgba(22, 163, 74, 0.06);
    --purple: #9333EA;
    --purple-bg: rgba(147, 51, 234, 0.06);
    --amber: #D97706;

    /* Neutral scale - 고대비 */
    --gray-950: #0C0C0D;
    --gray-800: #1E1E20;
    --gray-700: #333338;
    --gray-600: #4A4A52;
    --gray-500: #636370;
    --gray-400: #8E8E9A;
    --gray-300: #B0B0BC;
    --gray-200: #D4D4DC;
    --gray-100: #ECECF0;
    --gray-50: #F6F6F8;
    --white: #FFFFFF;

    /* Semantic */
    --bg: #F0F0F3;
    --surface: #FFFFFF;
    --surface-hover: #FAFAFE;
    --text-primary: var(--gray-950);
    --text-body: var(--gray-700);
    --text-secondary: var(--gray-500);
    --text-muted: var(--gray-400);
    --border: var(--gray-200);
    --border-light: var(--gray-100);

    /* Layout */
    --sidebar-w: 72px;
    --header-h: 64px;

    /* Radius */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 18px;

    /* Shadow */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.14);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.03);

    /* Transition */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body { height: 100%; }

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.5;
}

/* ============================================================
   APP LAYOUT — 3-column grid
   ============================================================ */
.app {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr 420px;
    height: 100vh;
    overflow: hidden;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    background: var(--gray-950);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 16px;
    z-index: 10;
}

.sidebar-logo {
    padding: 4px 0 28px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    opacity: 0.9;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    padding: 0 8px;
}

.sidebar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 4px 8px;
    border: none;
    background: transparent;
    border-radius: var(--r-md);
    cursor: pointer;
    color: var(--gray-400);
    transition: all 0.2s var(--ease);
    font-family: inherit;
    width: 100%;
}

.sidebar-btn svg { flex-shrink: 0; }

.sidebar-btn span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--gray-200);
}

.sidebar-btn.active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

.sidebar-bottom {
    margin-top: auto;
    width: 100%;
    padding: 0 8px;
}

/* ============================================================
   CALENDAR PANEL
   ============================================================ */
.calendar-panel {
    background: var(--surface);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid var(--border);
}

/* Header */
.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: var(--header-h);
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
}

.cal-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.cal-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--gray-50);
    border: 1px solid var(--border-light);
    border-radius: var(--r-sm);
    padding: 2px;
}

.cal-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-body);
    transition: all 0.15s var(--ease);
}

.cal-nav-btn:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.cal-nav-btn:active { transform: scale(0.95); }

.cal-today-btn {
    width: auto;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: var(--primary);
}

.cal-today-btn:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

/* Weekdays */
.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    flex-shrink: 0;
    background: var(--gray-50);
    border-bottom: 1px solid var(--border);
}

.cal-wd {
    text-align: center;
    padding: 8px 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cal-wd.sun { color: var(--red); }
.cal-wd.sat { color: var(--primary); }

/* Calendar Grid */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    flex: 1;
    align-content: stretch;
}

/* Day cell */
.day-cell {
    padding: 6px 7px 4px;
    cursor: pointer;
    transition: background 0.12s var(--ease);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    min-height: 0;
    overflow: hidden;
}

.day-cell:nth-child(7n) { border-right: none; }

.day-cell:hover {
    background: var(--primary-bg);
}

.day-cell.selected {
    background: var(--primary-bg-strong);
}

.day-cell.other-month {
    background: var(--gray-50);
}

.day-cell.other-month .solar-date,
.day-cell.other-month .lunar-date,
.day-cell.other-month .holiday-name,
.day-cell.other-month .anniversary-name,
.day-cell.other-month .solar-term,
.day-cell.other-month .event-dots,
.day-cell.other-month .cell-events {
    opacity: 0.3;
}

/* Solar date - 날짜 숫자 */
.solar-date {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    line-height: 1;
    transition: all 0.12s var(--ease);
}

.day-cell.sunday .solar-date { color: var(--red); }
.day-cell.saturday .solar-date { color: var(--primary); }
.day-cell.holiday .solar-date { color: var(--red); font-weight: 700; }

/* Today */
.day-cell.today .solar-date {
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
}

.day-cell.today.sunday .solar-date,
.day-cell.today.holiday .solar-date {
    background: var(--red);
    color: var(--white);
}

.day-cell.today.saturday .solar-date {
    background: var(--primary);
    color: var(--white);
}

/* Lunar date */
.lunar-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
    line-height: 1;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

/* Holiday / Anniversary / Solar term */
.holiday-name {
    font-size: 11px;
    color: var(--red);
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    margin-top: 2px;
}

.anniversary-name {
    font-size: 11px;
    color: var(--purple);
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    margin-top: 1px;
}

.solar-term {
    font-size: 11px;
    color: var(--green);
    font-weight: 600;
    line-height: 1.2;
    margin-top: 1px;
}

/* Event preview in cell */
.cell-events {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: auto;
    width: 100%;
    padding-top: 2px;
}

.cell-event-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-body);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-event-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cell-event-more {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    padding: 1px 4px;
}

/* Legacy dots (fallback) */
.event-dots {
    display: flex;
    gap: 3px;
    margin-top: auto;
    padding-top: 2px;
}

.event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

/* ============================================================
   DETAIL PANEL
   ============================================================ */
.detail-panel {
    background: var(--gray-50);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: var(--header-h);
    flex-shrink: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.detail-date-info h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.detail-lunar {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 1px;
    font-weight: 400;
}

.detail-add-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--r-sm);
    border: none;
    background: var(--primary);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease);
}

.detail-add-btn:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.detail-add-btn:active { transform: translateY(0); }

/* Body */
.detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

/* Empty state */
.detail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    color: var(--text-muted);
    text-align: center;
    gap: 12px;
}

.detail-empty p {
    font-size: 14px;
    line-height: 1.6;
}

/* Section label */
.section-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 16px 0 8px;
}

.section-label:first-child { padding-top: 0; }

/* Holiday / Anniversary / Term bars */
.detail-holiday-bar,
.detail-anniversary-bar,
.detail-term-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--r-md);
    margin-bottom: 8px;
}

.detail-holiday-bar {
    background: var(--red-bg);
    border: 1px solid rgba(220, 38, 38, 0.1);
}

.detail-anniversary-bar {
    background: var(--purple-bg);
    border: 1px solid rgba(147, 51, 234, 0.1);
}

.detail-term-bar {
    background: var(--green-bg);
    border: 1px solid rgba(22, 163, 74, 0.1);
}

.detail-holiday-bar .bar-dot,
.detail-anniversary-bar .bar-dot,
.detail-term-bar .bar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.detail-holiday-bar .bar-dot { background: var(--red); }
.detail-anniversary-bar .bar-dot { background: var(--purple); }
.detail-term-bar .bar-dot { background: var(--green); }

.detail-holiday-bar .bar-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--red);
}

.detail-anniversary-bar .bar-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--purple);
}

.detail-term-bar .bar-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--green);
}

/* Event card */
.event-card {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border-radius: var(--r-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.18s var(--ease);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--primary);
}

.event-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    border-color: var(--border);
    border-left-width: 4px;
}

.event-card:active {
    transform: translateY(0);
    box-shadow: var(--shadow-card);
}

.event-card .card-body {
    flex: 1;
    min-width: 0;
}

.event-card .card-type {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.event-card .card-type.memo { color: var(--primary); }
.event-card .card-type.todo { color: var(--green); }
.event-card .card-type.anniversary { color: var(--purple); }

.event-card .card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

.event-card .card-title.done {
    text-decoration: line-through;
    color: var(--text-muted);
}

.event-card .card-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 4px;
    word-break: break-word;
}

.event-card .card-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.card-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s var(--ease);
    color: var(--text-muted);
}

.card-action-btn:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.card-action-btn.check-btn {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    color: transparent;
    transition: all 0.2s var(--ease);
}

.card-action-btn.check-btn:hover {
    border-color: var(--green);
    background: transparent;
}

.card-action-btn.check-btn.checked {
    background: var(--green);
    border-color: var(--green);
    color: var(--white);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s var(--ease);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--surface);
    border-radius: var(--r-xl);
    width: 440px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s var(--ease);
}

@keyframes modalIn {
    from { transform: scale(0.96) translateY(8px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.15s var(--ease);
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--text-primary);
}

.modal-body { padding: 20px 24px; }

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--surface);
    transition: all 0.2s var(--ease);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder { color: var(--text-muted); }

textarea.form-input {
    resize: vertical;
    min-height: 72px;
    line-height: 1.5;
}

/* Type selector */
.type-selector {
    display: flex;
    gap: 0;
    background: var(--gray-100);
    border-radius: var(--r-sm);
    padding: 3px;
}

.type-btn {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s var(--ease);
    font-family: inherit;
}

.type-btn:hover { color: var(--text-primary); }

.type-btn.active {
    background: var(--surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* Color picker */
.color-picker {
    display: flex;
    gap: 8px;
}

.color-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.15s var(--ease);
}

.color-btn:hover { transform: scale(1.12); }

.color-btn.active {
    border-color: var(--gray-800);
    transform: scale(1.12);
    box-shadow: 0 0 0 2px var(--surface);
}

/* Toggle switch */
.toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 26px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--gray-300);
    border-radius: 13px;
    transition: all 0.25s var(--ease);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 2px;
    top: 2px;
    background: var(--white);
    border-radius: 50%;
    transition: all 0.25s var(--ease);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-switch input:checked + .toggle-slider { background: var(--green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Modal footer */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 24px 24px;
}

.btn {
    padding: 9px 20px;
    border: none;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s var(--ease);
    font-family: inherit;
}

.btn:active { transform: scale(0.97); }

.btn-secondary {
    background: var(--gray-100);
    color: var(--text-primary);
}
.btn-secondary:hover { background: var(--gray-200); }

.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover { background: #1D4ED8; }

.btn-danger {
    background: var(--red-bg);
    color: var(--red);
    margin-right: auto;
}
.btn-danger:hover { background: rgba(220, 38, 38, 0.12); }

/* ============================================================
   LOADING
   ============================================================ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.35s var(--ease);
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   LIST VIEW
   ============================================================ */
.list-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.list-view-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.list-view-table {
    display: flex;
    flex-direction: column;
}

.list-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background 0.12s var(--ease);
    border-bottom: 1px solid var(--border-light);
}

.list-row:last-child { border-bottom: none; }

.list-row:not(.list-row-head):hover {
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.list-row-head {
    cursor: default;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 12px;
    border-bottom: 2px solid var(--border-light);
}

.list-cell-check { width: 28px; flex-shrink: 0; }
.list-cell-date { width: 56px; flex-shrink: 0; font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.list-cell-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.list-cell-title.done { text-decoration: line-through; color: var(--text-muted); }
.list-cell-tag { width: 48px; flex-shrink: 0; font-size: 11px; font-weight: 600; color: var(--purple); }
.list-cell-actions { display: flex; gap: 4px; flex-shrink: 0; }

.list-color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.list-check-btn {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.15s var(--ease);
}

.list-check-btn:hover { border-color: var(--green); }
.list-check-btn.checked { background: var(--green); border-color: var(--green); color: var(--white); }

.list-edit-btn, .list-delete-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: var(--r-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.15s var(--ease);
}

.list-edit-btn:hover { background: var(--primary-bg); color: var(--primary); }
.list-delete-btn:hover { background: var(--red-bg); color: var(--red); }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1280px) {
    .app {
        grid-template-columns: var(--sidebar-w) 1fr 360px;
    }
}

@media (max-width: 1100px) {
    .app {
        grid-template-columns: var(--sidebar-w) 1fr 320px;
    }

    .day-cell { padding: 4px 5px 3px; }
    .solar-date { font-size: 14px; width: 26px; height: 26px; }
    .lunar-date { font-size: 10px; }
    .holiday-name, .anniversary-name, .solar-term { font-size: 10px; }
}

@media (max-width: 960px) {
    .app {
        grid-template-columns: var(--sidebar-w) 1fr;
        grid-template-rows: 1fr 1fr;
    }

    .sidebar { grid-row: 1 / -1; }

    .calendar-panel {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 640px) {
    :root { --sidebar-w: 52px; }
    .sidebar-btn span { display: none; }
    .sidebar-btn { padding: 10px 4px; }
    .cal-header h1 { font-size: 18px; }
    .solar-date { font-size: 13px; width: 24px; height: 24px; }
    .lunar-date { font-size: 9px; }
    .holiday-name, .anniversary-name, .solar-term { font-size: 9px; }
    .day-cell { padding: 3px 4px 2px; }
}
