/* 厨友圈帖子页（≈ 小红书笔记页）2026-10 */
.note-backdrop { align-items: center; }
.community-post-dialog.note-dialog {
  display: flex; flex-direction: column; overflow: hidden; padding: 0;
  height: min(100dvh - 24px, 880px); max-height: none;
  background: #fff; color: #2b2326;
}
.note-top {
  flex: none; display: flex; align-items: center; gap: 8px;
  min-height: 54px; padding: 0 10px 0 4px; border-bottom: 1px solid #f1ebe8; background: #fff; z-index: 2;
}
.note-top button { border: 0; background: transparent; cursor: pointer; }
.note-back { width: 40px; height: 40px; font-size: 30px; line-height: 1; color: #2b2326; }
.note-author { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0; text-align: left; }
.note-author[disabled] { cursor: default; color: inherit; opacity: 1; }
.note-author i { flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #f6e3c8; font-style: normal; font-weight: 700; color: #8a5a2b; }
.note-author i img { width: 100%; height: 100%; object-fit: cover; }
.note-author b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.note-top .note-follow { flex: none; min-height: 30px; padding: 0 14px; border: 1px solid #ff5a5f; border-radius: 999px; color: #ff5a5f; font-size: 13px; font-weight: 700; }
.note-top .note-follow { background: #fff; }
.note-top .note-follow.is-followed { border-color: #ddd5d2; color: #8b8186; background: #fff; }
.note-more { width: 36px; height: 36px; font-size: 22px; color: #4b4246; }

.note-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

.note-media { position: relative; background: #f4f1ee; --note-ratio: 0.75; }
.note-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: var(--note-ratio); touch-action: pan-x pan-y; }
.note-track::-webkit-scrollbar { display: none; }
.note-track figure { position: relative; flex: 0 0 100%; margin: 0; scroll-snap-align: center; }
.note-track img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.note-track figcaption { position: absolute; left: 12px; right: 12px; bottom: 26px; padding: 6px 10px; border-radius: 10px; background: rgba(0, 0, 0, .42); color: #fff; font-size: 12px; line-height: 1.45; }
.note-count { position: absolute; top: 10px; right: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .38); color: #fff; font-size: 11px; }
/* 覆盖通用 .carousel-dots（那个是压在图上的半透明胶囊） */
.note-media .note-dots { left: 50%; right: auto; bottom: -16px; transform: translateX(-50%); padding: 0; border-radius: 0; background: none; gap: 5px; }
.note-media .note-dots i { width: 6px; height: 6px; border-radius: 50%; background: #ddd5d2; }
.note-media .note-dots i.active { width: 6px; border-radius: 50%; background: #ff5a5f; }
.note-media[data-carousel] { margin-bottom: 22px; }
.note-media--video video { width: 100%; max-height: 70vh; display: block; background: #000; }
.note-heart { position: absolute; left: 50%; top: 50%; color: #ff5a5f; font-size: 92px; line-height: 1; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(.4); text-shadow: 0 6px 24px rgba(0,0,0,.18); }
.note-heart.is-pop { animation: note-heart-pop .8s ease-out; }
@keyframes note-heart-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  45% { transform: translate(-50%, -50%) scale(.95); }
  80% { opacity: 1; transform: translate(-50%, -60%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(1); }
}
.note-scroll > .community-post-gallery { margin: 0; }

.note-text { padding: 14px 16px 6px; }
.note-text h2 { margin: 0 0 8px; font-size: 18px; line-height: 1.4; font-weight: 800; }
.note-text h2.community-title-fallback { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.note-text .community-post-body { margin: 0; font-size: 15px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; color: #33292d; }
.note-topic { display: inline-block; margin: 8px 0 0; padding: 0; border: 0; background: transparent; color: #3b6fb6; font-size: 15px; cursor: pointer; }
.note-date { display: block; margin-top: 10px; color: #a3999d; font-size: 12px; }
.note-text .community-review-note { margin: 0 0 10px; }

.note-same { margin: 8px 16px 4px; padding: 12px; border-radius: 14px; background: #fff7ef; }
.note-same h3, .note-comments h3, .note-related h3 { margin: 0 0 10px; font-size: 14px; font-weight: 800; }
.note-same .community-related-card { margin: 0; border: 0; background: #fff; }
.note-same .community-related-collect { border: 0; border-radius: 999px; background: #ff5a5f; color: #fff; font-weight: 700; }
.note-same .community-related-collect[disabled] { background: #f2eeec; color: #8b8186; }

.note-comments { margin-top: 10px; padding: 14px 16px 4px; border-top: 8px solid #f7f3f1; }
.note-comments h3 { color: #6b6266; font-weight: 600; }
.note-comment { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; padding: 8px 0; }
.note-comment.is-reply { grid-template-columns: 24px 1fr auto; padding: 6px 0; }
.note-comment > i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 700; color: #6d5240; }
.note-comment.is-reply > i { width: 24px; height: 24px; font-size: 11px; }
.note-comment-main { min-width: 0; }
.note-comment-main b { display: flex; align-items: center; gap: 6px; color: #8b8186; font-size: 13px; font-weight: 600; }
.note-comment-main p { margin: 3px 0 4px; font-size: 14px; line-height: 1.6; word-break: break-word; }
.note-comment-main small { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: #aaa0a4; font-size: 12px; }
.note-comment-main small button { padding: 0; border: 0; background: transparent; color: #8b8186; font-size: 12px; cursor: pointer; }
.note-author-tag, .note-pin-tag { padding: 0 5px; border-radius: 4px; font-size: 10px; font-style: normal; font-weight: 600; line-height: 16px; }
.note-author-tag { background: #ffeceb; color: #ff5a5f; }
.note-pin-tag { background: #fff3db; color: #b8791c; }
.note-replies { margin-top: 4px; }
.note-comment-like { display: flex; flex-direction: column; align-items: center; min-width: 30px; padding: 2px 0; border: 0; background: transparent; color: #a3999d; font-size: 16px; line-height: 1; cursor: pointer; }
.note-comment-like span { margin-top: 2px; font-size: 11px; }
.note-comment-like.is-on { color: #ff5a5f; }
.note-empty { margin: 8px 0 16px; color: #a3999d; font-size: 13px; text-align: center; }

.note-related { margin-top: 10px; padding: 14px 12px 20px; border-top: 8px solid #f7f3f1; }
.note-related h3 { padding: 0 4px; }
.note-related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: start; }
.note-related-grid > div { display: grid; gap: 8px; }
.note-related-card { display: block; width: 100%; padding: 0 0 8px; border: 0; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 1px 6px rgba(43, 35, 38, .08); text-align: left; cursor: pointer; }
.note-related-card img, .note-related-card > i { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.note-related-card b { display: -webkit-box; margin: 6px 8px 4px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 13px; line-height: 1.4; }
.note-related-card small { display: flex; justify-content: space-between; gap: 6px; margin: 0 8px; color: #a3999d; font-size: 11px; }
.note-related-card small span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.note-bar { flex: none; display: flex; align-items: center; gap: 4px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #f1ebe8; background: #fff; }
.note-input { flex: 1; min-width: 0; display: flex; align-items: center; height: 36px; padding: 0 4px 0 12px; border-radius: 999px; background: #f5f2f0; }
.note-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 14px; }
.note-input button { flex: none; height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: #8b8186; font-size: 13px; cursor: pointer; }
.note-input button[type="submit"] { background: #ff5a5f; color: #fff; font-weight: 700; }
.note-input input:placeholder-shown ~ button[type="submit"] { display: none; }
.note-bar > button { display: flex; align-items: center; gap: 3px; min-width: 50px; height: 36px; padding: 0 4px; border: 0; background: transparent; color: #4b4246; font-size: 20px; cursor: pointer; }
.note-bar > button span { font-size: 13px; }
.note-bar > button.is-on { color: #ff5a5f; }
.note-bar > button[data-action="favorite-community-post"].is-on { color: #f2a516; }

.note-sheet-backdrop { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; background: rgba(29, 22, 38, .42); }
.note-menu, .note-sheet { width: 100%; box-sizing: border-box; padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: #fff; }
.note-menu button { display: block; width: 100%; min-height: 50px; border: 0; border-bottom: 1px solid #f3eeec; background: transparent; font-size: 15px; color: #2b2326; cursor: pointer; }
.note-menu button.is-danger { color: #e0474c; }
.note-menu button:last-child { border-bottom: 0; margin-top: 6px; color: #8b8186; }
.note-sheet h3 { margin: 8px 4px 12px; font-size: 16px; }
.note-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.note-reasons label { position: relative; }
.note-reasons input { position: absolute; opacity: 0; }
.note-reasons span { display: block; padding: 10px 8px; border: 1px solid #ece5e2; border-radius: 10px; font-size: 13px; text-align: center; cursor: pointer; }
.note-reasons input:checked + span { border-color: #ff5a5f; background: #fff3f3; color: #e0474c; font-weight: 700; }
.note-sheet textarea { width: 100%; box-sizing: border-box; min-height: 72px; margin-top: 10px; padding: 10px; border: 1px solid #ece5e2; border-radius: 10px; font: inherit; font-size: 13px; resize: none; }
.note-sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.note-sheet-actions button { min-height: 44px; border: 0; border-radius: 999px; background: #f5f2f0; font-size: 15px; cursor: pointer; }
.note-sheet-actions .is-primary { background: #ff5a5f; color: #fff; font-weight: 700; }

@media (max-width: 560px) {
  .note-backdrop { padding: 0; }
  .community-post-dialog.note-dialog { width: 100%; height: 100dvh; border-radius: 0; }
}
