:root {
    --color-bg: #f7f6f1;
    --color-surface: #ffffff;
    --color-text: #1a1f2e;
    --color-muted: #5b6478;
    --color-accent: #2f7d4f;
    --color-accent-soft: #e3f1e8;
    --color-warn: #c0432a;
    --color-warn-soft: #fbe7e1;
    --color-border: #e3e2dc;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(20, 28, 40, 0.06);
    --font-base: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo",
                 "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* ─── Keyword emphasis (3 levels) ─── */
b { font-weight: 700; }
b.kw2 { font-weight: 700; color: #2451b5; }
b.kw3 { font-weight: 700; color: #c0432a; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-base);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

/* ─── Header ─── */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.site-header__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.site-header__logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--color-accent);
    color: #fff;
    font-size: 14px;
}
.site-header__logo-text {
    font-size: 18px;
}
/* ─── Header right (아바타 + 햄버거) ─── */
.site-header__right {
    display: flex;
    align-items: center;
    gap: 6px;
}
.site-header__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    background: var(--color-accent);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.12s, transform 0.08s;
}
.site-header__avatar:hover { filter: brightness(1.08); }
.site-header__avatar:active { transform: scale(0.95); }

/* ─── Header hamburger menu button ─── */
.site-header__menu-btn {
    appearance: none;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 10px;
    transition: background 0.12s;
}
.site-header__menu-btn:hover { background: #f4f3ed; }
.site-header__menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
}

/* ─── Drawer (slide-in from right) ─── */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 28, 40, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 199;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.drawer-backdrop[hidden] { display: none; }
.drawer-backdrop.is-open { opacity: 1; }

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(82vw, 320px);
    height: 100%;
    background: var(--color-surface);
    box-shadow: -16px 0 48px rgba(20, 28, 40, 0.15);
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
}
.drawer[hidden] { display: none; }
.drawer.is-open { transform: translateX(0); }

.drawer__head {
    padding: 20px 22px 18px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.drawer__profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.drawer__profile-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}
.drawer__profile-nickname {
    font-weight: 700;
    font-size: 15px;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.drawer__profile-empty {
    margin: 0;
    color: var(--color-muted);
    font-size: 14px;
}
.drawer__close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-muted);
    font-size: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}
.drawer__close:hover { background: #f4f3ed; color: var(--color-text); }

.drawer__nav {
    flex: 1;
    padding: 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.drawer__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 15px;
    font-weight: 600;
    transition: background 0.12s, color 0.12s;
}
.drawer__link:hover { background: #f4f3ed; }
.drawer__link.is-active {
    background: var(--color-accent-soft);
    color: var(--color-accent);
}
.drawer__link-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.drawer__foot {
    padding: 16px 22px 22px;
    border-top: 1px solid var(--color-border);
}
.drawer__logout {
    width: 100%;
    appearance: none;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 600;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.drawer__logout:hover {
    background: var(--color-warn-soft);
    color: var(--color-warn);
    border-color: var(--color-warn);
}
.drawer__login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: #FEE500;
    color: #191919;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    transition: filter 0.12s;
}
.drawer__login:hover { filter: brightness(0.96); }

/* ─── Login page ─── */
.login-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 48px 40px;
    text-align: center;
    box-shadow: var(--shadow);
    max-width: 480px;
    margin: 40px auto;
}
.login-card__eyebrow {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.08em;
}
.login-card__title {
    margin: 0 0 16px;
    font-size: 24px;
    color: var(--color-text);
}
.login-card__desc {
    margin: 0 0 28px;
    color: var(--color-muted);
    font-size: 15px;
    line-height: 1.55;
}
.kakao-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: #FEE500;
    color: #191919;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    transition: filter 0.12s, transform 0.08s;
}
.kakao-btn:hover { filter: brightness(0.96); }
.kakao-btn:active { transform: scale(0.97); }
.login-card__note {
    margin: 28px 0 0;
    font-size: 13px;
    color: var(--color-muted);
}
.login-card__note a {
    color: var(--color-accent);
    text-decoration: underline;
}

/* ─── Hero ─── */
.hero {
    background: linear-gradient(140deg, #ffffff 0%, #effaf2 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 40px 36px;
    box-shadow: var(--shadow);
    margin-bottom: 36px;
}
.hero__eyebrow {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.08em;
}
.hero__title {
    margin: 0 0 16px;
    font-size: 30px;
    line-height: 1.35;
    letter-spacing: -0.02em;
}
.hero__desc {
    margin: 0 0 20px;
    color: var(--color-muted);
    font-size: 15px;
    max-width: 720px;
}
.hero__quick {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.hero__quick li {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--color-muted);
}
.hero__quick strong {
    display: block;
    font-size: 13px;
    color: var(--color-text);
    margin-bottom: 4px;
}

/* ─── Common (rules + forbidden) ─── */
.common {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 0 0 32px;
}
.common__card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
}
.common__card--forbidden {
    background: linear-gradient(135deg, #fff 0%, #fcefe9 100%);
}
.common__title {
    margin: 0 0 14px;
    font-size: 16px;
    color: var(--color-text);
    letter-spacing: -0.01em;
}
.common__card--forbidden .common__title { color: var(--color-warn); }
.common__rules,
.common__forbidden {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
}
.common__rules li,
.common__forbidden li {
    margin-bottom: 6px;
}

/* ─── Week tabs (HTMX) ─── */
.week-tabs {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 6px;
    margin: 0 0 16px;
    box-shadow: 0 8px 24px rgba(20, 28, 40, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.week-tabs.is-hidden {
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
}
.week-tabs__tab {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--color-muted);
    font-size: 15px;
    font-weight: 600;
    padding: 12px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease;
}
.week-tabs__tab:hover {
    background: var(--color-accent-soft);
    color: var(--color-accent);
}
.week-tabs__tab.is-active {
    background: var(--color-accent);
    color: #fff;
}

/* HTMX swap transition */
.week-content.htmx-swapping #week-card {
    opacity: 0;
    transition: opacity 0.12s ease;
}
.week-content.htmx-settling #week-card {
    opacity: 1;
    transition: opacity 0.18s ease;
}

/* ─── Week card ─── */
.week {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}
.week__head {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--color-border);
}
.week__badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}
.week__title {
    margin: 0 0 6px;
    font-size: 22px;
    letter-spacing: -0.01em;
}
.week__summary {
    margin: 0;
    color: var(--color-muted);
    font-size: 15px;
}

.week__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.week__card {
    background: #fbfaf6;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
}
.week__row .week__card {
    margin-bottom: 0;
}

.week__card-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.week__card-note {
    margin-left: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-muted);
    text-transform: none;
    letter-spacing: 0;
}
.week__card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--color-text);
    font-size: 14.5px;
}
.week__card ul li {
    margin-bottom: 4px;
}
.week__card p {
    margin: 0;
    color: var(--color-text);
    font-size: 14.5px;
}

/* ─── Allowed food groups ─── */
.food-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.food-group {
    background: var(--color-accent-soft);
    border-radius: 10px;
    padding: 12px 14px;
}
.food-group__label {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-accent);
}
.food-group ul {
    padding-left: 16px;
    font-size: 14px;
}

/* ─── Daily schedule table (row = Day, col = meal slot) ─── */
.schedule {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    table-layout: fixed;
}
.schedule__day-head,
.schedule__slot-head {
    padding: 10px 4px;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    color: var(--color-muted);
    background: #fbfaf6;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}
.schedule__day-head {
    width: 44px;
    border-right: 1px solid var(--color-border);
}
.schedule__row th.schedule__day {
    width: 44px;
    padding: 10px 4px;
    font-weight: 600;
    font-size: 13px;
    color: var(--color-text);
    text-align: center;
    background: #fbfaf6;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px dashed var(--color-border);
    white-space: nowrap;
}
.schedule__row:last-child th.schedule__day,
.schedule__row:last-child .schedule__cell { border-bottom: 0; }

.schedule__cell {
    padding: 10px 6px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px dashed var(--color-border);
    background: var(--color-surface);
}
.schedule__cell--fasting {
    background: linear-gradient(135deg, #fbe7e1 0%, #fbeae3 100%);
}
.schedule__row--fasting th.schedule__day {
    background: #fbeae3;
    color: var(--color-warn);
}

/* ─── Meal pill — 7자(탄수화물제한식) 1줄 fit 기준 폭 + nowrap ─── */
.meal-pill {
    display: inline-block;
    padding: 7px 6px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.25;
    border: 1px solid transparent;
    white-space: nowrap;
    text-align: center;
    min-width: 88px;
    box-sizing: border-box;
}
/* 7자 라벨만 작게 — min-width 88px 안에 1줄로 들어가는 폰트 */
.meal-pill--restricted { font-size: 10px; }
.meal-pill--shake {
    background: #e8eef9;
    color: #3158a0;
    border-color: #cdd9ef;
}
.meal-pill--low-carb {
    background: #e3f1e8;
    color: #1f6d3f;
    border-color: #c5e1d0;
}
.meal-pill--restricted {
    background: #c8e6d2;
    color: #15532e;
    border-color: #a8d2b5;
}
.meal-pill--normal {
    background: #fff3c4;
    color: #7a5a10;
    border-color: #f1dc8a;
}
.meal-pill--fasting {
    background: #fbe1d9;
    color: #c0432a;
    border-color: #f0c2b3;
}

/* ─── Hero compact (checklist) ─── */
.hero--compact {
    padding: 28px 32px;
    margin-bottom: 16px;
}
.hero--compact .hero__title {
    font-size: 22px;
    margin-bottom: 10px;
}
.hero--compact .hero__desc {
    margin-bottom: 0;
}

/* ─── Checklist toolbar ─── */
.checklist-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.checklist-summary {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 14px;
    color: var(--color-muted);
}
.checklist-summary__count {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-accent);
    margin: 0 2px;
}
.checklist-summary__total {
    color: var(--color-muted);
}
.btn {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.btn--ghost {
    background: transparent;
    color: var(--color-muted);
}
.btn--ghost:hover {
    color: var(--color-warn);
    border-color: var(--color-warn-soft);
    background: var(--color-warn-soft);
}

/* ─── Checklist week section ─── */
.checklist-week {
    margin-bottom: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
}
.checklist-week__head {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* ─── Help button (?) ─── */
.help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid var(--color-accent);
    background: transparent;
    color: var(--color-accent);
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.12s, transform 0.08s;
}
.help-btn:hover {
    background: var(--color-accent-soft);
}
.help-btn:active {
    transform: scale(0.94);
}
.checklist-week__title {
    margin: 0;
    font-size: 17px;
    color: var(--color-accent);
}

/* ─── Checklist table ─── */
.checklist {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}
.checklist__day-head,
.checklist__slot-head {
    padding: 8px 4px;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    color: var(--color-muted);
    background: #fbfaf6;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}
.checklist__day-head { width: 44px; }

.checklist__row th.checklist__day {
    padding: 10px 4px;
    font-weight: 600;
    font-size: 13px;
    color: var(--color-text);
    text-align: center;
    border-bottom: 1px dashed var(--color-border);
    white-space: nowrap;
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition: background-color 0.12s;
}
.checklist__row th.checklist__day:hover { background-color: #efece2; }
/* 드래그 중인 행 — 들린 느낌(그림자+스케일+강조 외곽선)으로 인지 강화 */
.checklist__row.is-dragging {
    background: #fbf6e6;
    outline: 2px solid var(--color-accent);
    outline-offset: -2px;
    box-shadow: 0 12px 30px rgba(20, 28, 40, 0.28);
    transform: scale(1.015);
    position: relative;
    z-index: 8;
}
.checklist__row.is-dragging th.checklist__day,
.checklist__row.is-dragging .checklist__cell { background-color: #fbf6e6; }
.checklist__row.is-dragging th.checklist__day { cursor: grabbing; color: var(--color-accent); }
.checklist__cell {
    padding: 8px 4px;
    text-align: center;
    border-bottom: 1px dashed var(--color-border);
    transition: background-color 0.15s;
    cursor: pointer;
}
.checklist__row:last-child .checklist__day,
.checklist__row:last-child .checklist__cell { border-bottom: 0; }

/* Pill button — 7자 1줄 fit 기준 폭 + nowrap, 예비 상태 (흰 배경 regular) */
.checklist__pill {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 7px 6px;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.25;
    cursor: pointer;
    font-family: inherit;
    background-color: #ffffff;
    color: var(--color-muted);
    text-align: center;
    white-space: nowrap;
    min-width: 88px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    transition: background-color 0.15s, color 0.15s, font-weight 0.15s, border-color 0.15s, transform 0.08s;
}
.checklist__pill:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}
.checklist__pill:active {
    transform: scale(0.97);
}
.checklist__pill:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(47, 125, 79, 0.35);
}
/* 7자 라벨만 작게 (탄수화물제한식 = data-current="restricted") */
.checklist__cell[data-current="restricted"] .checklist__pill { font-size: 10px; }

/* Confirmed cell — pill 컬러 적용 + bold */
.checklist__cell.is-confirmed .checklist__pill { font-weight: 700; }
.checklist__cell.is-confirmed[data-current="shake"] .checklist__pill      { background-color: #e8eef9; color: #3158a0; border-color: #cdd9ef; }
.checklist__cell.is-confirmed[data-current="low-carb"] .checklist__pill   { background-color: #e3f1e8; color: #1f6d3f; border-color: #c5e1d0; }
.checklist__cell.is-confirmed[data-current="restricted"] .checklist__pill { background-color: #c8e6d2; color: #15532e; border-color: #a8d2b5; }
.checklist__cell.is-confirmed[data-current="normal"] .checklist__pill     { background-color: #fff3c4; color: #7a5a10; border-color: #f1dc8a; }
.checklist__cell.is-confirmed[data-current="fasting"] .checklist__pill    { background-color: #fbe1d9; color: #c0432a; border-color: #f0c2b3; }
.checklist__cell.is-confirmed[data-current="etc"] .checklist__pill        { background-color: #f0eee9; color: #6b5e4d; border-color: #d8d2c3; }

/* (제거됨) 확정 셀 배경 색칠(match=초록/diff=분홍) — 확정 표시는 알약 색·굵기로만 */

/* ─── Meal picker modal ─── */
.picker {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}
.picker[hidden] { display: none; }
.picker__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 28, 40, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.picker__panel {
    position: relative;
    background: var(--color-surface);
    border-radius: 16px;
    padding: 22px 22px 18px;
    width: min(92vw, 380px);
    box-shadow: 0 24px 64px rgba(20, 28, 40, 0.25);
    animation: pickerFadeIn 0.18s ease;
}
@keyframes pickerFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.picker__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--color-border);
}
.picker__close-x {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: inherit;
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
}
.picker__close-x:hover {
    background: #f4f3ed;
    color: var(--color-text);
}
.picker__eyebrow {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.04em;
}
.picker__sep {
    display: inline-block;
    margin: 0 6px;
    color: var(--color-border);
}
.picker__status {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--color-muted);
}
.picker__status[data-confirmed="1"] {
    color: var(--color-accent);
    font-weight: 600;
}
.picker__options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.picker__option {
    padding: 14px 10px;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    background: #ffffff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.12s, transform 0.08s;
    word-break: keep-all;
    min-width: 0;
    white-space: normal;
}
.picker__option:hover {
    border-color: var(--color-text);
}
.picker__option:active {
    transform: scale(0.97);
}
.picker__option.is-active {
    border-color: currentColor;
    box-shadow: 0 0 0 2px currentColor inset;
}
.picker__etc {
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #fbfaf6;
    border: 1px solid var(--color-border);
    border-radius: 10px;
}
.picker__etc[hidden] { display: none; }
.picker__etc-label {
    display: block;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-muted);
}
.picker__etc-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
    color: var(--color-text);
    box-sizing: border-box;
}
.picker__etc-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(47, 125, 79, 0.2);
}
/* ─── Picker tabs (끼니 / 운동) ─── */
.picker__tabs {
    display: flex;
    gap: 4px;
    margin: 0 0 14px;
    padding: 4px;
    background: #fbfaf6;
    border-radius: 10px;
}
.picker__tab {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s, color 0.12s;
}
.picker__tab:hover { color: var(--color-text); }
.picker__tab.is-active {
    background: var(--color-surface);
    color: var(--color-accent);
    box-shadow: 0 1px 4px rgba(20, 28, 40, 0.06);
}

/* ─── Picker pane ─── */
.picker__pane[hidden] { display: none; }
.picker__pane--exercise {
    padding: 14px 14px 4px;
    background: #f3fde0;
    border: 1px solid #cee990;
    border-radius: 10px;
    margin: 0 0 14px;
}
.picker__exercise-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 600;
    color: #3f5a18;
}
.picker__exercise-icon { font-size: 14px; }
.picker__exercise-row {
    display: flex;
    gap: 8px;
    margin: 0 0 10px;
}
.picker__exercise-step {
    width: 44px;
    flex-shrink: 0;
    padding: 8px 0;
    border: 1px solid #cee990;
    border-radius: 8px;
    background: var(--color-surface);
    color: #3f5a18;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.picker__exercise-step:hover { background: #eaf6c8; }
.picker__exercise-input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #cee990;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    background: var(--color-surface);
    color: var(--color-text);
    text-align: center;
    box-sizing: border-box;
}
.picker__exercise-input:focus {
    outline: none;
    border-color: #7eb33b;
    box-shadow: 0 0 0 2px rgba(126, 179, 59, 0.25);
}
.picker__exercise-quick {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.picker__exercise-quick-btn {
    padding: 8px 0;
    border: 1px solid #cee990;
    border-radius: 8px;
    background: var(--color-surface);
    color: #3f5a18;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.picker__exercise-quick-btn:hover { background: #eaf6c8; }

/* ─── Cell exercise badge (운동분 > 0 일 때만 표시, 비대화형) ─── */
.checklist__exercise {
    display: inline-block;
    margin: 4px auto 0;
    padding: 2px 8px;
    border-radius: 999px;
    background: #d4ff52;
    color: #2d4500;
    border: 1px solid rgba(120, 180, 0, 0.5);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.02em;
    box-shadow: 0 0 0 1px rgba(120, 180, 0, 0.15);
    pointer-events: none;
}
.checklist__exercise[hidden] { display: none; }
.picker__footer {
    display: flex;
    gap: 8px;
}
.picker__reset,
.picker__confirm {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.picker__reset {
    background: var(--color-surface);
    color: var(--color-warn);
    border-color: var(--color-warn);
}
.picker__reset:hover {
    background: var(--color-warn-soft);
}
.picker__reset[hidden] { display: none; }
.picker__confirm {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}
.picker__confirm:hover {
    filter: brightness(1.05);
}

/* ─── Guide modal (도움말 팝업) ─── */
.guide-modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: flex;
    align-items: center;
    justify-content: center;
}
.guide-modal[hidden] { display: none; }
.guide-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 28, 40, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.guide-modal__panel {
    position: relative;
    background: var(--color-bg);
    border-radius: 16px;
    width: min(94vw, 760px);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(20, 28, 40, 0.3);
    animation: pickerFadeIn 0.2s ease;
    overflow: hidden;
}
.guide-modal__header {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    gap: 12px;
}
.guide-modal__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-accent);
}
.guide-modal__close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-muted);
    font-size: 20px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}
.guide-modal__close:hover {
    background: #f4f3ed;
    color: var(--color-text);
}
.guide-modal__tabs {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}
.guide-modal__tab {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s, color 0.12s;
}
.guide-modal__tab:hover {
    background: var(--color-accent-soft);
    color: var(--color-accent);
}
.guide-modal__tab.is-active {
    background: var(--color-accent);
    color: #ffffff;
}
.guide-modal__content {
    overflow-y: auto;
    padding: 20px;
    flex: 1;
    background: var(--color-bg);
    -webkit-overflow-scrolling: touch;
}
.guide-modal__loading {
    margin: 24px 0;
    text-align: center;
    color: var(--color-muted);
    font-size: 13px;
}
/* Mobile: 풀스크린 */
@media (max-width: 600px) {
    .guide-modal__panel {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    .guide-modal__header { padding: 14px 16px; }
    .guide-modal__title { font-size: 15px; }
    .guide-modal__tabs { padding: 8px 10px; }
    .guide-modal__tab { font-size: 12px; padding: 7px 4px; }
    .guide-modal__content { padding: 14px; }
}

/* ─── Cautions ─── */
.cautions {
    margin: 36px 0 0;
    background: linear-gradient(135deg, #fffaf3 0%, #fff5ec 100%);
    border: 1px solid #f0d9c4;
    border-radius: var(--radius);
    padding: 24px 28px;
}
.cautions__title {
    margin: 0 0 14px;
    font-size: 16px;
    color: #8a5a2f;
}
.cautions__list {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    color: var(--color-text);
}
.cautions__list li {
    margin-bottom: 8px;
    line-height: 1.55;
}
.cautions__source {
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px dashed #e5c7a5;
    font-size: 12.5px;
    color: var(--color-muted);
    line-height: 1.55;
}

/* ─── Footer ─── */
.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    margin-top: 48px;
}
.site-footer__inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 28px 24px;
}
.site-footer__brand {
    margin: 0 0 6px;
    font-weight: 600;
    font-size: 15px;
}
.site-footer__disclaimer {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
    max-width: 720px;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .common,
    .week__row,
    .hero__quick {
        grid-template-columns: 1fr;
    }
    .food-groups {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .container { padding: 20px 8px 48px; }
    .hero { padding: 28px 20px; }
    .hero__title { font-size: 24px; }
    .week { padding: 18px 8px; }
    .week__title { font-size: 20px; }
    .site-header__inner { padding: 14px 16px; }
    .site-header__logo-text { font-size: 16px; }
    .common__card { padding: 18px 18px; }
    .cautions { padding: 20px 20px; }
    .week__card { padding: 14px 10px; }
    .week__card--schedule { padding: 14px 6px; }
    .schedule__day-head,
    .schedule__slot-head { padding: 8px 2px; font-size: 11px; }
    .schedule__day-head { width: 32px; }
    .schedule__row th.schedule__day { width: 32px; padding: 8px 1px; font-size: 12px; }
    .schedule__cell { padding: 8px 1px; }
    .meal-pill,
    .checklist__pill {
        padding: 6px 4px;
        font-size: 10.5px;
        min-width: 62px;
    }
    /* 7자 라벨은 좁은 모바일에서도 작게 */
    .meal-pill--restricted,
    .checklist__cell[data-current="restricted"] .checklist__pill { font-size: 8.5px; }
    /* picker 옵션은 grid 2-col 자체 폭이라 min-width 영향 X — 자기 폰트/패딩 그대로 */
    .picker__option { min-width: 0; font-size: 12.5px; }

    /* checklist mobile */
    .checklist-week { padding: 16px 10px; }
    .checklist-toolbar { padding: 12px 14px; }
    .checklist-summary { font-size: 13px; }
    .checklist-summary__count { font-size: 18px; }
    .checklist__day-head,
    .checklist__slot-head { padding: 6px 1px; font-size: 11px; }
    .checklist__day-head { width: 28px; }
    .checklist__row th.checklist__day { width: 28px; padding: 6px 1px; font-size: 12px; }
    .checklist__cell { padding: 6px 1px; }
    /* picker mobile — bottom sheet */
    .picker__panel {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        border-radius: 16px 16px 0 0;
        padding: 18px 18px 22px;
        animation: pickerSlideUp 0.22s ease;
    }
    @keyframes pickerSlideUp {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }
    .picker__option {
        padding: 12px 8px;
        font-size: 12.5px;
    }
}

/* ─── 끼니 셀 몸무게 뱃지 — 운동 뱃지처럼 형광색, 아침 셀 아래 표시 ─── */
.checklist__weight {
    display: inline-block;
    margin: 4px auto 0;
    padding: 2px 8px;
    border-radius: 999px;
    background: #d4ff52;
    color: #2d4500;
    border: 1px solid rgba(120, 180, 0, 0.5);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.02em;
    box-shadow: 0 0 0 1px rgba(120, 180, 0, 0.15);
    white-space: nowrap;
    pointer-events: none;
}
.checklist__weight[hidden] { display: none; }

/* ─── 끼니 셀 스왑 드래그 ─── */
body.cell-dragging, body.cell-dragging * { cursor: grabbing !important; }
.checklist__cell.is-swapping {
    opacity: 0.45;
    outline: 2px dashed var(--color-accent);
    outline-offset: -3px;
    border-radius: 8px;
}
.checklist__cell.is-swap-target {
    box-shadow: inset 0 0 0 1px rgba(47, 125, 79, 0.28);
    background-color: rgba(47, 125, 79, 0.05);
    border-radius: 8px;
}
.checklist__cell.is-swap-over {
    box-shadow: inset 0 0 0 2px var(--color-accent);
    background-color: #e3f1e8 !important;
    border-radius: 8px;
}

/* ─── Picker 인바디 탭 ─── */
.picker__pane--inbody { margin: 0 0 14px; }
.picker__inbody-note {
    margin: 0 0 12px;
    font-size: 11.5px;
    color: var(--color-muted);
    background: #fbfaf6;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 8px 10px;
}
.picker__inbody-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 9px;
}
.picker__inbody-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    flex-shrink: 0;
}
.picker__req { color: var(--color-warn); font-style: normal; }
.picker__inbody-inputwrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.picker__inbody-input {
    width: 92px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    text-align: right;
    background: #fff;
    color: var(--color-text);
    box-sizing: border-box;
}
.picker__inbody-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(47, 125, 79, 0.2);
}
.picker__inbody-unit {
    font-size: 12px;
    color: var(--color-muted);
    width: 18px;
}
.picker__inbody-save {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    border: 1px solid var(--color-accent);
    border-radius: 10px;
    background: var(--color-accent);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
}
.picker__inbody-save:hover { filter: brightness(1.05); }

/* ─── 시작일 캘린더 입력 (툴바) ─── */
.checklist-startdate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.checklist-startdate__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-muted);
    white-space: nowrap;
}
.checklist-startdate__input {
    padding: 7px 8px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-surface);
    cursor: pointer;
}
.checklist-startdate__input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(47, 125, 79, 0.2);
}

/* ─── 일차 칸: 일차 숫자 + 달력 날짜(월/일/요일) ─── */
.checklist__day-num { display: block; }
.checklist__day-date {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    color: var(--color-muted);
    white-space: nowrap;
}
.checklist__day-date[hidden] { display: none; }
