/* Public site */
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 720px; }

/* ---------- top bar (inner pages) ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(250, 247, 238, .9); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line-2); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.tb-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; }
.tb-brand:hover { color: var(--ink); }
.tb-avatar { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--yellow); }
.tb-name { font-weight: 700; font-size: 17px; }
.tb-tag { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .tb-tag { display: none; } }

/* ---------- home layout ---------- */
.home { display: grid; gap: 18px; padding-top: 18px; padding-bottom: 28px; }
@media (min-width: 920px) {
  .home { grid-template-columns: 340px minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 32px; }
  .profile { position: sticky; top: 24px; }
}

/* profile card */
.pf-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 0 18px 18px; text-align: center; overflow: hidden; box-shadow: var(--sh-1); }
.pf-cover {
  height: 84px; margin: 0 -18px; background-color: var(--green);
  background-image:
    radial-gradient(circle at 12% 30%, rgba(255, 255, 255, .16) 0 10px, transparent 11px),
    radial-gradient(circle at 82% 70%, rgba(255, 255, 255, .12) 0 16px, transparent 17px),
    radial-gradient(circle at 60% 18%, rgba(255, 204, 51, .55) 0 5px, transparent 6px),
    radial-gradient(circle at 30% 80%, rgba(31, 107, 46, .55) 0 7px, transparent 8px),
    linear-gradient(135deg, #3FA34D 0%, #2F8A3C 60%, #1F6B2E 100%);
}
.pf-avatar { width: 96px; height: 96px; border-radius: 50%; margin: -48px auto 10px; border: 4px solid var(--surface); box-shadow: 0 0 0 2px var(--yellow), var(--sh-2); background: var(--yellow); }
.pf-name { font-size: 26px; font-weight: 700; letter-spacing: 0; }
.pf-handle { display: inline-block; font-size: 14px; color: var(--muted); font-weight: 500; margin-top: 1px; }
.pf-handle:hover { color: var(--green-d); }
.pf-bio { margin: 8px auto 0; max-width: 30ch; font-size: 16px; color: var(--ink-2); font-weight: 500; }
.pf-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 5px 11px; border-radius: 999px; background: var(--yellow-50); color: #7A5600; font-size: 13px; font-weight: 600; }
.pf-chip .i { width: 15px; height: 15px; }

/* bio link buttons */
.blinks { display: grid; gap: 8px; margin-top: 12px; }
.blink {
  display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 10px 8px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink);
  font-weight: 600; font-size: 16px; box-shadow: var(--sh-1);
  transition: border-color var(--t), background-color var(--t), box-shadow var(--t), color var(--t);
}
.blink:hover { border-color: #CFE5CF; background: #FDFFFC; color: var(--ink); box-shadow: var(--sh-2); }
.bl-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--green-50); color: var(--green-d); flex: none; transition: background-color var(--t), color var(--t); }
.bl-ic .i { width: 20px; height: 20px; }
.bl-lb { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-go { color: var(--faint); width: 18px; height: 18px; transition: color var(--t); }
.blink:hover .bl-go { color: var(--green); }
.blink.hl { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 8px 18px -10px rgba(31, 107, 46, .7); }
.blink.hl:hover { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.blink.hl .bl-ic { background: rgba(255, 255, 255, .18); color: #fff; }
.blink.hl .bl-go { color: rgba(255, 255, 255, .8); }

/* ---------- feed ---------- */
.feed { display: grid; gap: 10px; align-content: start; min-width: 0; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 2px 2px; }
.sec-head h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.sec-head h2 .i { color: var(--green); width: 20px; height: 20px; }
.sec-head .count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg-2); border-radius: 999px; padding: 2px 9px; }
.sec-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; }
.sec-link .i { width: 16px; height: 16px; }

.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); transition: border-color var(--t), box-shadow var(--t); }
.pcard:hover { border-color: #D8D1BE; box-shadow: var(--sh-2); }
.pcard-link { display: flex; gap: 14px; padding: 14px 16px; color: var(--ink); }
.pcard-link:hover { color: var(--ink); }
.pcard-link:hover h3 { color: var(--green-d); }
.pcard-cover { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; flex: none; background: var(--bg-2); }
.pcard-txt { min-width: 0; display: grid; gap: 4px; align-content: start; }
.pcard h3 { font-size: 17px; font-weight: 700; line-height: 1.5; transition: color var(--t); }
.pcard p { color: var(--muted); font-size: 14.5px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--faint); font-size: 12.5px; font-weight: 500; margin-top: 2px; }
.meta .i { width: 14px; height: 14px; }
@media (max-width: 380px) { .pcard-cover { width: 72px; height: 72px; } .pcard-link { padding: 12px; gap: 12px; } }

/* ---------- ads ---------- */
.ad { position: relative; border-radius: var(--r-lg); overflow: hidden; }
.ad-tag { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 1; font-size: 11px; font-weight: 600; letter-spacing: 0; color: var(--ink-2); background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.ad-img { border: 1px solid var(--line); background: var(--surface); }
.ad-img a { display: block; }
.ad-img img { width: 100%; height: auto; transition: opacity var(--t); }
.ad-img a:hover img { opacity: .94; }
.ad-text { display: flex; align-items: center; gap: 14px; padding: 30px 16px 14px; background: linear-gradient(180deg, var(--yellow-50), #FFFBEB); border: 1px solid #F3E2A6; }
.ad-body { flex: 1; min-width: 0; }
.ad-title { display: block; font-size: 16px; font-weight: 700; }
.ad-body p { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.btn-ad { background: var(--ink); color: #fff; flex: none; }
.btn-ad:hover { background: #24412E; color: #fff; }
.btn-ad .i { width: 15px; height: 15px; }
@media (max-width: 480px) { .ad-text { flex-direction: column; align-items: stretch; } .btn-ad { align-self: flex-start; } }
.ad.in-post { margin: 18px 0; }

/* empty */
.empty { display: grid; justify-items: center; gap: 4px; padding: 36px 16px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-lg); color: var(--muted); }
.empty img { width: 72px; height: 72px; margin-bottom: 6px; }
.empty b { color: var(--ink); font-size: 16px; }

/* ---------- post ---------- */
.pg-post .wrap.narrow { padding-top: 18px; padding-bottom: 28px; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 18px; box-shadow: var(--sh-1); }
@media (min-width: 720px) { .post { padding: 34px 40px; } }
.post-head h1 { font-size: 26px; line-height: 1.5; }
@media (min-width: 720px) { .post-head h1 { font-size: 32px; } }
.post-head .meta { margin-top: 8px; font-size: 13.5px; }
.post-cover { margin: 18px 0 4px; }
.post-cover img { width: 100%; height: auto; border-radius: 14px; background: var(--bg-2); }

.prose { font-size: 17.5px; line-height: 2; color: #1C2E22; margin-top: 16px; overflow-wrap: anywhere; }
.prose > * + * { margin-top: .85em; }
.prose h2 { font-size: 21px; margin-top: 1.5em; }
.prose h3 { font-size: 18.5px; margin-top: 1.3em; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose a { color: var(--green-d); text-decoration: underline; text-decoration-color: var(--green-100); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: text-decoration-color var(--t), color var(--t); }
.prose a:hover { text-decoration-color: var(--green); }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--green); font-weight: 700; }
.prose blockquote { margin-inline: 0; padding: 10px 16px; border-inline-start: 4px solid var(--yellow); background: var(--yellow-50); border-radius: 0 12px 12px 0; color: var(--ink-2); }
[dir="rtl"] .prose blockquote { border-radius: 12px 0 0 12px; }
.prose code { font-family: var(--mono); font-size: .85em; background: var(--bg-2); padding: 1px 6px; border-radius: 6px; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 1.6em 0; }

/* share */
.share { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.share-lbl { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); font-size: 14px; }
.share-lbl .i { color: var(--green); }
.share-row { display: flex; gap: 6px; flex-wrap: wrap; }
.sh { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: background-color var(--t), color var(--t), border-color var(--t); }
.sh .i { width: 20px; height: 20px; }
.sh-wa:hover { background: #E7F8EE; color: #128C4B; border-color: #BFE8CF; }
.sh-tg:hover { background: #E8F3FC; color: #1C7FC0; border-color: #C3DFF3; }
.sh-x:hover { background: #F0F0F0; color: #000; border-color: #DDD; }
.sh-fb:hover { background: #EAF0FB; color: #1B5FD1; border-color: #C9D8F3; }
.sh-copy:hover, .sh-native:hover { background: var(--green-50); color: var(--green-d); border-color: var(--green-100); }
.sh .copied { position: absolute; inset: 0; display: grid; place-items: center; background: var(--green); color: #fff; border-radius: 10px; opacity: 0; transition: opacity var(--t); pointer-events: none; }
.sh.done .copied { opacity: 1; }

.more { margin-top: 22px; display: grid; gap: 10px; }

/* ---------- 404 / message ---------- */
.oops { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 44px 16px 24px; }
.oops img { width: 120px; height: 120px; }
.oops-code { font-weight: 700; color: var(--green); background: var(--green-50); border-radius: 999px; padding: 2px 12px; font-size: 13px; }
.oops h1 { font-size: 24px; }
.oops p { color: var(--muted); max-width: 40ch; margin-bottom: 10px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line-2); padding: 18px 0 calc(18px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 13px; }
.foot-in { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; font-size: 15px; }
.foot-brand img { width: 28px; height: 28px; }
.foot-line { flex: 1; }
@media (max-width: 560px) { .foot-in { flex-direction: column; text-align: center; } }
