﻿/* ==========================================================================
   carediary.css - Cherry Dr. Care Diary Style (Optimized & Refactored)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 怨듯넻 蹂??& ?덉씠?꾩썐 (Split Layout)
   -------------------------------------------------------------------------- */
:root {
    --primary: #406CB4;
    --bg-color: #ffffff;
    --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 12px;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --border-light: #e2e8f0;
}

/* [?덉씠?꾩썐] split-layout-container, brand-panel, content-panel ? common.css?먯꽌 ?뺤쓽??*/

.content-container {
    width: 100%;
    max-width: 1080px;
}


/* --------------------------------------------------------------------------
   2. 諛곌꼍 ?좊땲硫붿씠??& 罹먮┃??
   -------------------------------------------------------------------------- */
.floating-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.floater {
    position: absolute;
    font-size: 40px;
    opacity: 0.5;
    animation: floatUpProduct 6s infinite ease-in-out;
    filter: drop-shadow(0 4px 6px rgba(64, 108, 180, 0.1));
}

@keyframes floatUpProduct {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* ?꾩씠肄??꾩튂/?띾룄 */
.p1 {
    left: 10%;
    top: 15%;
    animation-duration: 7s;
    font-size: 50px;
}

.p2 {
    left: 80%;
    top: 25%;
    animation-duration: 5s;
    font-size: 45px;
}

.p3 {
    left: 15%;
    top: 60%;
    animation-duration: 8s;
    font-size: 55px;
}

.p4 {
    left: 75%;
    top: 70%;
    animation-duration: 6s;
    font-size: 40px;
}

.p5 {
    left: 50%;
    top: 45%;
    animation-duration: 4s;
    font-size: 35px;
}

.p6 {
    left: 30%;
    top: 85%;
    animation-duration: 9s;
    font-size: 40px;
}

/* [brand-panel 愿???ㅽ??? sticky-content, page-main-title, page-sub-desc,
   char-guide-box, cherry-3d-char, guide-bubble, bubble-tail ?
   紐⑤몢 common.css?먯꽌 ?뺤쓽?????ш린??以묐났 ?좎뼵?섎㈃ PC 誘몃뵒?댁옘由щ? ??뼱? */



/* --------------------------------------------------------------------------
   3. 怨듯넻 而댄룷?뚰듃 (移대뱶, 踰꾪듉, ?낅젰李?
   * section-card??common.css?먯꽌 ?뺤쓽??
   -------------------------------------------------------------------------- */

/* 踰꾪듉 (?꾩썐?쇱씤) */
.outline {
    border-radius: var(--border-radius-sm);
    border: 1px solid #cbd5e1;
    background: #fff;
    color: var(--text-gray);
    font-weight: 600;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.outline:hover {
    background: #f8fafc;
}

.outline.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(64, 108, 180, 0.2);
}

/* 硫붿씤 ?≪뀡 踰꾪듉 */
#saveFoodButton,
#saveDrugButton,
#saveStatusButton {
    background: var(--primary);
    color: #fff;
    border: none;
    height: 48px;
    width: 100%;
    font-size: 16px;
    font-weight: 700;
    margin-top: 20px;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 12px rgba(64, 108, 180, 0.3);
    cursor: pointer;
}

/* ?낅젰 ??怨듯넻 ?ㅽ???*/
.food-input,
#drugNameInput,
#drugDoseInput,
#statusWeight,
#statusMemo,
textarea {
    background: #f9fafb;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    font-size: 15px;
    transition: border 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.food-input:focus,
#drugNameInput:focus {
    border-color: var(--primary);
    background: #fff;
    outline: none;
}

/* ?꾩씠肄?踰꾪듉 */
.icon-btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    line-height: 1;
    font-size: 18px;
    color: #444;
}

/* --------------------------------------------------------------------------
   4. ???좏깮 & ?좎쭨/?쒓컙 UI
   -------------------------------------------------------------------------- */
#petButtons {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 14px;
    gap: 0;
    margin-bottom: 20px;
}

#petButtons label {
    flex: 1;
    text-align: center;
    cursor: pointer;
}

#petButtons input[name="selectedPet"] {
    display: none;
}

#petButtons .pet-tab {
    display: block;
    padding: 10px 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    transition: all 0.3s ease;
}

#petButtons input:checked+.pet-tab {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(64, 108, 180, 0.2);
    font-weight: 800;
}

/* ?좎쭨 ?좏깮 諛?*/
#dateBar {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin: 20px 0;
    overflow-x: auto;
    padding-bottom: 5px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#dateBar::-webkit-scrollbar {
    display: none;
}

.date-pill {
    width: 48px;
    height: 64px;
    flex-shrink: 0;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    background: #fff;
    color: var(--text-gray);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.date-pill div:first-child {
    font-size: 12px;
    margin-bottom: 4px;
}

.date-pill div:last-child {
    font-size: 18px;
    font-weight: 700;
}

.date-pill.selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(64, 108, 180, 0.3);
}

/* ?ㅻ뒛 ?좎쭨 ?쒖떆 (?좎? 湲곗?) - ?섎떒 ?먯쑝濡??ы뵆?섍쾶 */
.date-pill.today {
    position: relative;
}

.date-pill.today::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: var(--primary);
    border-radius: 50%;
}

/* ?ㅻ뒛 + ?좏깮?? ???됱긽留??곗깋?쇰줈 */
.date-pill.today.selected::after {
    background: #fff;
}

/* ?쒓컙 ?좏깮湲?*/
.time-selector {
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-gray);
    font-size: 14px;
}

#inputHour {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    text-align: center;
    width: 60px;
}

/* --------------------------------------------------------------------------
   5. 湲곕뒫 ??(癒뱀?寃????곹깭)
   -------------------------------------------------------------------------- */
.cd-tabbar {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    padding: 0 0 10px 0;
    margin-bottom: 20px;
    gap: 10px;
    display: flex;
}

.cd-tab {
    flex: 1;
    height: 44px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    color: var(--text-gray);
    border-radius: 12px;
    font-size: 12px;
    transition: all 0.2s;
    cursor: pointer;
}

.cd-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(64, 108, 180, 0.2);
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   6. 湲곕줉 由ъ뒪???꾩씠??(移대뱶??
   -------------------------------------------------------------------------- */
.food-record-item {
    background: #fff;
    border: 1px solid #f1f5f9 !important;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s;
    cursor: pointer;
}

@media (max-width: 768px) {
    .food-record-item {
        margin-left: 15px;
        margin-right: 15px;
    }
}

.food-record-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.record-cat-large {
    font-size: 12px;
    color: #94a3b8;
    background: #f8fafc;
    padding: 2px 6px;
    border-radius: 6px;
}

.record-cat-small {
    font-size: 12px;
    color: #94a3b8;
    background: #f8fafc;
    padding: 2px 6px;
    border-radius: 6px;
}

.record-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.record-food b {
    font-size: 15px;
    color: #333;
}

.record-time {
    font-size: 12px;
    color: #94a3b8;
    background: #f8fafc;
    padding: 2px 6px;
    border-radius: 6px;
}

.record-label {
    font-weight: 700;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 6px;
    color: #fff;
    min-width: 45px;
    text-align: center;
}

/* ?쇰꺼 ?됱긽 */
.label-eat {
    background: #10b981;
}

.label-given {
    background: #f59e0b;
}

.label-status-weight {
    background: #3498db;
}

.label-status-resp {
    background: #3a25b1;
}

.label-status-vomit {
    background: #e74c3c;
}

.label-status-urine {
    background: #1abc9c;
}

.label-status-stool {
    background: #f39c12;
}

.label-status-water {
    background: #2980b9;
}

.label-status-fluid {
    background: #8e44ad;
}

.label-status-memo {
    background: #7f8c8d;
}

.label-status-bp {
    background: #d63031;
}

.label-status {
    background: #95a5a6;
}

/* --------------------------------------------------------------------------
   Status Record Card (New Design)
   -------------------------------------------------------------------------- */
.status-record-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.2s;
    cursor: pointer;
}

@media (max-width: 768px) {
    .status-record-card {
        margin-left: 15px;
        margin-right: 15px;
        padding: 14px;
    }
}

.status-record-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: var(--primary);
}

.status-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-card-emoji {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .status-card-emoji {
        width: 42px;
        height: 42px;
        font-size: 20px;
        border-radius: 12px;
    }
}

.status-card-info {
    flex: 1;
    min-width: 0;
}

.status-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

@media (max-width: 768px) {
    .status-card-title {
        font-size: 14px;
    }
}

.status-card-detail {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 500;
}

@media (max-width: 768px) {
    .status-card-detail {
        font-size: 12px;
    }
}

.status-card-arrow {
    font-size: 20px;
    color: #cbd5e1;
    font-weight: 300;
}

.status-time-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    /* border-top: 1px solid #f1f5f9; */
}

.status-time-tag {
    background: #f1f5f9;
    color: var(--text-gray);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .status-time-tag {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* --------------------------------------------------------------------------
   Food Record Card (New Design)
   -------------------------------------------------------------------------- */
.food-record-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.2s;
    cursor: pointer;
}

@media (max-width: 768px) {
    .food-record-card {
        margin-left: 15px;
        margin-right: 15px;
        padding: 14px;
    }
}

.food-record-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: var(--primary);
}

.food-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}


.food-card-thumb {
    width: 48px;
    height: 48px;
    background: #f8fafc;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.food-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .food-card-thumb {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }
}

.food-card-info {
    flex: 1;
    min-width: 0;
}

.food-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    .food-card-title {
        font-size: 14px;
        margin-bottom: 2px;
    }
}

.food-card-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-gray);
    font-weight: 500;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .food-card-detail {
        font-size: 12px;
        gap: 4px;
    }
}

.food-card-arrow {
    font-size: 20px;
    color: #cbd5e1;
    font-weight: 300;
}

.food-label {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.label-eat {
    background: #dcfce7;
    color: #166534;
}

.label-given {
    background: #f1f5f9;
    color: #64748b;
}

.food-amount-display {
    color: var(--primary);
    font-weight: 700;
}

.food-category {
    background: #f8fafc;
    color: #94a3b8;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}


.food-time-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    /* border-top: 1px solid #f1f5f9; */
}

.food-time-tag {
    background: #f1f5f9;
    color: var(--text-gray);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}


@media (max-width: 768px) {
    .food-time-tag {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* --------------------------------------------------------------------------
   Food Drawer (List + Add Pattern - Status Style)
   -------------------------------------------------------------------------- */
.existing-records-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.existing-record-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.existing-record-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-dark);
}

.existing-record-time {
    color: #3b82f6;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.existing-record-type {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.badge-eat {
    background: #dcfce7;
    color: #166534;
}

.badge-given {
    background: #f1f5f9;
    color: #64748b;
}

.existing-record-value {
    font-weight: 700;
    color: #334155;
    border-bottom: 2px dotted #cbd5e1;
    padding-bottom: 2px;
}

.existing-record-delete {
    background: #fee2e2;
    border: none;
    color: #ef4444;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: auto;
}

.existing-record-delete:hover {
    background: #fca5a5;
    color: #fff;
}

/* Add Record Form (Vomit Style) */
.drawer-section-add {
    margin-top: 24px;
    padding: 24px;
    background-color: #f0fdf4;
    border: 1px dashed #86efac;
    border-radius: 20px;
}

.drawer-sublabel {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    text-align: center;
}

.add-record-row {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.add-record-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.drawer-input-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0 12px;
    height: 44px;
    display: flex;
    align-items: center;
    width: 100%;
}

.drawer-input-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.type-selector-group {
    display: flex;
    gap: 20px;
    align-items: center;
    height: 44px;
}

.type-selector-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
}

.btn-add-record {
    background: var(--primary);
    color: #fff;
    border: none;
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(64, 108, 180, 0.2);
    transition: all 0.2s;
}

.btn-add-record:hover {
    background: #355a96;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(64, 108, 180, 0.3);
}

/* --------------------------------------------------------------------------
   Drawer - Existing Records List (媛쒕퀎 湲곕줉 由ъ뒪??
   -------------------------------------------------------------------------- */
.existing-records-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.existing-record-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
}

.existing-record-time {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    min-width: 70px;
    flex-shrink: 0;
}

.existing-record-note {
    flex: 1;
    font-size: 13px;
    color: var(--text-dark);
}

.existing-record-delete {
    margin-left: auto;
    background: #fee2e2;
    color: #ef4444;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.existing-record-delete:hover {
    background: #fecaca;
}

/* ??湲곕줉 異붽? ?뱀뀡 */
.drawer-section-add {
    background: #f0fdf4;
    border: 1px dashed #86efac;
    border-radius: 12px;
    padding: 16px;
    margin-top: 8px;
}

.add-record-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.add-record-time,
.add-record-note {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-sublabel {
    font-size: 11px;
    color: var(--text-gray);
    font-weight: 600;
}

@media (max-width: 768px) {
    .existing-record-time {
        font-size: 12px;
        min-width: 60px;
    }

    .existing-record-note {
        font-size: 12px;
    }

    .existing-record-delete {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* ?섏젙 媛?ν븳 媛??ㅽ???*/
.existing-record-value {
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px dashed var(--primary);
    padding-bottom: 1px;
    transition: all 0.2s;
}

@media (max-width: 768px) {
    .existing-record-value {
        font-size: 12px;
    }
}

.existing-record-value:hover {
    background: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
}

/* ?섏젙 紐⑤뱶 */
.existing-record-edit-mode {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.existing-record-edit-input {
    width: 60px;
    padding: 4px 8px;
    border: 2px solid var(--primary);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.existing-record-edit-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.existing-record-save-btn {
    background: var(--primary);
    color: white;
}

.existing-record-cancel-btn {
    background: #e2e8f0;
    color: var(--text-gray);
}

/* ??젣 踰꾪듉 */
.delete-record-btn {
    color: #ef4444;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
    padding: 0 5px;
}

/* ?몃꽕???대?吏 */
.food-record-item .thumb {
    width: 56px !important;
    height: 56px !important;
    flex: 0 0 56px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: #f3f4f6 !important;
    margin-right: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.food-record-item .thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    max-width: none !important;
    border-radius: 0 !important;
}

/* --------------------------------------------------------------------------
   7. 寃??寃곌낵 ?쒕∼?ㅼ슫 (?먮룞?꾩꽦)
   -------------------------------------------------------------------------- */
#searchResults {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: absolute;
    width: 100%;
    z-index: 100;
    top: 100% !important;
    margin-top: 8px !important;
    left: 0 !important;
}

#searchResults:empty {
    display: none !important;
    border: none !important;
    box-shadow: none !important;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f8fafc;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item .thumb {
    width: 50px !important;
    height: 50px !important;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-result-item .thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    max-width: none !important;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-brand {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}

.search-result-name {
    font-size: 14px;
    color: #333;
    font-weight: 700;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   8. ?뚯떇 異붽? 移대뱶 (移대뱶??UI)
   -------------------------------------------------------------------------- */
.food-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.food-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(64, 108, 180, 0.1);
}

.food-card-header {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    position: relative !important;
    width: 100% !important;
}

.badge-unchecked {
    position: static !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    width: auto !important;
    white-space: nowrap !important;
    margin-top: 2px !important;
    margin-right: 6px !important;
    padding: 2px 6px !important;
    background: #fee2e2 !important;
    color: #ef4444 !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    z-index: auto !important;
}

.food-name {
    flex: 1 !important;
    width: auto !important;
    min-width: 0 !important;
    margin-top: 0 !important;
    line-height: 1.4 !important;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    word-break: keep-all;
}

.delete-food-card {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.delete-food-card:hover {
    color: #ef4444;
}

.food-card-meta {
    font-size: 12px;
    color: var(--text-gray);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
}

.meta-divider {
    color: #cbd5e1;
}

.meta-code {
    margin-left: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 1px 6px;
    border-radius: 4px;
    color: #94a3b8;
    font-family: monospace;
    font-size: 11px;
}

.food-card-inputs {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    background: #f8fafc !important;
    padding: 12px !important;
    border-radius: 12px !important;
    margin-top: 8px !important;
}

.input-group {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    min-width: 0 !important;
}

.input-group label {
    font-size: 12px !important;
    color: var(--text-gray) !important;
    font-weight: 600 !important;
    margin: 0 !important;
    display: block !important;
    width: 100% !important;
}

.input-wrapper {
    display: flex !important;
    align-items: center !important;
    background: #fff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 0 10px !important;
    height: 40px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.input-wrapper:focus-within {
    border-color: var(--primary) !important;
}

.food-gram-input,
.provide-amount-input {
    flex: 1 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    background: transparent !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #333 !important;
    text-align: right !important;
    padding: 0 4px 0 0 !important;
    margin: 0 !important;
    outline: none !important;
}

.unit {
    font-size: 13px !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
    flex-shrink: 0 !important;
}

.input-divider {
    width: 1px !important;
    height: 40px !important;
    background: #e2e8f0 !important;
    flex-shrink: 0 !important;
}

/* --------------------------------------------------------------------------
   9. ?붿빟 & ?곸꽭 ?곸뼇??遺꾩꽍 (Macro Grid)
   -------------------------------------------------------------------------- */
.summaryBoxDetails {
    background: linear-gradient(to bottom, #fff, #f8faff);
    border: 1px solid #e6eaf6;
    border-radius: 20px;
    padding: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .summaryBoxDetails {
        border-radius: 0;
    }
}

.summary-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.summary-stat-item {
    text-align: center;
    background: #fff;
    padding: 12px 5px;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
}

.stat-val {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-gray);
}

.cdi-progress {
    width: 100%;
    height: 10px;
    background: #f3f4f6;
    border-radius: 999px;
    overflow: hidden;
}

.cdi-progress .bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #60a5fa, #34d399);
    transition: width 0.5s ease;
}

.macro-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
}

.macro-box {
    background: #fff;
    border-radius: 12px;
    padding: 12px 4px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.macro-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-gray);
    margin-bottom: 4px;
}

.macro-val-lg {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.macro-sub {
    font-size: 11px;
    color: #94a3b8;
}

.macro-mini {
    font-size: 10px;
    color: #cbd5e1;
    margin-top: 2px;
}

.macro-status {
    font-size: 11px;
    margin-top: 4px;
    color: var(--primary);
    font-weight: 600;
}

.nutrient-detail-box {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.detail-header {
    font-size: 16px;
    font-weight: 800;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.detail-row .label {
    color: var(--text-gray);
    font-weight: 600;
}

.detail-row .val-group {
    text-align: right;
}

.main-val {
    font-weight: 700;
    color: var(--text-dark);
    margin-right: 6px;
}

.sub-val {
    font-size: 12px;
    color: #94a3b8;
}

.ratio-box {
    background: #f8fafc;
    padding: 10px 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 15px;
    border: 1px solid #e2e8f0;
}

.ratio-label {
    font-size: 13px;
    color: #475569;
    font-weight: 600;
}

.ratio-val {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
}

/* ?섎텇 ?몃옒而?*/
.hydration-tracker-box {
    background: #fdfdfd;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 16px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.hydration-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.hydration-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.hydration-title small {
    font-weight: 400;
    color: #888;
    margin-left: 4px;
}

.hydration-progress-track {
    width: 100%;
    height: 14px;
    background: #eef2f6;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    margin-bottom: 12px;
}

.hydration-bar {
    height: 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hydration-bar.food-water {
    background: #93c5fd;
}

.hydration-bar.drink-water {
    background: #3b82f6;
}

.hydration-bar.fluid-water {
    background: #a855f7;
}

.hydration-legend {
    display: flex;
    justify-content: space-around;
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px;
}

.legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    gap: 2px;
}

.legend-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-bottom: 2px;
}

.legend-item .dot.food-water {
    background: #93c5fd;
}

.legend-item .dot.drink-water {
    background: #3b82f6;
}

.legend-item .dot.fluid-water {
    background: #a855f7;
}

.legend-item .label {
    color: #64748b;
    font-size: 11px;
}

.legend-item .val {
    font-weight: 700;
    color: #333;
    font-size: 13px;
}

/* --------------------------------------------------------------------------
   10. 誘몃뵒??荑쇰━ (PC & 紐⑤컮?????
   -------------------------------------------------------------------------- */
/* 湲곗〈 PC ?덉씠?꾩썐(flex-direction: row) 愿???ㅽ????쒓굅 (common.css 怨듯넻 諛곕텇 ?곸슜) */

@media (max-width: 600px) {
    .macro-grid-container {
        grid-template-columns: 1fr 1fr;
    }

    .food-card-inputs {
        flex-direction: column;
        gap: 12px;
    }

    .input-divider {
        display: none;
    }

    .input-group {
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   11. ?쒕줈??(Drawer) & 諛뷀? ?쒗듃
   -------------------------------------------------------------------------- */
#drawerDim {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 99998 !important;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
    opacity: 0;
}

#drawerDim.show {
    opacity: 1;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    height: 100dvh;
    width: 100%;
    background: #fff;
    z-index: 99999 !important;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.drawer.open {
    transform: translateX(0);
}

.drawer-header {
    flex-shrink: 0;
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 0;
}

@media (min-width: 768px) {
    .drawer {
        width: 500px;
        border-top-left-radius: 24px;
        border-bottom-left-radius: 24px;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    }

    .drawer-header {
        border-radius: 24px 0 0 0;
    }
}

.drawer-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
}

.drawer-close-btn {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 16px;
    min-width: auto;
    padding: 0;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    -webkit-overflow-scrolling: touch;
}

#drawerContent,
#drugDrawerContent,
#statusDrawerContent {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.drawer-footer {
    flex-shrink: 0;
    padding: 16px 24px;
    background: #fff;
    /* border-top: 1px solid #f1f5f9; */
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.drawer-save-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(64, 108, 180, 0.25);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-save-btn:hover {
    background: #365c9b;
}

@media (max-width: 600px) {
    /* Mobile Drawer overrides removed to enforce full-screen style */

    .drawer-footer {
        padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    }
}

.drawer-section {
    margin-bottom: 24px;
}

.drawer-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 8px;
}

.drawer-input-box {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0 16px;
    height: 48px;
    transition: border-color 0.2s;
    overflow: hidden;
}

.drawer-input-box:focus-within {
    border-color: #406CB4;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(64, 108, 180, 0.1);
}

.drawer-input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
    font-size: 16px !important;
    color: #333 !important;
}

.drawer-unit {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
}

.drawer-toggle-group {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
}

/* --------------------------------------------------------------------------
   12. Empty State (湲곕줉 ?놁쓬)
   -------------------------------------------------------------------------- */
.empty-state-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px dashed #cbd5e1;
    text-align: center;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .empty-state-box {
        margin-left: 15px;
        margin-right: 15px;
    }
}

.empty-state-icon {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 12px;
}

.empty-state-text {
    font-size: 15px;
    color: #64748b;
    font-weight: 500;
}

.drawer-check-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.drawer-check-label input:checked+span {
    color: var(--primary);
    font-weight: 700;
}

.drawer-nutri-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.drawer-nutri-table td {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.drawer-nutri-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: #1e293b;
}

/* --------------------------------------------------------------------------
   13. ?곹깭 湲곕줉 ?꾩씠肄?洹몃━??(Status Grid)
   -------------------------------------------------------------------------- */
.status-icon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px 10px;
    padding: 10px 0;
}

.status-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.status-icon-btn:hover {
    background-color: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}

.status-icon-btn .icon-wrapper {
    width: 60px;
    height: 60px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 28px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.2s, border-color 0.2s, background-color 0.2s;
}

.status-icon-btn:hover .icon-wrapper {
    border-color: #406CB4;
    background: #fff;
    box-shadow: 0 6px 15px rgba(64, 108, 180, 0.15);
}

.status-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    padding: 0 4px;
}

.status-icon-btn .label {
    font-size: 13px;
    color: #475569;
    font-weight: 600;
}

.time-ago {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
    font-weight: 500;
    letter-spacing: -0.5px;
}

.time-ago.warn {
    color: #f59e0b;
    font-weight: 700;
}

.time-ago.danger {
    color: #ef4444;
    font-weight: 800;
}

@media (max-width: 360px) {
    .status-icon-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --------------------------------------------------------------------------
   14. ?뭻 ??湲곕줉: 2??洹몃━??移대뱶
   -------------------------------------------------------------------------- */
.drug-time-header {
    font-size: 15px;
    font-weight: 800;
    color: #555;
    margin: 20px 0 12px 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    clear: both;
}

@media (max-width: 768px) {
    .drug-time-header {
        margin-left: 15px;
        margin-right: 15px;
    }
}

.drug-time-header i {
    color: #f59e0b;
    font-size: 18px;
    font-style: normal;
}

.drug-grid-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .drug-grid-row {
        margin-left: 15px;
        margin-right: 15px;
    }
}

.drug-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: calc(50% - 4px);
    min-height: 80px;
    padding: 12px 14px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent;
    position: relative;
    box-sizing: border-box;
}

.drug-card.taken-false {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
}

.drug-card.taken-false .drug-icon-box {
    filter: grayscale(100%);
    opacity: 0.5;
}

.drug-card.taken-true {
    background-color: #EEF4FF;
    border: 1px solid #406CB4;
    color: #333;
    box-shadow: 0 4px 10px rgba(64, 108, 180, 0.15);
    transform: translateY(-2px);
}

.drug-card-left {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.drug-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.drug-info-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

.drug-name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.drug-dose {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.drug-card.taken-true .drug-dose {
    color: #64748b;
}

.drug-tag {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 4px;
}

.drug-tag.appetite {
    background: #f43f5e;
}

.drug-tag.antiemetic {
    background: #f59e0b;
}

.btn-delete-drug {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px;
    color: #cbd5e1;
    background: #fff;
    border-radius: 50%;
    border: 1px solid #eee;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    min-width: auto;
}

.btn-delete-drug:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fecaca;
}

.btn-edit-drug {
    position: absolute;
    top: 8px;
    right: 36px;
    padding: 6px;
    color: #cbd5e1;
    background: #fff;
    border-radius: 50%;
    border: 1px solid #eee;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    min-width: auto;
    z-index: 10;
}

.btn-edit-drug:hover {
    background: #f1f5f9;
    color: #406CB4;
    border-color: #cbd5e1;
}

.drug-card.taken-true .btn-delete-drug,
.drug-card.taken-true .btn-edit-drug {
    color: #406CB4;
    border-color: #dbeafe;
}

@media (max-width: 400px) {
    .drug-card {
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   15. 24?쒓컙 ???移?(Timeline Chips) - ?곹깭 湲곕줉 ?쒓컙 ?좏깮 UI
   -------------------------------------------------------------------------- */
.time-chip-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.time-chip {
    width: 100%;
    aspect-ratio: 1;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.time-chip:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.time-chip.selected {
    background: #406CB4;
    color: #fff;
    border-color: #406CB4;
    box-shadow: 0 4px 10px rgba(64, 108, 180, 0.3);
    font-weight: 800;
}

.time-chip-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

/* 紐⑤컮?쇱뿉????꾩묩 理쒖쟻??(480px ?댄븯) */
@media (max-width: 480px) {
    .time-chip-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        margin-bottom: 16px;
    }

    .time-chip {
        aspect-ratio: auto;
        min-height: 36px;
        font-size: 12px;
        border-radius: 8px;
        padding: 6px 2px;
    }

    .drawer-body {
        padding: 16px;
    }
}

/* ?щ씪?대뜑 (移?踰꾪듉怨??④퍡 ?ъ슜) */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.chip-btn {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.chip-btn:hover {
    background: #f1f5f9;
    color: #333;
    border-color: #94a3b8;
}

.chip-btn:active {
    background: #e2e8f0;
    transform: translateY(1px);
}

.range-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
}

.range-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e2e8f0;
    border-radius: 5px;
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #406CB4;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(64, 108, 180, 0.4);
}

.range-value-display {
    font-size: 14px;
    font-weight: 700;
    color: #406CB4;
    min-width: 40px;
    text-align: right;
}

/* =========================================
   [Merged from nutrition_search.css]
   Search Results & Quick Chips for CareDiary
   ========================================= */

/* Load More Button */
#cds-load-more {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    background: #fff;
    border: 2px solid #eee;
    border-radius: 12px;
    color: #666;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

#cds-load-more:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Results List Container */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

/* Result Card (Single Row) */
.result-row {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    display: grid;
    grid-template-columns: 40px 1fr;
    /* Icon | Content */
    column-gap: 14px;
    row-gap: 4px;
    align-items: start;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.result-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 108, 180, 0.1);
    border-color: #e2e8f0;
}

/* Icon Box */
.result-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

/* Type Colors */
.result-icon.food {
    background: #10b981;
}

/* Green */
.result-icon.drug {
    background: #6366f1;
}

/* Purple */
.result-icon.status {
    background: #f59e0b;
}

/* Orange */

/* Text Area */
.result-row .title {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    line-height: 1.4;
}

.result-row .note {
    grid-column: 2 / -1;
    font-size: 14px;
    color: #555;
    margin-top: 4px;
    background: #f8fafc;
    padding: 8px 10px;
    border-radius: 8px;
    line-height: 1.5;
}

.result-row .meta {
    grid-column: 2 / -1;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Badge Style */
.result-row .badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    vertical-align: middle;
    letter-spacing: -0.5px;
}

.badge.food {
    background: #e7f8f1;
    color: #047857;
}

.badge.drug {
    background: #eef2ff;
    color: #4338ca;
}

.badge.status {
    background: #fffbeb;
    color: #b45309;
}


/* =========================================
   ?∽툘 Quick Filter Chips (Quick Chips) Style
   ========================================= */
.quick-chip-area {
    display: flex;
    gap: 8px;
    margin: 12px 0 20px;
    overflow-x: auto;
    padding-bottom: 5px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    /* Hide Scrollbar */
}

.quick-chip-area::-webkit-scrollbar {
    display: none;
}

.quick-chip {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Pet Name Chip (Blue) */
.quick-chip.pet {
    background: #EEF4FF;
    color: #406CB4;
    border: 1px solid #DCE9FC;
}

.quick-chip.pet:hover {
    background: #406CB4;
    color: #fff;
}

/* Keyword Chip (Gray) */
.quick-chip.keyword {
    background: #fff;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.quick-chip.keyword:hover {
    background: #f1f5f9;
    color: #333;
    border-color: #cbd5e1;
}

/* =========================================
   ?? Food Stats Drawer Styles
   ========================================= */

/* Clickable result row */
.result-row.clickable {
    cursor: pointer;
}

.result-row.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(64, 108, 180, 0.15);
    border-color: #406CB4;
}

.result-row.clickable::after {
    content: '??;
 position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.2s;
}

.result-row.clickable:hover::after {
    opacity: 1;
    color: #406CB4;
}

/* Stats Card Layout */
.food-stats-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.stats-pet-name {
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stats-item {
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
}

.stats-item.highlight {
    background: linear-gradient(135deg, #406CB4 0%, #5b7fc7 100%);
    color: #fff;
}

.stats-item.highlight .stats-label {
    color: rgba(255, 255, 255, 0.8);
}

.stats-item.highlight .stats-value {
    color: #fff;
}

.stats-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
    font-weight: 600;
}

.stats-value {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
}

/* 섭취 통계 · 일별 상세 (사료 탐색기 통계 드로어 / 검색 허브와 공통) */
.food-detail-toggle {
    margin-top: 12px;
    width: 100%;
    border: 1px solid #dbeafe;
    background: #f8fbff;
    color: #1e3a6e;
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.food-detail-toggle:hover {
    background: #eff6ff;
}

.food-detail-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.food-detail-toggle i {
    transition: transform 0.2s ease;
}

.food-detail-rows {
    margin-top: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.food-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.food-detail-row:last-child {
    border-bottom: none;
}

.food-detail-date {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.food-detail-metrics {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.food-detail-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
}

.food-detail-chip.provide {
    color: #92400e;
    background: #fffbeb;
}

.food-detail-chip.intake {
    color: #1e3a8a;
    background: #eff6ff;
}

.food-detail-empty {
    padding: 14px 12px;
    font-size: 13px;
    color: #64748b;
    text-align: center;
}

.food-detail-more-wrap {
    padding: 10px 12px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

.food-detail-more {
    width: 100%;
    border: 1px solid #dbeafe;
    background: #fff;
    color: #1e3a8a;
    border-radius: 9px;
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.food-detail-more:hover {
    background: #eff6ff;
}

/* ==========================================================================
   Today's Scheduled Drugs (???ㅼ?以?諛뺤뒪)
   ========================================================================== */
.today-schedule-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.schedule-title {
    font-size: 15px;
    font-weight: 700;
    color: #0369a1;
}

.schedule-manage-link {
    font-size: 13px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.schedule-manage-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Owned Drugs Box (蹂댁쑀 ?? */
.owned-drugs-box {
    background: linear-gradient(135deg, #faf5ff 0%, #f0e7ff 100%);
    border: 1px solid #ddd6fe;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
}

.owned-drugs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.owned-drugs-title {
    font-size: 14px;
    font-weight: 700;
    color: #6b21a8;
}

.owned-drugs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.owned-drug-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #c4b5fd;
    border-radius: 20px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: #6b21a8;
    cursor: pointer;
    transition: all 0.2s;
}

.owned-drug-chip:hover {
    background: #6b21a8;
    color: #fff;
    border-color: #6b21a8;
}

.owned-drug-chip .chip-icon {
    font-size: 14px;
}

.owned-drug-chip .chip-dose {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 400;
}

.owned-drug-chip:hover .chip-dose {
    color: #e9d5ff;
}

.scheduled-drug-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scheduled-drug-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e0f2fe;
    border-radius: 12px;
    transition: all 0.2s;
}

.scheduled-drug-item.pending {
    opacity: 0.7;
    border-style: dashed;
}

.scheduled-drug-item.exists {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.scheduled-drug-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.scheduled-drug-icon.supple {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.scheduled-drug-icon.hospital {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.scheduled-drug-info {
    flex: 1;
    min-width: 0;
}

.scheduled-drug-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.scheduled-drug-meta {
    font-size: 12px;
    color: #64748b;
}

.scheduled-drug-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
}

.scheduled-drug-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.scheduled-drug-status.applied {
    background: #dcfce7;
    color: #166534;
}

.apply-schedule-btn {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.apply-schedule-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.apply-schedule-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.schedule-empty {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 13px;
}

.schedule-empty i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* Recent Drug Tip */
.recent-drug-tip {
    margin-top: 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 10px;
    font-size: 12px;
    color: #0369a1;
    line-height: 1.5;
}

.recent-drug-tip a {
    color: #6366f1;
    font-weight: 600;
    text-decoration: underline;
}

/* Bulk Import Button */
.bulk-import-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 32px);
    margin: 12px 16px 20px 16px;
    padding: 12px 16px;
    border: 2px dashed #6366f1;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(129, 140, 248, 0.1) 100%);
    color: #6366f1;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.bulk-import-btn:hover {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    color: #fff;
    border-color: #6366f1;
}

/* ==========================================================================
   NEW LAYOUT STYLES - 2026 Redesign
   ========================================================================== */

/* --------------------------------------------------------------------------
   釉뚮옖?쒗뙣??紐⑤컮???④?
   -------------------------------------------------------------------------- */
.brand-panel.hide-on-mobile {
    display: flex;
}

@media (max-width: 768px) {
    .brand-panel.hide-on-mobile {
        display: none !important;
    }
}

/* --------------------------------------------------------------------------
   ?곷떒 ?ㅻ뜑 諛?
   -------------------------------------------------------------------------- */
.cd-top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border-radius: var(--border-radius-md);
    box-shadow: var(--card-shadow);
    margin-bottom: 16px;
}

.cd-header-left {
    display: flex;
    align-items: center;
}

.cd-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ???좏깮 踰꾪듉 */
.month-selector-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.2s;
}

.month-selector-btn:hover {
    background: #f1f5f9;
}

.month-chevron {
    font-size: 12px;
    color: var(--text-gray);
    transition: transform 0.2s;
}

.month-selector-btn.active .month-chevron {
    transform: rotate(180deg);
}

/* ?ㅻ뜑 ?꾩씠肄?踰꾪듉 */
.header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--text-gray);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.header-icon-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* --------------------------------------------------------------------------
   ???꾩씠肄?& ?쒕∼?ㅼ슫
   -------------------------------------------------------------------------- */
.pet-icon-wrapper {
    position: relative;
}

.pet-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: #fff;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    min-width: 40px;
}

.pet-icon-btn:hover {
    box-shadow: 0 0 0 3px rgba(64, 108, 180, 0.2);
}

.pet-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pet-icon-initial {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

/* ???쒕∼?ㅼ슫 */
.pet-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    z-index: 1000;
    overflow: hidden;
    animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pet-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.pet-dropdown-item:hover {
    background: #f8fafc;
}

.pet-dropdown-item.active {
    background: #eff6ff;
}

.pet-dropdown-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pet-dropdown-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pet-initial-small {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.pet-dropdown-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.pet-check {
    color: var(--primary);
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   ?붽컙 ?щ젰 ?앹뾽
   -------------------------------------------------------------------------- */
.month-calendar-popup {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    padding: 16px;
    margin-bottom: 16px;
    animation: calendarSlide 0.25s ease;
}

@keyframes calendarSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
}

.calendar-header span {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.cal-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--text-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cal-nav-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-weekdays span {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-gray);
    padding: 8px 0;
}

.calendar-weekdays span:first-child {
    color: #ef4444;
}

.calendar-weekdays span:last-child {
    color: #3b82f6;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-day:hover {
    background: #f1f5f9;
}

.calendar-day.today {
    background: #eff6ff;
    color: var(--primary);
    font-weight: 700;
}

.calendar-day.selected {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.calendar-day.other-month {
    color: #cbd5e1;
}

.calendar-day.sunday {
    color: #ef4444;
}

.calendar-day.saturday {
    color: #3b82f6;
}

.calendar-day.selected.sunday,
.calendar-day.selected.saturday {
    color: #fff;
}

/* --------------------------------------------------------------------------
   湲곕줉 ??(?????붿옄???곸슜)
   -------------------------------------------------------------------------- */
.cd-tabbar-new {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 14px;
    gap: 0;
    margin-bottom: 20px;
}

.cd-tabbar-new label {
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.cd-tabbar-new input[name="recordTab"] {
    display: none;
}

.cd-tabbar-new .record-tab {
    display: block;
    padding: 10px 0;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    transition: all 0.3s ease;
}

.cd-tabbar-new input:checked+.record-tab {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(64, 108, 180, 0.2);
    font-weight: 800;
}

@media (max-width: 768px) {
    .cd-tabbar-new .record-tab {
        font-size: 12px;
        padding: 8px 0;
    }
}

/* --------------------------------------------------------------------------
   Macro Row List (媛濡쒗삎 ?곸뼇???⑤꼸)
   -------------------------------------------------------------------------- */
.macro-row-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.macro-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    padding: 14px 16px;
    border-left: 4px solid var(--accent-color, #ccc);
    transition: all 0.2s ease;
}

.macro-row:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #e2e8f0;
}

.macro-row-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 80px;
    flex-shrink: 0;
}

.macro-row-icon {
    font-size: 20px;
    line-height: 1;
}

.macro-row-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}

.macro-row-center {
    flex: 1;
    min-width: 0;
}

.macro-row-stats {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.macro-row-stats .stat-main {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent-color, #406CB4);
}

.macro-row-stats .stat-sep {
    color: #cbd5e1;
    font-size: 10px;
}

.macro-row-stats .stat-sub {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.macro-row-bar {
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.macro-row-bar-fill {
    height: 100%;
    background: var(--accent-color, #406CB4);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.macro-row-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 50px;
    flex-shrink: 0;
}

.macro-row-status {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

/* 紐⑤컮??諛섏쓳??*/
@media (max-width: 768px) {
    .macro-row {
        padding: 12px 14px;
        gap: 10px;
    }

    .macro-row-left {
        min-width: 70px;
    }

    .macro-row-icon {
        font-size: 18px;
    }

    .macro-row-name {
        font-size: 13px;
    }

    .macro-row-stats {
        gap: 3px;
    }

    .macro-row-stats .stat-main {
        font-size: 14px;
    }

    .macro-row-stats .stat-sub {
        font-size: 11px;
    }

    .macro-row-stats .stat-sep {
        font-size: 8px;
    }

    .macro-row-right {
        min-width: 40px;
    }

    .macro-row-status {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* ?덈꺼 ?쇰꺼 (怨좊떒諛???⑤갚 ?? */
.stat-level {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
    white-space: nowrap;
}

.stat-level.level-high {
    background: #dcfce7;
    color: #166534;
}

.stat-level.level-mid {
    background: #fef9c3;
    color: #854d0e;
}

.stat-level.level-low {
    background: #fee2e2;
    color: #991b1b;
}

.stat-me {
    color: #8b5cf6;
    font-weight: 600;
}

@media (max-width: 768px) {
    .stat-level {
        font-size: 9px;
        padding: 2px 4px;
    }

    .stat-me {
        font-size: 10px;
    }
}

/* --------------------------------------------------------------------------
   ?곸뼇???곸꽭 ?뺣낫 ?좉? ?ㅽ???
   -------------------------------------------------------------------------- */
.macro-detail-toggle {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
    padding: 0 4px;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.toggle-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

.toggle-btn.active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
    box-shadow: inset 0 1px 2px rgba(37, 99, 235, 0.05);
}

.toggle-icon {
    font-size: 14px;
}

/* ?곸꽭 ?뺣낫 湲곕낯?곸쑝濡??④? */
.stat-detail {
    display: none !important;
}

/* ?쒖꽦?????쒖떆 */
.show-details .stat-detail {
    display: inline !important;
}

/* 紐⑤컮??議곗젙 */
@media (max-width: 768px) {
    .macro-detail-toggle {
        margin-bottom: 8px;
    }

    .toggle-btn {
        padding: 5px 10px;
        font-size: 10px;
    }
}

.macro-row-water {
    flex-wrap: wrap;
    align-items: flex-start;
    padding-bottom: 10px;
}

.macro-row-water .macro-row-center {
    flex: 1;
}

.hydration-target {
    color: #5b9bd5;
    font-weight: 600;
}

.hydration-breakdown {
    display: flex;
    gap: 12px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.hydration-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #64748b;
}

.hydration-item .hyd-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.hydration-item.food-water .hyd-dot {
    background: #38bdf8;
}

.hydration-item.drink-water .hyd-dot {
    background: #22c55e;
}

.hydration-item.fluid-water .hyd-dot {
    background: #a855f7;
}

.hydration-item.metabolic-water .hyd-dot {
    background: #f97316;
}

.hydration-item .hyd-label {
    color: #94a3b8;
}

.hydration-item .hyd-val {
    font-weight: 700;
    color: #334155;
}

.hydration-bar-track {
    display: flex;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.hydration-bar-fill {
    height: 100%;
    transition: width 0.4s ease;
}

.hydration-bar-fill.food-water {
    background: linear-gradient(90deg, #38bdf8, #0ea5e9);
}

.hydration-bar-fill.drink-water {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.hydration-bar-fill.fluid-water {
    background: linear-gradient(90deg, #a855f7, #9333ea);
}

.hydration-bar-fill.metabolic-water {
    background: linear-gradient(90deg, #f97316, #ea580c);
}

.hydration-status {
    min-width: 60px;
    text-align: right;
}

.hydration-total-pct {
    font-size: 16px;
    font-weight: 800;
    color: #5b9bd5;
}

.hydration-message {
    width: 100%;
    font-size: 11px;
    color: #64748b;
    text-align: center;
    padding: 6px 0;
    margin-top: -5px;
    margin-bottom: 10px;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

/* 紐⑤컮??*/
@media (max-width: 768px) {
    .hydration-breakdown {
        gap: 8px;
    }

    .hydration-item {
        font-size: 11px;
    }

    .hydration-total-pct {
        font-size: 14px;
    }

    .hydration-message {
        font-size: 10px;
    }
}

/* --------------------------------------------------------------------------
   ?넅 ??P) 異붿젙 諛곗? ?ㅽ???
   -------------------------------------------------------------------------- */
.phos-estimate-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 4px;
    vertical-align: middle;
}

/* --------------------------------------------------------------------------
   ?ㄾ 援ы넗 ?좏삎 ?좏깮 洹몃━??
   -------------------------------------------------------------------------- */
.vomit-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.vomit-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 90px;
}

.vomit-type-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.vomit-type-btn.selected {
    border-color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 4px 12px rgba(64, 108, 180, 0.2);
}

.vomit-type-btn.vomit-type-warning {
    border-color: #fecaca;
    background: #fef2f2;
}

.vomit-type-btn.vomit-type-warning:hover {
    border-color: #f87171;
    background: #fee2e2;
}

.vomit-type-btn.vomit-type-warning.selected {
    border-color: #ef4444;
    background: #fee2e2;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.vomit-type-emoji {
    font-size: 28px;
    margin-bottom: 6px;
    line-height: 1;
}

.vomit-type-label {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.vomit-type-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.3;
}

/* 湲곗〈 湲곕줉??援ы넗 ?좏삎 ?쒖떆 */
.existing-record-vomit-type {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: #eff6ff;
    padding: 2px 8px;
    border-radius: 6px;
    margin-right: 6px;
    flex-shrink: 0;
}

/* 紐⑤컮??諛섏쓳??*/
@media (max-width: 480px) {
    .vomit-type-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .vomit-type-btn {
        padding: 12px 8px;
        min-height: 80px;
    }

    .vomit-type-emoji {
        font-size: 24px;
    }

    .vomit-type-label {
        font-size: 13px;
    }

    .vomit-type-desc {
        font-size: 10px;
    }
}

/* --------------------------------------------------------------------------
   Pet Mini Profile
   -------------------------------------------------------------------------- */
.pet-profile-summary {
    animation: fadeInDownPet 0.4s ease-out;
}

@keyframes fadeInDownPet {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pet-profile-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: -5px;
}

.pet-profile-age-box {
    text-align: center;
    border-right: 1px solid #f1f5f9;
    padding-right: 15px;
    min-width: 60px;
}

.pet-profile-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 2px;
}

.pet-profile-val {
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
}

.pet-disease-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pet-disease-tag {
    font-size: 12px;
    font-weight: 600;
    color: #406CB4;
    background: #EEF4FF;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(64, 108, 180, 0.1);
}


/* --------------------------------------------------------------------------
   AI Chat Quick Chips
   -------------------------------------------------------------------------- */
.ai-quick-chips {
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    overflow-x: auto;
    background: #fff;
    /* border-top: 1px solid #f1f5f9; */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ai-quick-chips::-webkit-scrollbar {
    display: none;
}

.quick-chip {
    flex-shrink: 0;
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.quick-chip:hover {
    background: #EEF4FF;
    border-color: #406CB4;
    color: #406CB4;
}


.ai-quick-chips:active {
    cursor: grabbing;
    cursor: -webkit-grabbing;
}

.quick-chip {
    user-select: none;
    -webkit-user-drag: none;
}

/* --------------------------------------------------------------------------
   Quick Select (Recent Foods)
   -------------------------------------------------------------------------- */
.quick-food-container {
    margin-top: 15px;
    margin-bottom: 5px;
}

.quick-food-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-gray);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.quick-food-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 5px 2px 15px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.quick-food-list::-webkit-scrollbar {
    display: none;
}

.quick-food-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    width: 64px;
    cursor: pointer;
    transition: transform 0.2s;
}

.quick-food-item:active {
    transform: scale(0.95);
}

.quick-food-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #f1f5f9;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s;
}

.quick-food-item:hover .quick-food-circle {
    border-color: var(--primary);
}

.quick-food-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-food-name {
    font-size: 11px;
    color: var(--text-gray);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    font-weight: 500;
}



/* 섭취율 뱃지 및 제공량 UI 스포일러 */
.intake-percent-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #EEF4FF;
    color: #406CB4;
    font-size: 12px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 99px;
    border: 1px solid rgba(64, 108, 180, 0.15);
}

.intake-percent-badge.done {
    background: #DCFCE7;
    color: #166534;
    border-color: rgba(22, 101, 52, 0.15);
}

.intake-percent-badge.sm {
    font-size: 11px;
    padding: 2px 7px;
}

.add-record-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .add-record-grid {
        grid-template-columns: 80px 1fr 1fr;
        gap: 8px;
    }
}

/* 식단 카드 진행바 스타일 */
.food-card-progress-wrapper {
    margin-top: 16px;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    position: relative;
    overflow: visible;
}

.food-card-progress-bar {
    height: 100%;
    border-radius: 3px;
    background: #406CB4;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.food-card-progress-bar.done {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.2);
}

.food-card-progress-text {
    position: absolute;
    top: -18px;
    right: 0;
    font-size: 12px;
    font-weight: 800;
    color: #406CB4;
}

.food-card-progress-bar.done+.food-card-progress-text {
    color: #166534;
}