.index2-wrap {
    width: 100%;
    padding: 0;
}

.index2-content-container {
    padding: 20px;
}

.index2-date-row {
    display: none;
}

.index2-date-btn-pc {
    border: none;
    background: transparent;
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.2px;
    cursor: pointer;
    margin-bottom: 10px;
}

.index2-date-btn-pc i {
    font-size: 14px;
    color: #64748b;
    transform: translateY(1px);
}

.index2-week-strip {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 14px 10px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    overscroll-behavior-x: contain;
}

.index2-week-strip::before,
.index2-week-strip::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 28px;
    pointer-events: none;
    opacity: 0.18;
    transition: opacity 140ms ease;
    z-index: 2;
}

.index2-week-strip::before {
    left: 0;
    background: linear-gradient(90deg, rgba(64, 108, 180, 0.2) 0%, rgba(64, 108, 180, 0) 100%);
}

.index2-week-strip::after {
    right: 0;
    background: linear-gradient(270deg, rgba(64, 108, 180, 0.2) 0%, rgba(64, 108, 180, 0) 100%);
}

.index2-week-strip.hint-prev::before {
    opacity: 0.6;
}

.index2-week-strip.hint-prev::after {
    opacity: 0.08;
}

.index2-week-strip.hint-next::after {
    opacity: 0.6;
}

.index2-week-strip.hint-next::before {
    opacity: 0.08;
}

.week-grid {
    overflow: hidden;
    text-align: center;
    position: relative;
}

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

.week-weekday-fixed {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 700;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.week-dates-viewport {
    overflow: hidden;
}

.week-track {
    display: flex;
    width: 300%;
    transform: translateX(calc(-33.3333% + var(--week-drag-x, 0px)));
    transition: transform 180ms ease, opacity 180ms ease;
    will-change: transform;
}

.week-page {
    width: 33.3333%;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
}

.week-grid.dragging {
    cursor: grabbing;
}

.week-grid.dragging .week-track {
    transition: none;
}

.week-grid.swipe-commit-left .week-track {
    animation: weekSwipeCommitLeft 220ms ease;
}

.week-grid.swipe-commit-right .week-track {
    animation: weekSwipeCommitRight 220ms ease;
}

@keyframes weekSwipeCommitLeft {
    0% { transform: translateX(calc(-33.3333% + 0px)); opacity: 0.96; }
    35% { transform: translateX(calc(-33.3333% - 28px)); opacity: 0.88; }
    100% { transform: translateX(calc(-33.3333% + 0px)); opacity: 1; }
}

@keyframes weekSwipeCommitRight {
    0% { transform: translateX(calc(-33.3333% + 0px)); opacity: 0.96; }
    35% { transform: translateX(calc(-33.3333% + 28px)); opacity: 0.88; }
    100% { transform: translateX(calc(-33.3333% + 0px)); opacity: 1; }
}

.week-cell {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 3px 0 8px;
    cursor: pointer;
}

.week-date-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.week-score-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.week-date {
    position: relative;
    z-index: 1;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 15px;
    color: #334155;
    font-weight: 400;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.week-cell.is-today .week-date {
    background: #f1f5f9;
    color: #64748b;
}

.week-cell.is-selected .week-date {
    background: #eff6ff;
    color: #406cb4;
    font-weight: 700;
}

.week-cell.is-selected .week-score-ring circle:first-of-type {
    stroke: #dbeafe;
}

.diet-trend-section {
    margin: 0 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
}

.drug-trend-section {
    margin: 12px 14px 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
}

.drug-trend-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.drug-trend-title {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
}

.drug-trend-sub {
    font-size: 12px;
    color: #64748b;
}

.drug-swiper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.drug-swiper::-webkit-scrollbar {
    display: none;
}

.drug-card {
    flex: 0 0 86%;
    scroll-snap-align: start;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
    cursor: pointer;
}

.drug-card-top {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.drug-pet-photo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    flex-shrink: 0;
}

.drug-card-meta {
    min-width: 0;
}

.drug-pet-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.drug-summary-text {
    font-size: 12px;
    color: #64748b;
    line-height: 1.35;
}

.drug-badge-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.drug-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    border: 1px solid transparent;
}

.drug-badge.tone-green {
    background: #ecfdf3;
    color: #2f7a56;
    border-color: #c8f2db;
}

.drug-badge.tone-gray {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.drug-badge.tone-blue {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.drug-badge.tone-purple {
    background: #faf5ff;
    color: #7c3aed;
    border-color: #e9d5ff;
}

.drug-empty {
    width: 100%;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 10px 0;
}

.diet-trend-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.diet-trend-title {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
}

.diet-trend-title-link {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
}

.diet-trend-sub {
    font-size: 13px;
    color: #64748b;
}

.diet-swiper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@media (hover: hover) and (pointer: fine) {
    .diet-swiper {
        cursor: grab;
    }

    .diet-swiper.dragging {
        cursor: grabbing;
        user-select: none;
    }
}

.diet-swiper::-webkit-scrollbar {
    display: none;
}

.diet-swiper.is-loading {
    min-height: 120px;
    align-items: center;
    justify-content: center;
}

.diet-trend-loading,
.diet-trend-empty,
.diet-trend-error {
    flex: 1 1 100%;
    text-align: center;
    font-size: 13px;
    color: #64748b;
    padding: 24px 12px;
}

/* 홈 — 반려동물 미등록 Empty State */
.home-no-pet-empty {
    text-align: center;
    padding: 8px 16px 20px;
}

.home-no-pet-empty--page {
    margin: 4px 0 8px;
}

.home-no-pet-empty__art {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    max-width: 320px;
    min-height: 200px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f8f7ff 0%, #f1f5f9 55%, #eef2ff 100%);
}

.home-no-pet-empty__img {
    display: block;
    width: 100%;
    max-width: 280px;
    height: auto;
    aspect-ratio: 280 / 220;
    object-fit: contain;
    margin: 0 auto;
}

.home-no-pet-empty__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.35px;
    color: #0f172a;
    line-height: 1.35;
}

.home-no-pet-empty__lead {
    margin: 0 auto 20px;
    max-width: 300px;
    font-size: 13px;
    line-height: 1.6;
    font-weight: 500;
    color: #64748b;
}

.home-no-pet-empty__actions {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.home-dash__diet-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 2px 8px;
    text-decoration: none;
    color: inherit;
}

.home-dash__diet-link-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.3px;
}

.home-dash__diet-link .fa-chevron-right {
    font-size: 12px;
    color: #94a3b8;
}

/* JS 폴백(페이지 배너 없을 때) — 구 클래스 호환 */
.home-no-pet-cta--inline {
    flex: 1 1 100%;
    margin: 4px 0;
}

.diet-trend-retry-btn {
    margin-top: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
}

.diet-card {
    flex: 0 0 88%;
    scroll-snap-align: start;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.diet-card-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.diet-card-pet-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.diet-card-disease-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.diet-disease-chip {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #406cb4;
    font-size: 10px;
    font-weight: 700;
}

.diet-main-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.diet-pet-photo-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    background: #eef2f7;
    margin-bottom: 0;
}

.diet-pet-photo {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    object-position: center center;
    border: none;
    background: #f1f5f9;
    image-rendering: auto;
    image-rendering: -webkit-optimize-contrast;
}

.diet-score-panel {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.diet-score-donut-wrap {
    position: relative;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

.diet-score-donut-svg {
    width: 100%;
    height: 100%;
}

.diet-score-donut-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.diet-score-label {
    font-size: 9px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 1px;
    margin-top: 2px;
}

.diet-score-number {
    font-size: 24px;
    font-weight: 900;
    color: #1e293b;
}

.diet-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
}

.diet-kcal-block {
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px;
}

.diet-kcal-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.diet-kcal-line {
    font-size: 13px;
    color: #475569;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
}

.diet-kcal-line strong {
    color: #1e293b;
    font-size: 16px;
    font-weight: 700;
}

.diet-kpi-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 5px;
}

.diet-kcal-rate {
    color: #406cb4;
    font-size: 12px;
    font-weight: 700;
}

.diet-kcal-bar {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.diet-kcal-fill {
    height: 100%;
    border-radius: 999px;
    background: #406cb4;
}

.diet-comment-line {
    position: relative;
    font-size: 13px;
    color: #4b5563;
    margin: 0;
    margin-top: 8px;
    line-height: 1.45;
    background: #f5f7fb;
    border: 0;
    border-radius: 14px;
    padding: 11px 12px;
    display: block;
    overflow: visible;
}

.diet-comment-line::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 10px solid #f5f7fb;
}

.diet-comment-line::after {
    content: none;
}

.diet-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 0;
}

.diet-status-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 0 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    border: 1px solid transparent;
}

.diet-status-card.tone-green {
    background: #ecfdf3;
    color: #2f7a56;
    border-color: #c8f2db;
}

.diet-status-card.tone-amber {
    background: #fff7e8;
    color: #9a6a2f;
    border-color: #fde7bf;
}

.diet-status-card.tone-red {
    background: #fff1f2;
    color: #b2555f;
    border-color: #f8cfd4;
}

.diet-status-card.tone-gray {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.index2-dim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    z-index: 9400;
}

.index2-dim.open {
    display: block;
}

.index2-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9500;
    height: 90vh;
    background: #fff;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -16px 36px rgba(15, 23, 42, 0.18);
    transform: translateY(100%);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.index2-sheet.open {
    transform: translateY(0);
}

.sheet-handle {
    width: 52px;
    height: 5px;
    border-radius: 999px;
    background: #cbd5e1;
    margin: 10px auto 8px;
}

.sheet-head {
    padding: 0 16px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #eef2f7;
}

.sheet-month-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.sheet-month-btn {
    border: none;
    background: #f1f5f9;
    color: #475569;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.sheet-month-btn:hover {
    background: #e2e8f0;
}

.sheet-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.2px;
    min-width: 88px;
    text-align: center;
}

.sheet-today-btn {
    border: none;
    background: #f1f5f9;
    color: #334155;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.sheet-tabs {
    padding: 10px 16px 0;
    display: flex;
    gap: 18px;
    overflow-x: auto;
    border-bottom: 1px solid #eef2f7;
}

.sheet-tab-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 0 10px;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.sheet-tab-btn.active {
    color: #406cb4;
    border-bottom-color: #406cb4;
}

.sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px 18px;
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}

.calendar-weekdays {
    margin-bottom: 10px;
}

.calendar-weekdays div {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 700;
    padding: 8px 0;
}

.calendar-grid {
    gap: 4px;
}

.calendar-cell {
    border: none;
    background: transparent;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #334155;
    font-weight: 400;
    border-radius: 0;
    cursor: pointer;
    padding: 2px 0;
}

.calendar-date-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-date-num {
    position: relative;
    z-index: 1;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 15px;
    color: #334155;
    font-weight: 400;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.calendar-cell.is-today .calendar-date-num {
    background: #f1f5f9;
    color: #64748b;
}

.calendar-cell.selected .calendar-date-num {
    background: #eff6ff;
    color: #406cb4;
    font-weight: 700;
}

.calendar-cell.selected .week-score-ring circle:first-of-type {
    stroke: #dbeafe;
}

.calendar-cell.muted {
    color: #cbd5e1;
}

.calendar-cell.selected {
    background: transparent;
}

.calendar-legend {
    margin-top: 18px;
    border-top: 1px solid #eef2f7;
    padding-top: 12px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #64748b;
}

.calendar-legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

@media (min-width: 992px) {
    .index2-wrap {
        padding: 0;
    }

    .index2-week-strip {
        border: 1px solid #e2e8f0;
        border-radius: 20px;
        padding: 14px 18px 12px;
        margin-bottom: 16px;
    }

    .index2-date-row {
        display: block;
    }

    .diet-trend-section {
        margin: 0;
        border-radius: 20px;
        padding: 18px;
    }

    .drug-trend-section {
        margin: 14px 0 0;
        border-radius: 20px;
        padding: 18px;
    }

    .diet-trend-head {
        margin-bottom: 12px;
    }

    .diet-swiper {
        gap: 14px;
    }

    .diet-card {
        flex-basis: calc(50% - 7px);
        border-radius: 16px;
        padding: 14px;
    }

    .diet-main-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 12px;
    }

}

@media (max-width: 640px) {
    .index2-wrap {
        max-width: 100%;
    }

    .index2-content-container {
        padding: 0;
    }

    /* 모바일 엣지투엣지: 좌우 마진 제거, 둥근 모서리 제거 */
    .diet-trend-section {
        margin: 0;
        border-top: none;
        border-bottom: none;
        border-left: none;
        border-right: none;
        border-radius: 0;
        padding: 14px 16px;
    }

    .drug-trend-section {
        margin: 10px 0 0;
        border-top: none;
        border-bottom: none;
        border-left: none;
        border-right: none;
        border-radius: 0;
        padding: 14px 16px;
    }

    .diet-card {
        flex-basis: calc(100% - 20px);
    }

    .diet-main-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 10px;
    }

    .sheet-title {
        font-size: 20px;
    }
}

/* ===================================================== */
/* 🚨 LIVE 실시간 티커 (index.php에서 이식 - 2026-05)       */
/* ===================================================== */
.live-ticker-container {
    margin: 0 0 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    height: 60px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    z-index: 10;
    position: relative;
}

.live-ticker-container .ticker-label {
    font-size: 10px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #406CB4, #6366f1);
    padding: 3px 8px;
    border-radius: 6px;
    margin-right: 14px;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(64, 108, 180, 0.2);
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
}

.live-ticker-container .ticker-label::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: liveTickerBlink 1s infinite;
}

@keyframes liveTickerBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.live-ticker-container .ticker-wrapper {
    flex: 1;
    height: 100%;
    position: relative;
}

.live-ticker-container .ticker-list {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.live-ticker-container .ticker-item {
    height: 60px;
    display: flex;
    align-items: center;
}

.live-ticker-container .ticker-content {
    font-size: 13.5px;
    line-height: 1.4;
    font-weight: 600;
    color: #475569;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    word-break: keep-all;
}

.live-ticker-container .ticker-item strong {
    color: #406CB4;
}

