/* 목록형(옵션) — 홈피드 카드와 별개. 일기장 톤카드(.timeline-entry-card)는 폐기 */
#timelineContainer .timeline-entry-row {
    overflow: hidden;
    border: 1px solid var(--line, #d0c6ba);
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(43, 40, 37, 0.06), 0 6px 18px rgba(43, 40, 37, 0.07);
}
#timelineContainer .timeline-entry-row > .flex > :first-child {
    border-right: 0 !important;
    background: #f8fafc !important;
}
.timeline-entry-rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #eab308;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
}
.timeline-entry-rating .lucide,
.timeline-entry-rating [data-lucide],
.timeline-entry-rating svg,
.timeline-entry-rating i {
    width: 0.85rem;
    height: 0.85rem;
    flex-shrink: 0;
    fill: currentColor;
}
.timeline-entry-rating__empty {
    color: #cbd5e1;
    fill: none !important;
}
.timeline-entry-rating__count {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: inherit;
    line-height: 1;
}
.timeline-entry-tags {
    clear: both;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 8px;
    overflow-x: auto;
}
.timeline-entry-tag {
    flex-shrink: 0;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}
#timelineContainer [data-mealog-open-date][aria-label$=' 추가'],
#timelineContainer .snack-row [data-mealog-open-date] {
    border-color: #e7ece5 !important;
    border-radius: 9999px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    color: #64748b !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 5px rgba(15, 23, 42, 0.04);
}
#timelineContainer .snack-row {
    min-height: 52px;
    padding: 8px 12px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}
#timelineContainer .snack-tag {
    border-color: transparent;
    background: #f7f9f6;
    color: #64748b;
}

/* 홈피드 v2 — 세로형 기록 카드
 * 일간 공유: 캡처 대상이 .daily-share-capture__sheet 이므로 #dailyShareCardContainer만 쓰면
 * 고스트 캡처에서 썸네일/카드 스타일이 빠짐 → sheet 스코프 필수 */
#timelineContainer .card.home-feed-card,
#dailyShareCardContainer .card.home-feed-card,
.daily-share-capture__sheet .card.home-feed-card {
    background: var(--card, #fff);
    border-radius: 18px !important;
    border: 1px solid var(--line, #d0c6ba);
    box-shadow: 0 1px 0 rgba(43, 40, 37, 0.06), 0 6px 18px rgba(43, 40, 37, 0.07);
    margin-bottom: 10px;
    overflow: hidden;
    transition: transform 0.12s ease;
}
/*
 * 슬롯 그룹 아래 여백은 **화면 타임라인에만** 준다.
 *
 * 공유 캡처에서는 빼야 한다. 캡처의 카드 사이는 행 자신의 margin(4px) 하나로
 * 정해지는데, 여기에 그룹 여백이 더해지면 끼니·간식 뒤에만 14px 이 되어
 * 「메모 사이는 좁고 끼니 사이는 넓은」 들쭉날쭉한 카드가 나온다.
 *
 * 아래에 `.daily-share-capture__body > ...{margin-bottom:0}` 이 있었지만
 * 특정도(0,2,0)가 `#dailyShareCardContainer ...`(1,1,0)를 못 이겨 무력했다 —
 * 그래서 캡처 선택자를 여기서 **빼는** 것으로 끝낸다. 두 규칙이 싸우게 두면
 * 다음에 또 어느 쪽이 이기는지를 따져야 한다.
 */
#timelineContainer .main-slot-card-group,
#timelineContainer .snack-slot-card-group {
    margin-bottom: 10px;
}
#timelineContainer .main-slot-card-group > .card.home-feed-card:last-child,
#timelineContainer .snack-slot-card-group > .card.home-feed-card:last-child,
#timelineContainer > .timeline-date-card > .card.home-feed-card:last-child,
#dailyShareCardContainer .main-slot-card-group > .card.home-feed-card:last-child,
#dailyShareCardContainer .snack-slot-card-group > .card.home-feed-card:last-child,
#dailyShareCardContainer .daily-share-capture__body > .card.home-feed-card:last-child,
.daily-share-capture__sheet .main-slot-card-group > .card.home-feed-card:last-child,
.daily-share-capture__sheet .snack-slot-card-group > .card.home-feed-card:last-child,
.daily-share-capture__sheet .daily-share-capture__body > .card.home-feed-card:last-child {
    margin-bottom: 0;
}
#timelineContainer .card.home-feed-card:active:not(:has(.timeline-meal-photo-nav:active)):not(:has(.timeline-meal-photo-aspect-toggle:active)):not(:has(.timeline-meal-photo-tap:active)) {
    transform: scale(0.985);
}
/* 다장 사진 화살표·비율 토글·사진 확대 탭 조작 시 카드 전체 눌림(스케일) 효과 제거 */
#timelineContainer .card:has(.timeline-meal-photo-nav:active),
#timelineContainer .card:has(.timeline-meal-photo-aspect-toggle:active),
#timelineContainer .card:has(.timeline-meal-photo-tap:active) {
    transform: none !important;
}

/* ── 공유 캡처 공통 (하루기록·베스트) ──
 * html2canvas: flex/grid·aspect-ratio·lucide SVG 대신
 * table-cell + 고정 px + 텍스트 ★ 로 정렬 오차 최소화
 */
#dailyShareCardContainer.daily-share-capture,
.daily-share-capture,
#bestSharePreview .best-share-capture {
    box-sizing: border-box;
    background: transparent;
    margin: 0 auto;
}
.daily-share-capture__sheet,
.best-share-capture__sheet {
    width: 420px;
    max-width: 420px;
    margin: 0 auto;
    border: 1px solid #e4ddd4;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}
.daily-share-capture__head,
.best-share-capture__head {
    background: #fff;
    padding: 12px 18px;
    border-bottom: 1px solid #c8bfb4;
}
.daily-share-capture__brand-row,
.best-share-capture__brand-row {
    display: table;
    width: 100%;
    table-layout: fixed;
    margin-bottom: 0;
}
.daily-share-capture__brand-group,
.best-share-capture__brand-group {
    display: table-cell;
    vertical-align: bottom;
    white-space: nowrap;
    /* Fredoka(mealog) ↔ Pretendard(보조) 하단 맞춤 */
    font-size: 0;
}
.daily-share-capture__brand,
.daily-share-capture__brand.mealog-title,
.best-share-capture__brand,
.best-share-capture__brand.mealog-title {
    display: inline-block;
    vertical-align: bottom;
    font-family: 'Fredoka', sans-serif;
    font-size: 26px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #3cb889;
    text-transform: lowercase;
}
/* mealog 옆 보조 타이틀 — 보완 크기·색, 볼드 없음 */
.daily-share-capture__brand-sub,
.best-share-capture__brand-sub {
    display: inline-block;
    vertical-align: bottom;
    margin-left: 7px;
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #9a9187;
    /* Fredoka 시각적 베이스라인에 맞춘 미세 보정 */
    padding-bottom: 2px;
}
.daily-share-capture__date,
.best-share-capture__date {
    display: table-cell;
    vertical-align: bottom;
    text-align: right;
    font-family: 'Pretendard', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #8b8278;
    letter-spacing: -0.01em;
    line-height: 1;
    white-space: nowrap;
    padding-bottom: 2px;
}
.daily-share-capture__body {
    padding: 10px 10px 12px;
    background: #f7f3ee;
    box-sizing: border-box;
}
.best-share-capture__body {
    padding: 6px 14px 12px;
    background: #fff;
    box-sizing: border-box;
}
/* 캡처의 그룹은 여백을 갖지 않는다 — 카드 사이는 행의 margin 하나가 정한다 */
.daily-share-capture__body > .main-slot-card-group,
.daily-share-capture__body > .snack-slot-card-group {
    margin-bottom: 0;
}
.daily-share-capture__empty {
    padding: 28px 12px;
    text-align: center;
}
.daily-share-capture__empty p {
    margin: 0;
    font-family: 'Pretendard', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #a8a29e;
    line-height: 1.5;
}

/* 캡처 행: table + 고정 높이 */
.daily-share-capture__sheet .share-cap-row,
.best-share-capture__sheet .share-cap-row {
    /* 카드 사이 4px — 코멘트 줄이 붙으며 행이 높아진 만큼 사이를 좁혀 한 장에 더 담는다.
       (베스트는 바로 아래에서 margin:0 으로 덮으므로 영향 없다) */
    margin: 0 0 4px;
    background: #fff;
    border: 1px solid #ebe4db;
    border-radius: 14px;
    /* 행 overflow:hidden이면 캡처 시 하단 글리프가 잘림 → visible */
    overflow: visible;
    box-sizing: border-box;
    pointer-events: none;
}
.best-share-capture__sheet .share-cap-row {
    margin: 0;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid #c8bfb4;
    background: transparent;
}
.best-share-capture__sheet .share-cap-row:last-child {
    border-bottom: 0;
}
.daily-share-capture__sheet .share-cap-row__inner,
.best-share-capture__sheet .share-cap-row__inner {
    display: table;
    width: 100%;
    table-layout: fixed;
    height: 92px;
    border-collapse: separate;
    border-spacing: 0;
    box-sizing: border-box;
}
/* 베스트: 썸네일 87px(+30%) + 상하 여백 7px(기존 대비 50%) → 행 101px */
.best-share-capture__sheet .share-cap-row__inner--best {
    height: 101px;
}
/* 세로 정렬: vertical-align:top + 고정 padding-top
 * (middle은 html2canvas가 브라우저와 다르게 계산 → 텍스트가 아래로 잠김) */
.daily-share-capture__sheet .share-cap-cell,
.best-share-capture__sheet .share-cap-cell {
    display: table-cell;
    vertical-align: top;
    height: 92px;
    box-sizing: border-box;
    font-family: 'Pretendard', sans-serif;
}
.best-share-capture__sheet .share-cap-cell {
    height: 101px;
}
/* 하루기록: 사진이 카드 왼·상·하에 여백 없이 행 높이만큼 채움.
   너비는 행 높이의 1.5배(3:2) — 세로는 행 높이에 묶여 있으므로 넓힌 만큼 비율이 눕는다.
   2배(184px)까지 넓히면 제목 칸이 98px 로 눌려 두 줄로도 대부분 잘린다. */
.daily-share-capture__sheet .share-cap-cell--thumb {
    width: 138px;
    padding: 0;
    height: 92px;
    vertical-align: top;
}
.best-share-capture__sheet .share-cap-cell--thumb {
    width: 99px;
    padding: 7px 0;
}
.daily-share-capture__sheet .share-cap-cell--rank,
.best-share-capture__sheet .share-cap-cell--rank {
    width: 28px;
    padding: 32px 4px 0 2px;
    text-align: center;
    font-size: 15px;
    font-weight: 800;
    line-height: 20px;
    letter-spacing: -0.03em;
    color: #1c1917;
    font-variant-numeric: tabular-nums;
}
.best-share-capture__sheet .share-cap-cell--rank {
    padding-top: 40px;
}
.daily-share-capture__sheet .share-cap-cell--icon {
    width: 58px;
    padding: 28px 0 0 14px; /* 사진과의 간격 +10px */
}
.daily-share-capture__sheet .share-cap-row__inner:not(.share-cap-row__inner--photo) .share-cap-cell--icon {
    width: 56px;
    padding-left: 12px;
}
.daily-share-capture__sheet .share-cap-cell--text,
.best-share-capture__sheet .share-cap-cell--text {
    /* 위쪽을 조금 올리고, 아래에 클립 여유를 크게 둠 */
    padding: 18px 8px 10px;
    overflow: visible;
}
.best-share-capture__sheet .share-cap-cell--text {
    padding: 28px 8px 12px;
    overflow: visible;
}
/* 별점 열은 **베스트 카드 전용**이다 — 하루 기록 카드에서는 이름 줄 끝으로 옮겼다 */
.best-share-capture__sheet .share-cap-cell--stars {
    width: 56px;
    padding: 36px 12px 0 0;
    text-align: right;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    letter-spacing: 0.5px;
    color: #d4a017;
}
.best-share-capture__sheet .share-cap-cell--stars {
    padding-top: 42px;
}

.daily-share-capture__sheet .share-cap-thumb {
    position: relative;
    display: block;
    width: 138px;
    height: 92px;
    /* 카드 좌측 모서리와 맞춤 (border-radius 14px − 1px border) */
    border-radius: 13px 0 0 13px;
    overflow: hidden;
    background: #ece7e1;
    box-sizing: border-box;
}
.best-share-capture__sheet .share-cap-thumb {
    position: relative;
    display: block;
    width: 87px;
    height: 87px;
    border-radius: 12px;
    overflow: hidden;
    background: #ece7e1;
    box-sizing: border-box;
}
.daily-share-capture__sheet .share-cap-thumb__img {
    display: block;
    width: 138px;
    height: 92px;
    object-fit: cover;
    border: 0;
}
.best-share-capture__sheet .share-cap-thumb__img {
    display: block;
    width: 87px;
    height: 87px;
    object-fit: cover;
    border: 0;
}
.daily-share-capture__sheet .share-cap-thumb--empty,
.best-share-capture__sheet .share-cap-thumb--empty {
    text-align: center;
    line-height: 87px;
    color: #a8a29e;
    background: #f1ebe4;
}
.daily-share-capture__sheet .share-cap-thumb--empty {
    line-height: 92px;
}
.best-share-capture__sheet .share-cap-thumb--empty i,
.best-share-capture__sheet .share-cap-thumb--empty svg,
.best-share-capture__sheet .share-cap-thumb--empty .lucide {
    display: inline-block;
    width: 32px !important;
    height: 32px !important;
    vertical-align: middle;
    stroke: currentColor;
    color: #a8a29e;
}
.daily-share-capture__sheet .share-cap-thumb__badge {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
    padding: 1px 5px;
    border-radius: 999px;
    background: rgba(28, 25, 23, 0.72);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 12px;
    font-family: 'Pretendard', sans-serif;
}

.daily-share-capture__sheet .share-cap-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    text-align: center;
    box-sizing: border-box;
    overflow: hidden;
    background: #f8fafc;
    color: #94a3b8;
}
.daily-share-capture__sheet .share-cap-icon.home-feed-card__icon--tone-morning {
    background: #fffbeb;
    color: #d97706;
}
.daily-share-capture__sheet .share-cap-icon.home-feed-card__icon--tone-lunch {
    background: #ecfdf5;
    color: #059669;
}
.daily-share-capture__sheet .share-cap-icon.home-feed-card__icon--tone-dinner {
    background: #f0f9ff;
    color: #0284c7;
}
.daily-share-capture__sheet .share-cap-icon.home-feed-card__icon--tone-default,
.daily-share-capture__sheet .share-cap-icon.home-feed-card__icon--tone-pre_morning,
.daily-share-capture__sheet .share-cap-icon.home-feed-card__icon--tone-snack1,
.daily-share-capture__sheet .share-cap-icon.home-feed-card__icon--tone-snack2,
.daily-share-capture__sheet .share-cap-icon.home-feed-card__icon--tone-night {
    background: #f8fafc;
    color: #94a3b8;
}
.daily-share-capture__sheet .share-cap-icon.home-feed-card__icon--tone-journal,
.daily-share-capture__sheet .share-cap-icon.home-feed-card__icon--tone-daily_journal {
    background: #f5f3ff;
    color: #7c3aed;
}
.daily-share-capture__sheet .share-cap-icon--meal {
    background: #ecfdf5;
    color: #059669;
}
.daily-share-capture__sheet .share-cap-icon--snack {
    background: #f8fafc;
    color: #94a3b8;
}
.daily-share-capture__sheet .share-cap-icon--journal {
    background: #f5f3ff;
    color: #7c3aed;
}
.daily-share-capture__sheet .share-cap-icon i,
.daily-share-capture__sheet .share-cap-icon svg,
.daily-share-capture__sheet .share-cap-icon .lucide {
    display: block;
    width: 1.125rem !important;
    height: 1.125rem !important;
    vertical-align: middle;
    stroke: currentColor;
    color: inherit;
}

/* 캡처 시 글리프가 아래로 밀려도 잘리지 않게 line-height·하단 패딩 여유 */
.daily-share-capture__sheet .share-cap-meta,
.best-share-capture__sheet .share-cap-meta {
    margin: 0 0 3px;
    padding: 0 0 3px;
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    letter-spacing: -0.01em;
    color: #8b8278;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/*
 * 하루 기록 카드의 이름 줄은 «이름 … 별점» 두 칸이다. 이름만 줄어들고 잘리며,
 * 별점은 짧고 오른쪽 끝에 선다 — 장소가 긴 기록에서 별점이 먼저 잘리면 안 된다.
 * 별점이 없는 행은 span 자체를 안 그리므로 이름이 폭을 다 쓴다.
 */
.daily-share-capture__sheet .share-cap-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    overflow: visible;
}
.daily-share-capture__sheet .share-cap-meta__label {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.daily-share-capture__sheet .share-cap-stars {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #d4a017;
    white-space: nowrap;
}
/*
 * 공유 캡처의 코멘트 줄.
 *
 * 굵은 줄(share-cap-title)보다 옅고 작다 — 코멘트는 훑는 값이 아니라 읽는 글이라,
 * 같은 무게를 나눠 가지면 둘 다 안 읽힌다(메모 카드 위계와 같은 규칙).
 *
 * 두 줄까지만 보인다. 한 줄로 자르면 정보가 너무 죽고, 안 자르면 긴 코멘트 하나가
 * 공유 이미지를 통째로 늘린다. 자르는 수는 **line-clamp 가 아니라 max-height** 다 —
 * html2canvas 폴백이 -webkit-box 를 제대로 못 그린다(제목 줄이 같은 이유로 이미
 * max-height 를 쓴다).
 *
 * ⚠ max-height 에 padding 을 더하면 안 된다. `overflow: hidden` 이 자르는 경계는
 * content box 가 아니라 **padding box** 라, 더해 준 만큼 세 번째 줄의 윗동강이
 * 그대로 비친다. 그래서 padding 을 0 으로 두고 두 줄(17px×2 = 34px)만 남긴다 —
 * 아래 여백은 셀의 padding-bottom 8px 이 이미 준다.
 *
 * 베스트 공유 카드는 행 마크업을 따로 만들어 이 줄이 없다 — 선택자를 하루 기록
 * 시트로 한정해 두 카드가 서로의 여백을 밀지 않게 한다.
 */
.daily-share-capture__sheet .share-cap-note {
    margin: 2px 0 0;
    padding: 0;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 17px;
    letter-spacing: -0.01em;
    color: #6f675e;
    overflow: hidden;
    word-break: break-word;
    max-height: 34px;
}
/*
 * 공유 캡처의 태그 줄 — 「공유 항목」에서 켰을 때만 그려진다.
 *
 * 행에서 가장 옅고 가장 작다. 이름 줄(share-cap-meta)과 같은 색을 쓰되 한 급
 * 더 작은 것은, 태그가 «훑는 값»인 이름 줄보다도 곁다리이기 때문이다 — 굵기나
 * 색을 더 주면 코멘트(읽는 글)와 무게가 뒤집힌다.
 *
 * **한 줄이다.** 줄바꿈을 허용하면 태그 많은 끼니 하나가 행을 통째로 늘려
 * 공유 이미지의 세로가 그날 기록에 따라 널뛴다. 말줄임으로 끊는 편이,
 * 잘린 자리가 눈에 보인다는 점에서도 낫다.
 *
 * 칩(배경·라운드)이 아니라 글자인 이유는 `buildShareCaptureTagsHtml` 주석에.
 */
.daily-share-capture__sheet .share-cap-tags {
    margin: 3px 0 0;
    padding: 0;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: -0.01em;
    color: #8b8278;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.daily-share-capture__sheet .share-cap-tag {
    margin-right: 7px;
}
.daily-share-capture__sheet .share-cap-title,
.best-share-capture__sheet .share-cap-title {
    margin: 0;
    padding: 0 0 5px;
    font-size: 15px;
    font-weight: 700;
    line-height: 22px;
    letter-spacing: -0.025em;
    color: #1c1917;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* 하루기록: 썸네일이 넓어져 제목 칸이 좁다 — 한 줄 말줄임 대신 두 줄로 흘린다.
   max-height 는 두 줄(22px×2) + 제목 자신의 padding-bottom 5px = 49px.
   line-clamp 대신 max-height 로 자른다 — html2canvas 폴백이 -webkit-box 를 제대로 못 그린다. */
.daily-share-capture__sheet .share-cap-title {
    white-space: normal;
    word-break: break-word;
    max-height: 49px;
}
/*
 * 하루 소감 본문이 앉는 제목 줄 — 자리는 제목이되 무게는 코멘트 줄과 같다.
 * 굵게 두면 읽는 글이 훑는 값의 무게를 가져가 둘 다 안 읽힌다.
 * 두 줄 = 17px×2 = 34px, padding 은 0 이다 — 이유는 바로 위 share-cap-note 주석에.
 */
.daily-share-capture__sheet .share-cap-title--muted {
    font-size: 12.5px;
    font-weight: 400;
    line-height: 17px;
    letter-spacing: -0.01em;
    color: #6f675e;
    padding-bottom: 0;
    max-height: 34px;
}
/* 두 줄을 92px 행 안에 넣기 위한 세로 예산: meta 21px + 여백 3px + 제목 49px + 위아래 19px = 92px.
   코멘트 줄(share-cap-note)이 붙는 행은 그만큼 넘치는데, 행 높이 92px 는 table 의
   최소값이라 늘어나는 쪽으로 흡수된다 — 잘리지 않는다.
   (베스트는 바로 아래 자체 padding 으로 덮으므로 영향 없다) */
.daily-share-capture__sheet .share-cap-cell--text {
    padding: 11px 8px 8px;
}
/*
 * 코멘트가 없는 행 — 텍스트를 세로 가운데로.
 *
 * 세로 예산은 코멘트 두 줄까지 담는 값이라, 코멘트가 없으면 남는 자리가 통째로
 * 제목 아래에 몰린다. 사진이 있는 행은 썸네일이 곧 행 높이(138×92)라 위처럼
 * 줄일 수도 없어, 남는 만큼을 위아래로 나눠 갖게 한다.
 *
 * 상하 padding 을 같은 값으로 맞춘 뒤 `vertical-align: middle` 에 맡긴다 —
 * 제목이 두 줄로 흐르면 남는 자리가 없어 저절로 예전과 같은 자리에 선다.
 * (셀 기본값이 top 인 것은 html2canvas 가 middle 을 다르게 계산하던 때의 자취다.
 *  그때와 달리 여기는 «남는 여백을 어디에 둘지»의 문제라, 어긋나도 글자가
 *  잘리는 쪽으로는 가지 않는다.)
 */
.daily-share-capture__sheet .share-cap-row__inner--nonote .share-cap-cell--text {
    vertical-align: middle;
    padding-top: 8px;
    padding-bottom: 8px;
}

/*
 * 사진도 코멘트도 없는 행 — 92px 대신 70px.
 *
 * 92px 는 3:2 썸네일(138×92)과 두 줄짜리 코멘트를 담기 위한 예산이다. 둘 다 없는
 * 행에서는 위 계산의 «제목 두 줄» 자리가 비어, 이름 한 줄 밑으로 22px 가 그대로
 * 빈칸이 된다 — 운동·화장실 같은 메모 카드가 그렇고, 「코멘트 빼기」를 켜면 그 날
 * 카드가 전부 그 꼴이 된다.
 *
 * 70px 은 한 줄짜리 내용(이름 줄 24 + 제목 27 + 위아래 8)보다 3px 넉넉한 값이고,
 * 남는 3px 은 바로 위 규칙이 위아래로 나눠 갖는다. 제목이 두 줄로 흐르면
 * table 의 height 는 최소값이라 89px 까지 알아서 늘어난다.
 */
.daily-share-capture__sheet .share-cap-row__inner--compact,
.daily-share-capture__sheet .share-cap-row__inner--compact .share-cap-cell {
    height: 70px;
}
/* 아이콘은 줄어든 행의 한가운데로 — (70 − 36) / 2 */
.daily-share-capture__sheet .share-cap-row__inner--compact .share-cap-cell--icon {
    padding-top: 17px;
}

.home-feed-card__photo {
    /* 기본: 칸 너비 고정, 16:10 + object-cover */
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    background: #e2e8f0;
    overflow: hidden;
    border-bottom: 1px solid var(--line, #d0c6ba);
}
.home-feed-card__photo .timeline-meal-photo-cell,
.home-feed-card__photo .timeline-meal-photo-cell [data-timeline-photo-img] {
    width: 100%;
    height: 100%;
}
/*
 * 토글 ON: 입력시트 비율이 아니라 원본 이미지 고유 비율
 * — 너비 100%, 높이는 이미지 intrinsic ratio
 */
#timelineContainer.timeline-card-photo-aspect-user .home-feed-card__photo {
    aspect-ratio: auto;
    height: auto;
}
#timelineContainer.timeline-card-photo-aspect-user .home-feed-card__photo .timeline-meal-photo-cell {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
}
#timelineContainer.timeline-card-photo-aspect-user .home-feed-card__photo [data-timeline-photo-img] {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    display: block;
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    object-fit: unset !important;
    object-position: center;
    transform: none;
}
/* 밀로그 다장: 좌우 화살표로만 사진 전환 (스와이프는 날짜 이동용) */
.timeline-meal-photo-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: var(--z-photo-nav);
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.48);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, opacity 0.15s ease;
}
.timeline-meal-photo-nav--prev { left: 8px; }
.timeline-meal-photo-nav--next { right: 8px; }
.timeline-meal-photo-nav:hover:not(:disabled) {
    background: rgba(15, 23, 42, 0.68);
}
.timeline-meal-photo-nav:disabled {
    opacity: 0.28;
    cursor: default;
}
.timeline-meal-photo-nav [data-lucide],
.timeline-meal-photo-nav .lucide {
    width: 1.1rem;
    height: 1.1rem;
    stroke-width: 2.5;
}
/* 밀로그 카드: 기본(16:10) ↔ 기록 시 선택한 사진 비율 */
.timeline-meal-photo-aspect-toggle {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: var(--z-photo-nav-toggle);
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.48);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.timeline-meal-photo-aspect-toggle:hover {
    background: rgba(15, 23, 42, 0.68);
}
.timeline-meal-photo-aspect-toggle--active,
.timeline-meal-photo-aspect-toggle[aria-pressed="true"],
#timelineContainer.timeline-card-photo-aspect-user .timeline-meal-photo-aspect-toggle {
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
}
.timeline-meal-photo-aspect-toggle [data-lucide],
.timeline-meal-photo-aspect-toggle .lucide {
    width: 1.05rem;
    height: 1.05rem;
    stroke-width: 2.25;
}
.home-feed-card__body {
    padding: 12px 14px 10px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: calc(10px + 0.5em);
    align-items: center;
}
.home-feed-card--photo .home-feed-card__body {
    padding-top: 12px;
}
.home-feed-card__icon {
    /* 기록추가 슬롯 피커(.entry-slot-picker__icon)와 동일 형태 */
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 0.875rem;
    background: #f8fafc;
    color: #94a3b8;
}
/* 슬롯 피커 Tailwind 톤과 동일 (amber/emerald/sky/violet/slate) */
.home-feed-card__icon--tone-morning {
    background: #fffbeb;
    color: #d97706;
}
.home-feed-card__icon--tone-lunch {
    background: #ecfdf5;
    color: #059669;
}
.home-feed-card__icon--tone-dinner {
    background: #f0f9ff;
    color: #0284c7;
}
.home-feed-card__icon--tone-default,
.home-feed-card__icon--tone-pre_morning,
.home-feed-card__icon--tone-snack1,
.home-feed-card__icon--tone-snack2,
.home-feed-card__icon--tone-night {
    background: #f8fafc;
    color: #94a3b8;
}
.home-feed-card__icon--tone-journal,
.home-feed-card__icon--tone-daily_journal {
    background: #f5f3ff;
    color: #7c3aed;
}
/*
 * 사용자 메모 (docs/user-memo-items.md §4.5) — 중성 색 + 점선.
 * 식사 슬롯은 시간대마다 제 색이 있다. 메모까지 색을 주면 하루가 알록달록해져
 * '이건 밥, 이건 메모'라는 큰 구분이 먼저 안 읽힌다. 낯을 낮추는 쪽을 고른다.
 */
.home-feed-card__icon--tone-memo {
    background: #f8fafc;
    color: #64748b;
    border: 1px dashed #cbd5e1;
}
.home-feed-card.home-feed-card--memo {
    border-style: dashed;
}
/* tone 미지정 폴백 */
.home-feed-card__icon--meal {
    background: #ecfdf5;
    color: #059669;
}
.home-feed-card__icon--snack {
    background: #f8fafc;
    color: #94a3b8;
}
.home-feed-card__icon--journal {
    background: #f5f3ff;
    color: #7c3aed;
}
.home-feed-card__icon i,
.home-feed-card__icon .lucide,
.home-feed-card__icon [data-lucide],
.home-feed-card__icon svg {
    width: 1.125rem;
    height: 1.125rem;
    font-size: 1.125rem;
    line-height: 1;
    color: inherit;
    stroke: currentColor;
}
.home-feed-card__main {
    min-width: 0;
    padding-top: 0;
}
.home-feed-card__main > :last-child {
    margin-bottom: 0;
}
.home-feed-card__meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    min-width: 0;
}
.home-feed-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
    font-size: 13px;
    color: var(--muted, #7a7268);
    font-weight: 500;
    line-height: 1.3;
}
.home-feed-card__share {
    margin-left: 0;
    margin-right: 2px;
    flex-shrink: 0;
}
/* 밀로그 공유됨 표시(상태 아이콘) — 버튼의 공유 아이콘과 별개 */
.timeline-share-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    flex-shrink: 0;
    vertical-align: middle;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #e8eef4;
    color: #64748b;
    box-sizing: border-box;
    line-height: 0;
}
.timeline-share-arrow svg,
.timeline-share-arrow i {
    width: 12px !important;
    height: 12px !important;
    margin: 0 !important;
    display: block;
    flex-shrink: 0;
}
.home-feed-card__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--ink, #241f1c);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 5px;
    word-break: break-word;
}
/*
 * 본문 없는 메모 카드 — 제목 줄이 비면 접는다 (docs/user-memo-items.md §4.5).
 * 이름은 meta 에 있으므로 여기 다시 적지 않는다.
 */
.home-feed-card--memo .home-feed-card__title:empty {
    display: none;
}
.home-feed-card__note {
    font-size: 14px;
    color: #64748b;
    line-height: 1.45;
    margin: 1px 0 4px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.home-feed-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.home-feed-card__tag {
    font-size: 13px;
    color: var(--green-deep, #2d9f74);
    font-weight: 500;
}
.home-feed-card__stars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--star, #eab308);
    font-size: 13px;
    flex: 0 0 auto;
    align-self: center;
    white-space: nowrap;
}
.home-feed-card__stars .lucide,
.home-feed-card__stars [data-lucide],
.home-feed-card__stars svg,
.home-feed-card__stars i {
    width: 0.85rem;
    height: 0.85rem;
    flex-shrink: 0;
    fill: currentColor;
}
.home-feed-card__star-count {
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink, #241f1c);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.home-feed-card__star--empty {
    color: #cbd5e1;
    fill: none !important;
}
.timeline-search-rating {
    color: #eab308;
}
.timeline-search-rating .lucide,
.timeline-search-rating [data-lucide],
.timeline-search-rating svg {
    fill: currentColor;
}

/* 홈피드 빈 날 — 첫 사용자 / 오늘 / 과거 */
#timelineContainer .timeline-day-empty {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
    margin: 8px 0 12px;
    padding: 2rem 1.25rem 1.75rem;
    border-radius: 20px;
    border: 1px solid var(--line, #d0c6ba);
    background: var(--card, #fff);
    box-shadow: 0 1px 0 rgba(43, 40, 37, 0.06);
}
#timelineContainer .timeline-day-empty::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.9;
}
#timelineContainer .timeline-day-empty__visual {
    position: relative;
    width: 4.25rem;
    height: 4.25rem;
    margin-bottom: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
#timelineContainer .timeline-day-empty__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--green-soft, #eaf8f2);
    box-shadow: inset 0 0 0 1px var(--green-mute, #b4e2cd);
}
#timelineContainer .timeline-day-empty__icon {
    position: relative;
    z-index: 1;
    width: 1.65rem;
    height: 1.65rem;
    color: var(--green-deep, #2d9f74);
    stroke-width: 1.75;
}
#timelineContainer .timeline-day-empty__title {
    position: relative;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: -0.01em;
    color: var(--ink, #241f1c);
}
#timelineContainer .timeline-day-empty__desc {
    position: relative;
    margin: 0;
    max-width: 16.5rem;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.55;
    color: var(--muted, #7a7268);
}

/* 1) 첫 사용자 — 따뜻한 민트 환영 */
#timelineContainer .timeline-day-empty--first {
    border-color: color-mix(in srgb, var(--green-mute) 70%, var(--line));
    background:
        radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--green-soft) 85%, #fff) 0%, transparent 62%),
        linear-gradient(180deg, #fbfffc 0%, var(--card, #fff) 70%);
}
#timelineContainer .timeline-day-empty--first::before {
    background:
        radial-gradient(circle at 18% 22%, rgba(95, 212, 168, 0.16) 0%, transparent 42%),
        radial-gradient(circle at 86% 78%, rgba(60, 184, 137, 0.1) 0%, transparent 46%);
}
#timelineContainer .timeline-day-empty--first .timeline-day-empty__ring {
    background: linear-gradient(145deg, #f3fcf7 0%, var(--green-soft) 100%);
    box-shadow:
        inset 0 0 0 1px var(--green-mute),
        0 6px 16px rgba(60, 184, 137, 0.14);
    animation: timelineEmptyRingPulse 2.4s ease-in-out infinite;
}
#timelineContainer .timeline-day-empty--first .timeline-day-empty__title {
    color: var(--green-deep, #2d9f74);
}

/* 2) 오늘 무기록 — 부드러운 민트 넛지 */
#timelineContainer .timeline-day-empty--today {
    border-color: color-mix(in srgb, var(--green-mute) 45%, var(--line));
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--green-soft) 55%, #fff) 0%, var(--card, #fff) 72%);
}
#timelineContainer .timeline-day-empty--today .timeline-day-empty__ring {
    background: color-mix(in srgb, var(--green-soft) 80%, #fff);
}

/* 3) 과거 날짜 무기록 — 차분한 페이퍼 톤 */
#timelineContainer .timeline-day-empty--past {
    border-color: color-mix(in srgb, var(--line) 85%, var(--muted));
    background:
        linear-gradient(180deg, #faf7f3 0%, var(--card, #fff) 68%);
}
#timelineContainer .timeline-day-empty--past .timeline-day-empty__ring {
    background: #f3eee7;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent);
}
#timelineContainer .timeline-day-empty--past .timeline-day-empty__icon {
    color: var(--muted, #7a7268);
}
#timelineContainer .timeline-day-empty--past .timeline-day-empty__title {
    color: var(--ink-2, #4f4841);
}

@keyframes timelineEmptyRingPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.04); opacity: 0.92; }
}

/* 모먼트 네트워크 단절 — 밀로그 빈 날 empty와 같은 친근한 안내 + 재연결 CTA */
.moment-network-empty {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
    margin: 16px 14px 20px;
    padding: 2.1rem 1.35rem 1.85rem;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--line) 85%, var(--muted));
    background:
        linear-gradient(180deg, #faf7f3 0%, var(--card, #fff) 68%);
    box-shadow: 0 1px 0 rgba(43, 40, 37, 0.06);
}
.moment-network-empty::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 22%, rgba(122, 114, 104, 0.08) 0%, transparent 42%),
        radial-gradient(circle at 86% 78%, rgba(60, 184, 137, 0.08) 0%, transparent 46%);
}
.moment-network-empty__visual {
    position: relative;
    width: 4.25rem;
    height: 4.25rem;
    margin-bottom: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.moment-network-empty__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #f3eee7;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent);
}
.moment-network-empty__icon {
    position: relative;
    z-index: 1;
    width: 1.65rem;
    height: 1.65rem;
    color: var(--muted, #7a7268);
    stroke-width: 1.75;
}
.moment-network-empty__title {
    position: relative;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: -0.01em;
    color: var(--ink-2, #4f4841);
}
.moment-network-empty__desc {
    position: relative;
    margin: 0;
    max-width: 16.5rem;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.55;
    color: var(--muted, #7a7268);
}
.moment-network-empty__btn {
    position: relative;
    margin-top: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.65rem 1.2rem;
    border: none;
    border-radius: 14px;
    background: var(--cta-mint-grad, linear-gradient(135deg, #5fd4a8 0%, #3cb889 55%, #2d9f74 100%));
    box-shadow: var(--cta-mint-shadow, inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 6px rgba(45, 159, 116, 0.28));
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, filter 0.12s ease;
}
.moment-network-empty__btn i,
.moment-network-empty__btn svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}
.moment-network-empty__btn:active {
    transform: scale(0.98);
    filter: brightness(0.97);
}
#galleryContainer {

    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
}
#galleryContainer > div {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}
/* 앨범(모먼트) 탭: 시안처럼 피드 패딩은 insertPoint에서만 */
#galleryView {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    /* .ui-tab-view min-height(60vh) — 숨는 탭에도 먹지 않게, 본문은 콘텐츠 높이 */
    min-height: 0 !important;
    margin: 0 !important;
    scroll-snap-type: none;
    scroll-behavior: auto;
}
/* 갤러리 본문 스크롤: 캐러셀/레거시 scroll-snap·smooth 잔여감 제거 */
#galleryView:not(.hidden) #galleryPullWrap,
#galleryView:not(.hidden) #galleryContainer,
#galleryView:not(.hidden) #galleryPostsInsertPoint {
    scroll-snap-type: none;
    scroll-behavior: auto;
}
/* 갤러리·밀로그 당겨서 새로고침 (부모 높이 미정이어도 본문 높이를 따르도록 % 고정 없음) */
#galleryPullWrap,
#timelinePullWrap {
    position: relative;
    min-height: 0;
}
.gallery-pull-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 48px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 0.875rem;
    color: #64748b;
    transition: max-height 0.2s, opacity 0.2s;
    pointer-events: none;
}
.gallery-pull-indicator.pulling {
    max-height: 48px;
    opacity: 1;
}
.gallery-pull-indicator .fa-arrows-rotate {
    font-size: 1rem;
}
/* 헤더 우측: .header-right = [돋보기] [알림] 순서 flex, 별도 absolute 없음 */
/* 밀로그 검색 확장 시: header-right가 남은 공간 차지, 검색창이 sub-title까지 확장 */
#mainAppHeader.timeline-search-expanded .header-right {
    flex: 1;
    min-width: 0;
}
#mainAppHeader.timeline-search-expanded .timeline-search-wrapper.expanded {
    flex: 1;
    min-width: 0;
    width: auto !important; /* JS width 대신 flex 사용 */
    margin-left: 20px; /* sub-title과 20px 간격 */
}
/* 헤더 우측 아이콘: 기존 대비 +10% (돋보기·종) */
.header-right .timeline-search-toggle i,
.header-right .timeline-search-toggle .lucide,
.header-right .timeline-search-toggle svg,
.header-right .gallery-trace-btn i,
.header-right .gallery-trace-btn .lucide,
.header-right .gallery-trace-btn svg {
    font-size: 1.155rem !important;
    width: 1.155rem !important;
    height: 1.155rem !important;
}
.header-right .notification-trigger i,
.header-right .notification-trigger .lucide,
.header-right .notification-trigger svg,
.header-right .notification-trigger .fa-bell {
    font-size: 1.485rem !important;
    width: 1.485rem !important;
    height: 1.485rem !important;
}

/* 갤러리 트레이스: 접힌 상태=돋보기만, 펼침=하트/댓글/북마크/돋보기 */
.gallery-trace-panel {
    width: 2rem;
    justify-content: flex-end;
}
.gallery-trace-panel.expanded {
    width: 8.5rem !important;
    justify-content: flex-start;
}

/* 모먼트 사용자 프로필(내 게시물): 프로필 v2 톤 + 탭 고정 */
.gallery-user-profile-header {
    box-sizing: border-box;
    background: var(--page-deep, #faf6f2);
    border-bottom: 1px solid var(--line, #e6ddd2);
}
.gallery-user-profile-scrollable {
    background: var(--page-deep, #faf6f2);
}
.gallery-user-profile-top {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem 0.5rem;
}
.gallery-user-profile-back {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid #ddd4c8;
    border-radius: 9999px;
    background: #ffffff;
    color: #1f1a17;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.gallery-user-profile-back:hover {
    background: #f3efe8;
    border-color: #cfc5b8;
}
.gallery-user-profile-back:active {
    background: #ebe4da;
}
.gallery-user-profile-back__icon,
.gallery-user-profile-back i,
.gallery-user-profile-back svg {
    width: 1.125rem;
    height: 1.125rem;
    display: block;
    flex-shrink: 0;
    stroke: currentColor;
    color: #1f1a17;
}
.gallery-user-profile-identity {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    flex: 1;
}
.gallery-user-profile-avatar,
.gallery-filter-photo.gallery-user-profile-avatar,
.gallery-filter-icon.gallery-user-profile-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid #ddd4c8;
    background: #ebe4da;
    background-size: cover;
    background-position: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--avatar-fallback-fg, #2d9f74);
}
.gallery-user-profile-avatar--fallback {
    background: var(--avatar-fallback-bg, #eaf8f2);
}
.gallery-user-profile-avatar--emoji {
    font-size: 1.125rem;
    font-weight: 500;
}
.gallery-user-profile-meta {
    min-width: 0;
}
.gallery-filter-nickname {
    font-size: 0.9375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink, #241f1c);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gallery-filter-joined {
    margin-top: 0.125rem;
    font-size: 0.75rem;
    color: var(--muted, #8a8076);
    line-height: 1.3;
}
.gallery-user-profile-bio-wrap {
    padding: 0.375rem 1rem 0.875rem 1.875rem;
}
.gallery-filter-bio {
    font-size: 0.9375rem;
    line-height: 1.45;
    color: var(--ink-2, #4a433c);
    white-space: pre-wrap;
    min-height: 1.25rem;
}
.gallery-filter-tabs {
    width: 100% !important;
    box-sizing: border-box;
    display: flex;
    gap: 0;
    padding: 0.375rem 1rem 0.75rem;
    background: var(--page-deep, #faf6f2);
    border-top: 1px solid transparent;
}
.gallery-filter-tabs .gallery-filter-tab-btn {
    flex: 1 1 0;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd4c8;
    background: #ebe4da;
    color: #b0a89e;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.gallery-filter-tabs .gallery-filter-tab-btn:first-child {
    border-radius: 9999px 0 0 9999px;
    border-right-width: 0;
}
.gallery-filter-tabs .gallery-filter-tab-btn:last-child {
    border-radius: 0 9999px 9999px 0;
}
.gallery-filter-tabs .gallery-filter-tab-btn.is-active {
    background: #ffffff;
    color: #1f1a17;
    font-weight: 700;
    box-shadow: 0 1px 3px rgb(36 31 28 / 0.1);
    border-color: #d4cbc0;
    position: relative;
    z-index: 1;
}
.gallery-filter-tabs .gallery-filter-tab-btn:not(.is-active):hover {
    color: #8a8076;
}

/* 타임라인 검색: 접힌 상태=돋보기 2rem, 펼치면 입력창 확장 (애니메이션) */
.timeline-search-wrapper {
    width: 2rem;
    min-width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    overflow: visible;
    transition: width 0.3s ease-out;
}
.timeline-search-wrapper.expanded {
    min-width: 2rem;
    /* timeline-search-expanded 시 flex: 1로 sub-title까지 확장, 그 외에는 JS width */
}
.timeline-search-wrapper:not(.expanded) #searchInput {
    flex: 0 0 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden;
}
.timeline-search-panel {
    display: flex;
    align-items: center;
    width: 100%;
    height: 2rem;
    justify-content: center;
    transition: width 0.3s ease-out;
}
.timeline-search-wrapper.expanded .timeline-search-panel {
    justify-content: flex-start;
    background: #f1f5f9;
    border-radius: 9999px;
    border: 1px solid #94a3b8;
    padding-left: 0.75rem;
}
.photo-remove-btn { 
    position: absolute; 
    top: 4px; 
    right: 4px; 
    width: 20px; 
    height: 20px; 
    background: rgba(0,0,0,0.6); 
    color: white; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 10px; 
    z-index: 10;
}
/* 기록 모달 썸네일: 하단 바(순서 앞·편집·순서 뒤) — 높이는 기존 20px 원형 버튼과 동일 */
.photo-preview-bottom-bar {
    box-sizing: border-box;
    align-items: flex-end;
}
.photo-order-btn,
.photo-edit-btn--in-bar {
    flex: 1 1 0;
    min-width: 0;
    height: 20px;
    min-height: 20px;
    max-height: 20px;
    margin: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    font-size: 9px;
}
.photo-order-btn:active:not(:disabled),
.photo-edit-btn--in-bar:active {
    background: rgba(0, 0, 0, 0.78);
}
.photo-order-btn:disabled {
    opacity: 0.32;
    cursor: not-allowed;
    pointer-events: none;
}
.icon-option { 
    width: 44px; 
    height: 44px; 
    border-radius: 50%; 
    border: 2px solid transparent; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.2rem; 
    cursor: pointer; 
    background: #e2e8f0; 
    flex-shrink: 0; 
    transition: all 0.2s; 
}
.icon-option.selected {
    border-color: var(--green);
    background: var(--green-soft);
    transform: scale(1.1);
}
.icon-option-setup {
    background: #e2e8f0;
}
.icon-option-setup.selected {
    background: var(--green-soft);
}
.settings-tab {
    transition: background 0.2s ease, color 0.2s ease;
}
.settings-tab-content {
    min-height: 100%;
}
/* 태그 관리 / 밀당 메모: 좌우 화면 너비에 맞춰 컨테이너 폭 최대 */
.settings-tab-content-fullwidth {
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 2rem);
    padding-left: 0;
    padding-right: 0;
}
/* 마이(프로필) 시안 v2: 모먼트·라운지처럼 좌우 여백 유지 — fullwidth 블리드 해제 */
#settingsView .settings-tab-content-fullwidth {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
}
#settingsView .settings-view-content.profile-v2-scroll {
    padding-left: 14px;
    padding-right: 14px;
}
/* 사용자 > 태그 관리 / 밀당 메모: 바깥 컨테이너 영역 표시 */
.settings-section-container {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
/* 프로필/태그관리/밀당메모 섹션 제목만 왼쪽 10px 여유 */
.settings-section-container > h3,
.profile-settings-header,
.settings-section-container > div:first-child > h3 {
    padding-left: 10px;
}

