/*
Theme Name: YueCircle · 时光朋友圈
Description: Independently designed moments timeline for Typecho.
Version: 1.0.0
*/
:root {
  --ink: #263343;
  --muted: #94a0ae;
  --subtle: #657487;
  --blue: #566f96;
  --line: #eff0f2;
  --pale: #f7f8fa;
  --green: #38ad7b;
  --radius: 14px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font: 15px/1.75 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: radial-gradient(ellipse 860px 510px at 8% 9%, #e9ede9 1%, transparent 62%),
              radial-gradient(ellipse 700px 600px at 97% 40%, #f5e9e1 1%, transparent 60%),
              #f6f7f7;
  -webkit-font-smoothing: antialiased;
}
body.lightbox-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #77b9a5; outline-offset: 3px; }
img { max-width: 100%; }
svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
[hidden], .svg-sprite { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.app-shell { max-width: 790px; min-height: calc(100vh - 70px); margin: 35px auto; background: #fff; border-radius: 17px; box-shadow: 0 20px 75px rgba(59,71,82,.085), 0 1px 9px rgba(59,71,82,.025); overflow: clip; }
.topbar { height: 62px; display: grid; grid-template-columns: 80px 1fr 80px; align-items: center; border-bottom: 1px solid #f1f2f4; background: rgba(255,255,255,.96); position: relative; z-index: 20; }
.topbar-side { display: flex; align-items: center; padding-left: 23px; }
.topbar-right { justify-content: flex-end; padding: 0 23px 0 0; }
.topbar-title { text-align: center; font-size: 16px; font-weight: 650; letter-spacing: .12em; }
.icon-button { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 50%; }
.icon-button:hover { background: #f4f6f7; }
.icon-button svg { width: 22px; height: 22px; stroke-width: 1.9; }
.profile-hero { border-bottom: 1px solid #f3f4f5; }
.profile-cover { height: 324px; background-size: cover; background-position: center; position: relative; }
.cover-decoration { position: absolute; margin-top: -60px; margin-left: 33px; color: rgba(255,255,255,.86); font-size: 10px; letter-spacing: .22em; text-shadow: 0 1px 15px rgba(0,0,0,.22); font-weight: 600; }
.cover-decoration span { font-size: 17px; margin: 0 8px; vertical-align: -2px; }
.profile-nameplate { padding: 0 38px 30px; min-height: 121px; position: relative; }
.profile-identity { display: flex; align-items: center; justify-content: flex-end; gap: 15px; transform: translateY(-58px); height: 88px; margin-bottom: -44px; }
.profile-identity h1 { font-size: 21px; line-height: 1.4; color: white; letter-spacing: .04em; font-weight: 600; text-shadow: 0 1px 12px rgba(0,0,0,.65); margin: -13px 0 0; }
.profile-identity img { width: 86px; height: 86px; object-fit: cover; background: #fff; border: 4px solid white; border-radius: 12px; box-shadow: 0 4px 16px rgba(31,47,56,.12); }
.profile-bio { margin: 0 0 2px; color: #798391; font-size: 13px; text-align: right; line-height: 1.8; }
.profile-location { color: #a0a9b4; font-size: 12px; display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.profile-location svg { width: 13px; height: 13px; }
.timeline { padding: 8px 0 10px; }
.timeline-caption { display: flex; align-items: center; gap: 10px; padding: 26px 40px 12px; color: #8a98a7; font-size: 12px; letter-spacing: .04em; white-space: nowrap; }
.timeline-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px #e9f8f0; margin-right: 3px; }
.timeline-rule { height: 1px; background: #eaedef; flex: 1; margin-left: 6px; }
.timeline-label { color: #b5bec7; font: 10px/1.5 ui-sans-serif, system-ui; letter-spacing: .2em; }
.moment { display: flex; align-items: flex-start; gap: 15px; padding: 26px 40px 27px; border-bottom: 1px solid var(--line); }
.moment:last-of-type { border-bottom: 0; }
.moment-avatar { width: 49px; flex: 0 0 49px; }
.moment-avatar img { display: block; width: 49px; height: 49px; object-fit: cover; border-radius: 7px; background: #e7e9e6; }
.moment-main { min-width: 0; flex: 1; }
.moment-author { font-weight: 650; font-size: 15px; color: #587097; line-height: 1.6; letter-spacing: .01em; margin: -1px 0 7px; }
.moment-heading { display: block; font-size: 16px; font-weight: 640; color: #293748; line-height: 1.5; margin: 0 0 5px; }
.moment-heading:hover { color: #4a6f99; }
.moment-copy { font-size: 14px; color: #44515f; line-height: 1.85; margin: 4px 0 10px; overflow-wrap: anywhere; white-space: normal; }
.photo-grid { display: grid; gap: 5px; width: min(100%, 462px); margin: 12px 0 12px; }
.photo-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.photo-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 310px; }
.photo-grid.single { display: block; max-width: 260px; }
.photo-item { position: relative; aspect-ratio: 1; overflow: hidden; padding: 0; border: 0; background: #eee; display: block; width: 100%; }
.photo-grid.single .photo-item { aspect-ratio: 1.14; }
.photo-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.photo-item:hover img { transform: scale(1.05); }
.moment-location { display: flex; align-items: center; gap: 4px; color: #6884a7; font-size: 12px; margin: 11px 0 4px; }
.moment-location svg { width: 13px; height: 13px; }
.moment-meta { display: flex; align-items: center; justify-content: space-between; color: #a0a7b0; font-size: 12px; margin: 12px 0 0; min-height: 28px; }
.moment-time { display: inline-flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.moment-time a { color: #8e9bab; }
.moment-time a:hover { color: var(--blue); }
.meta-separator { color: #d5dae0; }
.action-wrap { position: relative; }
.moment-action-trigger { border: 0; border-radius: 6px; width: 35px; height: 25px; padding: 0; display: grid; place-items: center; background: #f2f4f7; color: #5e7499; }
.moment-action-trigger svg { width: 21px; height: 21px; stroke-width: 2.6; }
.moment-action-trigger:hover, .moment-action-trigger[aria-expanded="true"] { background: #e8edf3; }
.moment-actions { position: absolute; bottom: -4px; right: 42px; display: flex; background: #454a54; color: #fff; border-radius: 6px; min-width: 157px; box-shadow: 0 9px 22px rgba(20,26,40,.16); z-index: 6; }
.moment-actions::after { content: ''; position: absolute; right: -5px; top: 11px; height: 10px; width: 10px; background: #454a54; transform: rotate(45deg); }
.moment-actions > * { flex: 1; padding: 10px 12px; font-size: 13px; font-weight: 500; background: none; border: 0; color: #fff; display: flex; align-items: center; gap: 6px; justify-content: center; white-space: nowrap; z-index: 1; }
.moment-actions > *:first-child { border-right: 1px solid #626671; }
.moment-actions > *:hover { color: #e8ffef; }
.moment-actions svg { width: 16px; height: 16px; }
.local-like.is-liked { color: #9fe7bd; }
.local-like.is-liked svg { fill: currentColor; }
.moment-comment-hint { background: #f7f8fa; border-radius: 5px; color: #637794; font-size: 12px; margin-top: 13px; padding: 8px 10px; display: flex; gap: 7px; align-items: center; width: fit-content; max-width: 100%; }
.moment-comment-hint svg { width: 14px; height: 14px; }
.moment-comment-hint a { color: #647c9e; }
.moment-comment-hint a:hover { text-decoration: underline; }
.pagination { padding: 25px 28px 15px; }
.page-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; }
.page-nav a, .page-nav span { display: inline-grid; place-items: center; min-width: 36px; min-height: 35px; padding: 5px 10px; border: 1px solid #edf0f3; border-radius: 8px; color: #8491a0; font-size: 12px; }
.page-nav .current { background: #607a9c; color: white; border-color: #607a9c; }
.page-nav a:hover { color: #41678d; background: #f5f7f9; }
.site-footer { background: #fff; border-top: 1px solid #f5f6f7; text-align: center; padding: 30px 20px 36px; font-size: 12px; color: #afb5bf; }
.site-footer p { font-size: 12px; margin: 0 0 2px; color: #9ca7b0; letter-spacing: .07em; }
.site-footer a { color: #7e95b0; }
.site-footer span span { color: #dca69a; }
.empty-state { text-align: center; padding: 65px 18px 75px; }
.empty-state > span { color: #8dafba; font-size: 49px; line-height: 1; }
.empty-state h1, .empty-state h2 { font-size: 20px; font-weight: 600; margin: 14px 0 6px; }
.empty-state p { font-size: 13px; color: #9da7b1; }
.not-found { min-height: 57vh; display: flex; align-items: center; flex-direction: column; justify-content: center; }
.subtle-link { color: #627f9f; display: inline-block; margin-top: 18px; font-size: 13px; }
.archive-heading { padding: 53px 40px 25px; background: linear-gradient(140deg, #fff 60%, #f8f9fa); }
.section-kicker { font-size: 10px; letter-spacing: .2em; color: #98b1ac; font-weight: 700; }
.archive-heading h1 { font-size: 27px; margin: 7px 0 3px; font-weight: 630; }
.archive-heading p { font-size: 13px; color: #9ba7b5; margin: 0 0 25px; }
.archive-timeline { padding-top: 2px; }
.search-form { display: flex; align-items: center; gap: 7px; border: 1px solid #e9edf0; border-radius: 8px; background: white; padding: 7px 7px 7px 14px; max-width: 460px; }
.search-form svg { width: 17px; color: #adb5bd; }
.search-form input { border: none; background: none; outline: none; font-size: 13px; min-width: 0; flex: 1; }
.search-form button { border: 0; border-radius: 5px; background: #edf3f5; color: #637b91; font-size: 12px; padding: 6px 13px; }
.detail-top { display: flex; justify-content: space-between; gap: 16px; align-items: center; border-bottom: 1px solid #f3f4f5; padding: 24px 40px; color: #a0a8b2; font-size: 12px; }
.detail-top a { color: #6480a2; }
.detail-moment { padding-top: 40px; border-bottom: 0; }
.detail-heading { font-size: 23px; font-weight: 650; line-height: 1.55; margin: 0 0 18px; }
.detail-meta { color: #abb4bd; font-size: 12px; margin: 22px 0 0; display: flex; gap: 9px; }
.post-tags { margin-top: 12px; display: flex; gap: 7px; flex-wrap: wrap; }
.post-tags a { padding: 3px 8px; border-radius: 4px; background: #f3f6f8; color: #7591ac; font-size: 12px; }
.rich-content { font-size: 14px; line-height: 2; color: #3f4c58; overflow-wrap: anywhere; }
.rich-content > :first-child { margin-top: 0; }
.rich-content p, .rich-content ul, .rich-content ol { margin: 0 0 16px; }
.rich-content h2, .rich-content h3, .rich-content h4 { margin: 22px 0 10px; color: var(--ink); line-height: 1.5; }
.rich-content h2 { font-size: 20px; }
.rich-content h3 { font-size: 17px; }
.rich-content a { color: #507ba1; text-decoration: underline; text-decoration-color: #d7e1e8; text-underline-offset: 4px; }
.rich-content img { display: block; max-width: 100%; height: auto; border-radius: 5px; margin: 16px 0; }
.rich-content blockquote { margin: 20px 0; border-left: 3px solid #7aa6a1; padding: 9px 16px; color: #82909c; background: #f8faf9; }
.rich-content pre { max-width: 100%; background: #f4f6f7; padding: 16px; border-radius: 6px; overflow-x: auto; line-height: 1.6; }
.rich-content :not(pre) > code { background: #f3f5f6; color: #4f6d82; padding: 2px 5px; border-radius: 4px; }
.rich-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.rich-content th, .rich-content td { border: 1px solid #e8ecf0; padding: 7px 11px; white-space: nowrap; }
.rich-content hr { border: 0; height: 1px; background: #edf0f2; margin: 25px 0; }
.standalone-page { padding: 57px 44px 50px; }
.standalone-page h1 { font-weight: 650; font-size: 30px; margin: 8px 0 32px; }
.comments-section { padding: 10px 40px 36px 104px; }
.comments-heading { display: flex; align-items: center; gap: 9px; padding: 18px 0; border-top: 1px solid var(--line); }
.comments-heading h2 { font-size: 15px; font-weight: 650; margin: 0; }
.comments-heading > span { font-size: 12px; color: #9ca8b4; }
.comment-empty { margin: 0 0 27px; color: #9eaab4; font-size: 13px; }
.comment-list { list-style: none; margin: 0 0 23px; padding: 0; }
.comment-list > li { padding: 16px 0; border-bottom: 1px solid #f1f3f5; }
.comment-list .comment-author { font-size: 13px; color: #617c9e; font-weight: 650; }
.comment-list .comment-author .avatar { float: left; object-fit: cover; width: 35px; height: 35px; margin-right: 10px; border-radius: 5px; }
.comment-list .comment-meta { font-size: 11px; color: #a5b0bb; }
.comment-list .comment-meta a { color: #a5b0bb; }
.comment-list .comment-content { clear: both; font-size: 13px; line-height: 1.8; color: #43515d; padding-top: 8px; overflow-wrap: anywhere; }
.comment-list .comment-content p { margin: 4px 0; }
.comment-list .comment-reply a { font-size: 12px; color: #6483a4; }
.comment-list .comment-children { margin: 13px 0 0 32px; padding: 3px 0 1px 15px; border-left: 2px solid #edf1f4; }
.comment-children .comment-list { margin: 0; }
.comment-pagination ol, .comment-pagination ul { list-style: none; display: flex; gap: 10px; padding: 0; }
.comment-pagination a { font-size: 12px; color: var(--blue); }
.respond { background: #f9fafb; padding: 20px 21px 23px; border-radius: 10px; margin: 13px 0 12px; }
.respond-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 17px; }
.respond-header h3 { margin: 0; font-weight: 650; font-size: 14px; }
.respond-header span a { font-size: 12px; color: #7591a6; }
.respond form label { color: #657383; font-size: 12px; display: block; font-weight: 500; }
.respond form label span { color: #c97670; }
.respond input, .respond textarea { display: block; background: #fff; border: 1px solid #e5e9ec; border-radius: 6px; outline: none; width: 100%; color: var(--ink); font-size: 13px; padding: 9px 10px; margin: 5px 0 12px; }
.respond textarea { resize: vertical; min-height: 95px; }
.respond input:focus, .respond textarea:focus { border-color: #86aaab; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.send-comment { border: none; background: #526e91; color: white; border-radius: 6px; font-size: 12px; padding: 10px 17px; }
.send-comment span { margin-left: 8px; opacity: .8; }
.send-comment:hover { background: #3f5e80; }
.logged-note { font-size: 12px; color: #8496a7; }
.logged-note a { color: var(--blue); }
.post-near { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; border-top: 1px solid #f1f3f5; margin: 10px 40px 20px 104px; padding: 24px 0; font-size: 12px; color: #a1aab4; }
.post-near > div:last-child { text-align: right; }
.post-near a { display: inline-block; margin-top: 4px; color: #617c9b; font-size: 13px; }
.lightbox { position: fixed; z-index: 9999; inset: 0; display: flex; align-items: center; justify-content: center; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(14,21,29,.94); }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; z-index: 2; background: rgba(255,255,255,.1); color: white; border: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; }
.lightbox-close { top: 24px; right: 26px; }
.lightbox-prev { left: max(18px, calc(50% - 460px)); }
.lightbox-next { right: max(18px, calc(50% - 460px)); }
.lightbox button svg { width: 25px; height: 25px; }
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lightbox-figure { max-width: calc(100vw - 132px); max-height: calc(100vh - 110px); position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; align-items: center; margin: 0; }
.lightbox-figure img { max-width: 100%; max-height: calc(100vh - 150px); width: auto; height: auto; object-fit: contain; }
.lightbox-figure figcaption { color: rgba(255,255,255,.7); font-size: 13px; letter-spacing: .1em; }
@media (max-width: 820px) {
  body { background: white; }
  .app-shell { max-width: none; min-height: 100vh; margin: 0; border-radius: 0; box-shadow: none; }
}
@media (max-width: 560px) {
  .topbar { height: 55px; grid-template-columns: 58px 1fr 58px; }
  .topbar-side { padding-left: 12px; }
  .topbar-right { padding-right: 12px; }
  .topbar-title { font-size: 16px; }
  .profile-cover { height: 260px; }
  .cover-decoration { margin-left: 17px; margin-top: -42px; font-size: 8px; }
  .profile-nameplate { padding: 0 17px 23px; min-height: 111px; }
  .profile-identity { transform: translateY(-52px); height: 80px; margin-bottom: -46px; gap: 10px; }
  .profile-identity img { width: 73px; height: 73px; border-width: 3px; border-radius: 10px; }
  .profile-identity h1 { font-size: 18px; }
  .profile-bio { font-size: 12px; }
  .timeline-caption { padding: 22px 18px 8px; font-size: 11px; }
  .moment { gap: 12px; padding: 20px 17px 21px; }
  .moment-avatar { width: 42px; flex-basis: 42px; }
  .moment-avatar img { width: 42px; height: 42px; }
  .moment-author { font-size: 14px; margin-bottom: 4px; }
  .moment-heading { font-size: 15px; }
  .moment-copy { font-size: 13px; line-height: 1.8; margin-top: 3px; }
  .photo-grid { max-width: 100%; }
  .photo-grid.single { max-width: min(82%, 290px); }
  .detail-top { padding: 19px 18px; }
  .detail-top span { display: none; }
  .detail-moment { padding-top: 27px; }
  .detail-heading { font-size: 20px; }
  .archive-heading { padding: 35px 18px 22px; }
  .archive-heading h1 { font-size: 23px; }
  .comments-section { padding: 10px 16px 26px 71px; }
  .respond { margin-left: -57px; padding: 18px 16px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .post-near { margin: 0 17px 20px 71px; }
  .standalone-page { padding: 40px 20px; }
  .lightbox-prev, .lightbox-next { width: 32px; height: 36px; border-radius: 8px; }
  .lightbox-prev { left: 5px; }
  .lightbox-next { right: 5px; }
  .lightbox-close { top: 18px; right: 18px; }
  .lightbox-figure { max-width: calc(100vw - 76px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ==========================================
   YueCircle social timeline components
   ========================================== */
.topbar-right { gap: 1px; }
.topbar .theme-switch { border: 0; background: transparent; color: #77899b; flex: none; }
.topbar .theme-switch:hover { background: #eff3f4; }
.topbar .theme-switch svg { width: 20px; height: 20px; }
.topbar .theme-switch[aria-pressed="true"] { color: #d5b17a; }
.moment-video { max-width: 462px; margin: 13px 0; border-radius: 10px; overflow: hidden; background: #161a21; }
.moment-video video { max-height: 460px; width: 100%; display: block; object-fit: contain; }
.video-note { color: #cbd5dd; font-size: 11px; line-height: 2.8; padding: 0 12px; }
.moment-social { background: #f6f7f9; border-radius: 7px; margin-top: 12px; padding: 8px 11px 9px; width: min(100%, 463px); font-size: 12px; line-height: 1.75; }
.moment-like-line { color: #58769d; display: flex; gap: 6px; align-items: center; font-weight: 600; min-height: 21px; }
.moment-like-line svg { width: 14px; height: 14px; stroke-width: 2.1; }
.moment-comments-preview { margin-top: 6px; padding-top: 5px; border-top: 1px solid #e8eaed; }
.preview-comment { font-size: 12px; margin: 3px 0; color: #4b5664; overflow-wrap: anywhere; }
.preview-comment a { color: #58769d; font-weight: 600; }
.moment-empty-comment { display: block; margin-top: 6px; padding-top: 6px; color: #909dad; border-top: 1px solid #e8eaed; }
.moment-view-comments { display: inline-block; color: #899cad; font-size: 11px; margin-top: 5px; }
.moment-view-comments:hover { color: var(--blue); }
.server-like.is-liked { color: #9fe7bd; }
.server-like.is-liked svg { fill: currentColor; }
.server-like:disabled { opacity: .5; cursor: progress; }
.detail-like-row { display: flex; align-items: center; gap: 14px; margin-top: 24px; color: #97a4af; font-size: 12px; }
.detail-like { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #dce5ea; background: #f7f9fa; color: #657c99; border-radius: 20px; min-width: 88px; padding: 7px 15px; }
.detail-like svg { width: 15px; height: 15px; }
.detail-like.is-liked { background: #edf8f2; border-color: #bddacb; color: #318e68; }
.detail-like-row strong { color: #58799c; }
.comments-section > .comment-list { list-style: none; background: #f7f8fa; border-radius: 8px; padding: 8px 17px; margin-bottom: 25px; }
.comments-section .bubble-comment { list-style: none; border-bottom: 1px solid #e9edf0; padding: 11px 0 12px; }
.comments-section .bubble-comment:last-child { border-bottom: 0; }
.bubble-comment-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; line-height: 1.4; }
.bubble-comment-name { color: #566f95; font-weight: 650; font-size: 13px; }
.bubble-comment-head time { color: #b3bdc7; font-size: 11px; }
.bubble-comment-body { color: #4e5b67; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; margin: 5px 0 2px; }
.bubble-comment-body p { margin: 0 0 4px; }
.bubble-comment-reply a { color: #8192a7; font-size: 11px; }
.bubble-comment-reply a:hover { color: var(--blue); }
.bubble-comment .comment-children { margin: 9px 0 0 13px; border-left: 2px solid #dfe7eb; padding: 0 0 0 14px; }
.bubble-comment .comment-children ol { list-style: none; padding: 0; margin: 0; }
.bubble-comment .comment-children .bubble-comment { padding-bottom: 8px; }
.wm-toast { position: fixed; z-index: 99999; left: 50%; bottom: 28px; transform: translate(-50%, 25px); color: #fff; background: rgba(38,47,59,.92); padding: 10px 17px; border-radius: 10px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; white-space: nowrap; max-width: calc(100vw - 40px); }
.wm-toast.show { opacity: 1; transform: translate(-50%, 0); }
.compose-page { padding: 49px 50px 65px; }
.compose-kicker { color: #64a595; font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.compose-page h1 { font-size: 29px; line-height: 1.4; font-weight: 650; margin: 6px 0 4px; }
.compose-page h1 span { color: #87bc9b; font-size: 22px; }
.compose-lead { font-size: 13px; color: #97a2ac; margin: 0 0 27px; }
.compose-form { padding: 25px; background: #f8faf9; border: 1px solid #eaf0ef; border-radius: 14px; }
.compose-label { display: block; font-size: 13px; color: #536473; font-weight: 600; margin-bottom: 12px; }
.compose-label span { color: #b66c67; }
.compose-label small { color: #a0adb2; font-size: 11px; font-weight: 400; }
.compose-form textarea, .compose-form input { display: block; width: 100%; margin-top: 7px; border: 1px solid #e3eae9; border-radius: 8px; outline: none; padding: 11px 12px; background: #fff; color: #34475a; font-size: 13px; font-weight: 400; }
.compose-form textarea { resize: vertical; }
.compose-form textarea:focus, .compose-form input:focus { border-color: #8dc0af; box-shadow: 0 0 0 3px rgba(74,160,129,.09); }
.compose-sub { font-size: 11px; color: #aab5bb; margin: -4px 0 23px; }
.compose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compose-preview { margin: 16px 0; }
.compose-preview > span { font-size: 12px; color: #8799a3; }
.compose-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; max-width: 410px; }
.compose-preview-grid img { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 4px; }
.compose-bottom { border-top: 1px solid #e6edeb; margin-top: 25px; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.compose-bottom > span { font-size: 11px; color: #98a4a9; }
.publish-button { background: #528e7d; color: white; border: 0; border-radius: 7px; padding: 10px 17px; font-size: 13px; white-space: nowrap; }
.publish-button:hover { background: #3d7766; }
.publish-button span { margin-left: 11px; }
.compose-locked { background: #f8faf9; border: 1px solid #eef1f0; border-radius: 12px; text-align: center; padding: 42px 20px; }
.compose-locked > div { color: #7eac9f; font-size: 29px; }
.compose-locked h2 { font-size: 18px; margin: 9px 0 2px; }
.compose-locked p { color: #96a3ae; font-size: 12px; }
.compose-locked a { color: #598e80; font-size: 13px; }

/* High-contrast, coherent night theme. */
html[data-theme="dark"] { color-scheme: dark; --ink: #e5ebf1; --muted: #8e9aa6; --subtle: #bbc7d3; --blue: #99b5df; --line: #323b48; }
html[data-theme="dark"] body { background: radial-gradient(ellipse 700px 510px at 5% 1%,#26343b,transparent 66%),#141b25; color: #e7edf1; }
html[data-theme="dark"] .app-shell { background: #202832; box-shadow: 0 20px 72px rgba(0,0,0,.18); }
html[data-theme="dark"] .topbar { background: rgba(30,38,48,.97); border-color: #36404b; }
html[data-theme="dark"] .topbar .theme-switch { color: #d5b17a; }
html[data-theme="dark"] .icon-button:hover, html[data-theme="dark"] .topbar .theme-switch:hover { background: #313d49; }
html[data-theme="dark"] .profile-hero,html[data-theme="dark"] .moment { border-color: #323d48; }
html[data-theme="dark"] .profile-identity img { background: #354251; border-color: #202832; }
html[data-theme="dark"] .profile-bio,html[data-theme="dark"] .moment-time { color: #a7b3c1; }
html[data-theme="dark"] .timeline-caption,html[data-theme="dark"] .timeline-label { color: #9fabb7; }
html[data-theme="dark"] .timeline-rule { background: #3c4653; }
html[data-theme="dark"] .moment-heading,html[data-theme="dark"] .detail-heading,html[data-theme="dark"] .archive-heading h1 { color: #e8eef4; }
html[data-theme="dark"] .moment-copy,html[data-theme="dark"] .rich-content,html[data-theme="dark"] .bubble-comment-body { color: #d1dae3; }
html[data-theme="dark"] .moment-author,html[data-theme="dark"] .moment-like-line,html[data-theme="dark"] .preview-comment a,html[data-theme="dark"] .bubble-comment-name { color: #a0bae0; }
html[data-theme="dark"] .moment-action-trigger,html[data-theme="dark"] .moment-social,html[data-theme="dark"] .respond,html[data-theme="dark"] .compose-form,html[data-theme="dark"] .compose-locked,html[data-theme="dark"] .comments-section > .comment-list { background: #2a3440; }
html[data-theme="dark"] .moment-action-trigger { color: #afc5e4; }
html[data-theme="dark"] .moment-action-trigger:hover { background: #364454; }
html[data-theme="dark"] .moment-actions { background: #161e28; }
html[data-theme="dark"] .moment-actions::after { background: #161e28; }
html[data-theme="dark"] .moment-actions > *:first-child { border-right-color: #3a4351; }
html[data-theme="dark"] .preview-comment { color: #d6dce5; }
html[data-theme="dark"] .moment-comments-preview,html[data-theme="dark"] .moment-empty-comment,html[data-theme="dark"] .bubble-comment { border-color: #3d4752; }
html[data-theme="dark"] .moment-view-comments,html[data-theme="dark"] .moment-empty-comment { color: #a2b0be; }
html[data-theme="dark"] .site-footer { background: #202832; border-color: #343e49; }
html[data-theme="dark"] .archive-heading { background: #26313b; }
html[data-theme="dark"] .detail-top,html[data-theme="dark"] .comments-heading,html[data-theme="dark"] .post-near { border-color: #3b4653; }
html[data-theme="dark"] .detail-like,html[data-theme="dark"] .post-tags a { background: #303e49; border-color: #405060; color: #acc2d8; }
html[data-theme="dark"] .detail-like.is-liked { color: #97d6b4; background: #244439; border-color: #487864; }
html[data-theme="dark"] .compose-form,html[data-theme="dark"] .compose-locked { border-color: #3c4a50; }
html[data-theme="dark"] .compose-label { color: #ccd9df; }
html[data-theme="dark"] .compose-form input,html[data-theme="dark"] .compose-form textarea,html[data-theme="dark"] .respond input,html[data-theme="dark"] .respond textarea,html[data-theme="dark"] .search-form { background: #202b36; border-color: #40505e; color: #e2eaf0; }
html[data-theme="dark"] .compose-bottom { border-color: #3c4b51; }
html[data-theme="dark"] .publish-button,html[data-theme="dark"] .send-comment { background: #478873; }
html[data-theme="dark"] .rich-content blockquote,html[data-theme="dark"] .rich-content pre,html[data-theme="dark"] .rich-content :not(pre) > code { background: #2c3743; color: #c4d0dc; }
html[data-theme="dark"] .rich-content th,html[data-theme="dark"] .rich-content td { border-color: #47525f; }
@media (max-width: 560px) {
  .topbar { grid-template-columns: 46px 1fr 100px; }
  .topbar-side { padding-left: 8px; }
  .topbar-right { padding-right: 7px; }
  .moment-social { padding: 7px 9px; }
  .comments-section > .comment-list { margin-left: -55px; }
  .compose-page { padding: 35px 18px 45px; }
  .compose-form { padding: 16px; }
  .compose-grid { grid-template-columns: 1fr; gap: 0; }
  .compose-bottom { flex-direction: column; align-items: stretch; }
  .publish-button { width: 100%; }
}
@media (max-width: 820px) {
  html[data-theme="dark"] body { background: #202832; }
}

/* =======================================================
   YueCircle moments composer and replies
   ======================================================= */
/* Homepage: a centered title and actions, but no redundant back control. */
.topbar-spacer { display: block; width: 100%; }
.topbar-compose { grid-template-columns: 1fr auto 1fr; border-bottom: 1px solid var(--line); background: #fff; }
.topbar-compose .topbar-title { letter-spacing: .015em; font-weight: 600; }
.topbar-compose .topbar-right { padding-right: 25px; }
.compose-cancel { display: inline-block; padding: 9px 3px; color: #333c46; font-size: 15px; }
.compose-cancel:hover { color: #6b7a88; }
.topbar-publish { background: #07b75a; color: white; border-radius: 6px; border: none; padding: 5px 17px; min-width: 62px; font-size: 14px; font-weight: 600; line-height: 1.9; }
.topbar-publish:disabled { background: #b6e6ca; color: white; cursor: not-allowed; }
.topbar-publish:not(:disabled):hover { background: #06a450; }

/* Keep composing clean like the phone's native Moments publishing view. */
.compose-page { padding: 0 28px 52px; min-height: 520px; }
.compose-form { margin: 0 auto; padding: 30px 14px 28px; background: transparent; border: none; border-radius: 0; max-width: 700px; }
.compose-editor { position: relative; min-height: 200px; }
.compose-form #moment-text { border: 0; box-shadow: none; outline: 0; padding: 2px 0 28px; margin: 0; width: 100%; min-height: 185px; resize: vertical; font-size: 17px; line-height: 1.65; background: transparent; color: var(--ink); }
.compose-form #moment-text:focus { border: 0; box-shadow: none; }
.compose-form #moment-text::placeholder { color: #a6adb6; }
.compose-counter { color: #b4bac0; font-size: 11px; position: absolute; right: 4px; bottom: 5px; }
.compose-media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; width: min(100%, 420px); margin: 6px 0 28px; }
.compose-add-media, .compose-media-item { aspect-ratio: 1; position: relative; border: 0; border-radius: 2px; background: #f4f5f6; min-width: 0; overflow: hidden; }
.compose-add-media { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; color: #9fa7ae; }
.compose-add-media:hover { background: #eaf0ef; color: #748c89; }
.compose-add-media svg { width: 32px; height: 32px; stroke: currentColor; stroke-width: 1.4; fill: none; }
.compose-add-media span { font-size: 11px; line-height: 1.3; }
.compose-media-item img, .compose-media-item video { height: 100%; width: 100%; display: block; object-fit: cover; background: #e4e8e8; }
.compose-remove-media { position: absolute; right: 3px; top: 3px; width: 25px; height: 25px; border-radius: 50%; padding: 0; color: #fff; border: 0; background: rgba(31,39,47,.75); font-size: 21px; line-height: 20px; z-index: 2; }
.compose-remove-media:hover { background: #ce5555; }
.compose-play-marker { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: #0008; border-radius: 50%; font-size: 15px; }
.compose-upload-mask { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: white; background: rgba(24,34,42,.57); padding: 8px; text-align: center; }
.compose-media-item.failed .compose-upload-mask { background: rgba(129,39,31,.68); }
.compose-attach-actions { display: grid; width: min(100%,420px); grid-template-columns: 1fr; gap: 0; border: 1px solid #ebeff0; border-radius: 9px; overflow: hidden; margin: -17px 0 26px; box-shadow: 0 7px 20px rgba(23,37,41,.045); }
.compose-attach-actions button { text-align: left; padding: 12px 16px; border: 0; background: #fff; color: #354752; font-size: 13px; }
.compose-attach-actions button + button { border-top: 1px solid #edf0f1; }
.compose-attach-actions button:hover { background: #f6f9f8; }
.compose-video-url { width: min(100%, 480px); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -14px 0 24px; }
.compose-video-url label { width: 100%; color: #697a88; font-size: 12px; }
.compose-form .compose-video-url input { min-width: 0; flex: 1; margin: 0; font-size: 13px; border: 1px solid #e4e8eb; border-radius: 6px; padding: 9px; }
.compose-video-url button { background: #e5f4ec; color: #158957; border: 0; border-radius: 6px; padding: 8px 12px; font-size: 13px; }
.compose-settings { border-top: 1px solid #f0f1f2; }
.compose-setting { width: 100%; min-height: 57px; display: flex; align-items: center; padding: 8px 2px; gap: 10px; background: transparent; border: none; border-bottom: 1px solid #f1f2f3; text-align: left; color: #2e3945; }
.compose-setting-icon { display: grid; width: 28px; height: 28px; place-items: center; color: #57616a; }
.compose-setting-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.compose-setting-title { font-size: 14px; color: var(--ink); white-space: nowrap; }
.compose-setting-value { margin-left: auto; font-size: 12px; color: #a6b0ba; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.compose-setting-chevron { font-size: 25px; line-height: 1; color: #b2bbc2; margin-left: auto; }
.compose-setting-value + .compose-setting-chevron { margin-left: 0; }
.compose-visibility-setting { cursor: default; }
.compose-visibility-setting select { background: transparent; text-align: right; font-size: 13px; border: none; padding: 8px 1px; margin-left: auto; appearance: none; color: #657b88; outline: none; cursor: pointer; }
.compose-visibility-setting .compose-setting-chevron { margin-left: 0; }
.compose-location-panel { display: flex; gap: 9px; align-items: center; padding: 10px 2px 12px 39px; border-bottom: 1px solid #f1f2f3; }
.compose-form .compose-location-panel input { flex: 1; margin: 0; padding: 9px 10px; border: 1px solid #e1e7e7; border-radius: 6px; font-size: 13px; min-width: 0; }
.compose-location-panel button { border: none; padding: 8px 10px; background: #ebf6f0; color: #288a5a; border-radius: 6px; font-size: 12px; }
.compose-help { margin: 18px 0 6px; color: #a3afb5; font-size: 11px; line-height: 1.7; }
.compose-upload-message { min-height: 18px; margin-top: 6px; color: #29966b; font-size: 12px; }
.compose-upload-message.has-error { color: #bd5254; }
.compose-fallback-submit { display: none; }

/* Threaded comments: every top-level friend has one avatar and a flat message
   line; replies live directly below in the same gray social panel. */
.comments-section > .comment-list { background: transparent; border-radius: 0; margin: 0 0 24px; padding: 0; }
.comments-title-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; background: #edf4f9; border-radius: 7px; color: #748faf; }
.comments-title-icon svg { width: 16px; height: 16px; }
.comments-section .comment-list { list-style: none; padding: 0; }
.comments-section > .comment-list > .bubble-comment { border-bottom: 1px solid #f0f2f3; }
.comments-section .bubble-comment { display: flex; gap: 12px; margin: 0; padding: 16px 0; list-style: none; border-bottom: 0; min-width: 0; }
.comment-avatar { flex: 0 0 40px; }
.comment-avatar img { display: block; width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: #e5e9e9; }
.bubble-comment-main { min-width: 0; flex: 1; }
.bubble-comment-message { font-size: 13px; line-height: 1.82; color: #47535d; overflow-wrap: anywhere; }
.bubble-comment-name { color: #57769b; font-weight: 650; font-size: inherit; }
.bubble-comment-name a { color: inherit; }
.bubble-reply-to { color: #7b8795; font-size: inherit; }
.bubble-colon { color: #657587; }
.bubble-comment-body { display: inline; font-size: inherit; color: inherit; line-height: inherit; }
.bubble-comment-body p { display: inline; margin: 0; padding: 0; }
.bubble-comment-body p + p::before { content: ' '; }
.bubble-comment-body a { color: #587da3; text-decoration: underline; text-underline-offset: 2px; }
.bubble-comment-meta { display: flex; align-items: center; gap: 11px; margin-top: 5px; color: #a6b1bb; font-size: 11px; }
.bubble-comment-meta time { color: inherit; }
.bubble-comment-meta a { margin-left: auto; color: #6f849d; font-size: 11px; }
.bubble-comment-meta a:hover { color: #4d7097; }
.comment-awaiting { color: #d29e60; }
.bubble-comment .comment-children { background: #f7f8fa; border: 0; border-radius: 5px; margin: 11px 0 0; padding: 5px 12px; }
.bubble-comment .comment-children > .comment-list { margin: 0; padding: 0; }
.bubble-comment .comment-children .bubble-comment { display: block; margin: 0; padding: 7px 0 8px; border: 0; }
.bubble-comment .comment-children .bubble-comment + .bubble-comment { border-top: 1px solid #e9ecf0; }
.bubble-comment .comment-children .bubble-comment-meta { margin-top: 2px; }
.bubble-comment .comment-children .comment-children { background: #eef1f4; margin-top: 6px; padding: 4px 10px; }
.comments-section .respond { background: #f8fafb; border: 1px solid #eef0f2; margin: 20px 0 10px; }
.bubble-comment .respond { margin: 14px 0 0; padding: 16px; }
.preview-reply-to { color: #58769d; font-weight: 500; }

html[data-theme="dark"] .topbar-compose { background: #202832; }
html[data-theme="dark"] .compose-cancel { color: #d9e2e8; }
html[data-theme="dark"] .topbar-publish:disabled { background: #3b6150; color: #94bba7; }
html[data-theme="dark"] .compose-form { background: transparent; border: 0; }
html[data-theme="dark"] .compose-form #moment-text { background: transparent; border: 0; color: #e0e7ee; }
html[data-theme="dark"] .compose-add-media, html[data-theme="dark"] .compose-media-item { background: #323e49; color: #b0bfc9; }
html[data-theme="dark"] .compose-attach-actions { border-color: #3b4a56; }
html[data-theme="dark"] .compose-attach-actions button { background: #2d3844; color: #dae5ea; }
html[data-theme="dark"] .compose-attach-actions button + button { border-color: #394852; }
html[data-theme="dark"] .compose-settings, html[data-theme="dark"] .compose-setting, html[data-theme="dark"] .compose-location-panel { border-color: #3b4550; }
html[data-theme="dark"] .compose-setting-title, html[data-theme="dark"] .compose-visibility-setting select { color: #e0e9ee; }
html[data-theme="dark"] .compose-setting-icon { color: #aec1cf; }
html[data-theme="dark"] .compose-location-panel input, html[data-theme="dark"] .compose-video-url input { background: #283540; color: #e7edf2; border-color: #40515e; }
html[data-theme="dark"] .comments-title-icon { background: #303e50; color: #a1badb; }
html[data-theme="dark"] .comments-section > .comment-list { background: transparent; }
html[data-theme="dark"] .comments-section > .comment-list > .bubble-comment { border-color: #3b4550; }
html[data-theme="dark"] .bubble-comment-message, html[data-theme="dark"] .bubble-comment-body { color: #d4dde5; }
html[data-theme="dark"] .bubble-comment .comment-children { background: #293541; }
html[data-theme="dark"] .bubble-comment .comment-children .comment-children { background: #36414c; }
html[data-theme="dark"] .bubble-comment .comment-children .bubble-comment + .bubble-comment { border-color: #3d4a55; }
html[data-theme="dark"] .comments-section .respond { border-color: #3b4652; }

@media (max-width: 560px) {
  .topbar-compose { grid-template-columns: 1fr auto 1fr; }
  .topbar-compose .topbar-side { padding-left: 17px; }
  .topbar-compose .topbar-right { padding-right: 17px; }
  .topbar-compose .topbar-title { font-size: 16px; }
  .compose-page { padding: 0 15px 28px; }
  .compose-form { padding: 25px 2px 18px; }
  .compose-editor { min-height: 190px; }
  .compose-form #moment-text { min-height: 177px; font-size: 16px; }
  .compose-media-grid { gap: 5px; }
  .compose-add-media svg { width: 29px; height: 29px; }
  .comments-section { padding: 8px 17px 27px 71px; }
  .comments-section > .comment-list { margin-left: -54px; }
  .comment-avatar { flex-basis: 39px; }
  .comment-avatar img { width: 39px; height: 39px; }
  .comments-section > .comment-list > .bubble-comment { gap: 11px; }
  .bubble-comment .comment-children { padding: 4px 9px; }
  .comments-section .respond { margin-left: -54px; }
  .bubble-comment .respond { margin-left: 0; }
}

/* YueCircle external image links. */
.compose-photo-url {
  width: min(100%, 420px);
  border: 1px solid #e7edef;
  border-radius: 10px;
  padding: 13px;
  margin: -14px 0 25px;
  background: #fafbfc;
}
.compose-photo-url label { display: block; font-size: 13px; font-weight: 600; color: #526274; margin-bottom: 10px; }
.compose-photo-url label small { display: block; font-weight: 400; color: #98a5ae; font-size: 11px; margin-top: 3px; }
.compose-form .compose-photo-url textarea {
  display: block; width: 100%; min-height: 92px; max-height: 220px; margin: 0;
  padding: 10px; font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  border: 1px solid #dfe6e9; border-radius: 7px; background: #fff;
  color: #354550; outline-offset: 2px; overflow-wrap: anywhere; resize: vertical;
}
.compose-photo-url-actions { display: flex; gap: 9px; align-items: center; margin-top: 10px; }
.compose-photo-url-actions button { border: none; border-radius: 6px; padding: 7px 16px; font-size: 13px; }
.compose-confirm-photo { background: #07b75a; color: #fff; }
.compose-confirm-photo:hover { background: #079b4d; }
.compose-cancel-photo { background: #edf0f2; color: #617180; }
html[data-theme="dark"] .compose-photo-url { background: #293541; border-color: #45505d; }
html[data-theme="dark"] .compose-photo-url label { color: #d3dfe7; }
html[data-theme="dark"] .compose-form .compose-photo-url textarea { background: #202a34; border-color: #45505d; color: #e0e8ed; }
html[data-theme="dark"] .compose-cancel-photo { background: #394755; color: #d1dbe3; }
@media (max-width: 560px) {
  .compose-photo-url { margin-top: -10px; }
  .compose-photo-url-actions button { flex: 1; }
}

/* YueCircle pinned posts and location separator. */
.moment-pinned-tag { display: inline-flex; margin-left: 10px; transform: translateY(-1px);
  padding: 0px 7px; border-radius: 4px; vertical-align: middle;
  font-size: 10px; font-weight: 600; line-height: 1.8; letter-spacing: .05em;
  color: #607e9e; background: #eff3f8; }
html[data-theme="dark"] .moment-pinned-tag { color: #a6c7ed; background: #334353; }
.compose-location-panel .compose-separator-button { flex: 0 0 34px; min-height: 35px;
  display: grid; place-items: center; font-size: 22px; font-weight: 700;
  border: 1px solid #d6e7dc; background: #f1faf4; color: #278d5c;
  line-height: 1; padding: 0; border-radius: 6px; }
.compose-location-panel .compose-separator-button:hover { background: #daf2e3; }
.compose-location-panel .compose-location-done { flex-shrink: 0; }
html[data-theme="dark"] .compose-location-panel .compose-separator-button { border-color: #426554;
  background: #254535; color: #a1dfb5; }
@media (max-width: 360px) {
 .compose-location-panel { padding-left: 29px; gap: 5px; }
 .compose-location-panel .compose-separator-button { flex-basis: 29px; min-height: 32px; }
 .compose-location-panel .compose-location-done { padding: 7px 7px; }
}

.timeline-caption-text { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
