/* Shared member pages; uses the existing paper and crayon theme. */
.member-link { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; font-weight: 600; }
.member-link span { overflow-wrap: anywhere; }
.member-link:hover span { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.member-link .member-avatar { width: 36px; height: 36px; }
.social-home { padding: 48px 40px 32px; color: var(--ink); }
.social-profile-head { display: flex; align-items: center; gap: 22px; padding: 12px 0 30px; }
.social-profile-avatar { width: 96px; height: 96px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; background: var(--paper); border: 5px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.social-profile-head > div { min-width: 0; flex: 1; }
.social-profile-head h1 { margin: 6px 0 8px; font: 700 28px/1.3 var(--display-font); overflow-wrap: anywhere; }
.social-profile-head p { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.social-profile-head small { font-size: 12px; color: var(--muted); }
.social-eyebrow { color: var(--green); font-size: 10px; font-weight: 650; letter-spacing: .16em; }
.social-profile-head > .auth-secondary { flex-shrink: 0; text-decoration: none; }
.social-tabs { display: flex; gap: 22px; padding: 12px 0 18px; border-bottom: 1px solid var(--line); align-items: center; }
.social-tabs > a, .social-tabs > span, .social-tabs > button { position: relative; isolation: isolate; color: var(--muted); background: transparent; border: 0; font-size: 15px; text-decoration: none; padding: 10px 12px; font-weight: 600; white-space: nowrap; }
.social-tabs [aria-current=page] { color: var(--ink); }
.social-tabs [aria-current=page]::before { position: absolute; z-index: -1; content: ''; inset: 0 -2px; background: url('/assets/ui/crayon-wash.svg') center/100% 100% no-repeat; transform: rotate(-3deg); opacity: .65; pointer-events: none; }
.social-section-caption, .social-member-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; }
.social-section-caption, .social-private-note { color: var(--muted); font-size: 13px; }
.social-member-actions { border-top: 1px solid var(--line); }
.social-member-actions h2 { margin: 0; font: 650 18px var(--display-font); }
.social-member-actions h2 span { font-size: 13px; color: var(--muted); }
.social-member-buttons { display: flex; flex: 0 0 auto; gap: 8px; }
.social-member-buttons .auth-secondary,
.social-member-buttons .primary-button,
.social-member-buttons .ghost-button { min-height: 44px; }
.social-text-button, .social-back { padding: 10px 0; min-height: 44px; border: 0; background: transparent; color: var(--green); font-size: 13px; text-decoration: none; cursor: pointer; }
.social-post-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 26px 20px; }
.social-post { min-width: 0; display: block; color: var(--ink); text-decoration: none; }
.social-post > img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px 11px 15px 12px; background: var(--soft); }
.social-post h3 { margin: 13px 0 6px; font: 650 17px/1.5 var(--display-font); overflow-wrap: anywhere; }
.social-post p { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.social-post span { color: var(--muted); font-size: 12px; }
.social-post:hover h3 { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.social-empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.social-empty strong { display: block; color: var(--ink); font-size: 16px; }
.social-empty p { margin: 10px 0; font-size: 14px; line-height: 1.7; }
.social-follow-list article { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.social-follow-list .member-avatar { width: 48px; height: 48px; }
.social-follow-list .member-link { flex: 1; }
.social-follow-bio { color: var(--muted); font-size: 12px; max-width: 180px; overflow-wrap: anywhere; }
.social-follow-list button { flex-shrink: 0; }
.social-quick-links { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 14px 0 24px; }
.social-quick-links button { display: grid; justify-items: center; gap: 8px; min-height: 66px; border: 0; background: transparent; color: var(--ink); }
.social-quick-links strong { font-size: 24px; font-weight: 650; }
.social-quick-links span { color: var(--muted); font-size: 13px; }
.social-quick-links button:hover { background: var(--soft); border-radius: 12px; }
/* Desktop reading view: photographs and a focused conversation column. */
.crayon-web .modal-card:has(.web-reader) { width: min(1120px,100%); max-height: calc(100dvh - 64px); overflow: hidden; box-shadow: 0 24px 80px #30392f30; }
.crayon-web .modal-card:has(.social-home) { width: min(840px,100%); }
.web-reader { display: grid; grid-template-columns: 1fr 1fr; height: min(820px,calc(100dvh - 64px)); color: var(--ink); }
.reader-gallery { overflow-y: auto; min-width: 0; background: var(--paper); display: flex; flex-direction: column; justify-content: safe center; padding: 24px; gap: 20px; }
.reader-gallery figure { margin: 0; flex: 0 0 auto; }
.reader-gallery img { display: block; width: 100%; max-height: 720px; object-fit: contain; border-radius: 12px; }
.reader-conversation { display: flex; min-width: 0; min-height: 0; flex-direction: column; border-left: 1px solid var(--line); }
.reader-scroll { overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; scrollbar-width: thin; }
.reader-author { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 65px 22px 28px; }
.reader-author .member-avatar { width: 44px; height: 44px; }
.reader-author .member-link { font-size: 15px; }
.reader-author .auth-secondary { padding: 8px 16px; min-height: 38px; white-space: nowrap; }
.reader-copy { padding: 2px 28px 22px; }
.reader-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.reader-copy h1 { margin: 16px 0 18px; font: 700 25px/1.45 var(--display-font); letter-spacing: -.025em; overflow-wrap: anywhere; }
.reader-body { margin: 0; font-size: 15px; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; }
.reader-copy > p { overflow-wrap: anywhere; }
.reader-reactions { gap: 10px; align-items: center; margin: 24px 0 0; }
.reader-reactions button { display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; font-size: 13px; min-height: 42px; border-radius: 20px; }
.reader-reactions svg { width: 19px; height: 19px; }
.reader-reactions [aria-pressed=true] { color: var(--green); background: var(--blue-soft); border-color: transparent; }
.reader-reactions [data-relation=like][aria-pressed=true] { color: #9c5345; background: #f4e6dc; }
.reader-reactions > span { font-size: 12px; color: var(--muted); margin-left: auto; }
.reader-comments { padding: 24px 28px; border-top: 1px solid var(--line); background: #f8f6ed55; }
.reader-section-title h2 { margin: 0 0 24px; font: 650 17px var(--display-font); }
.reader-section-title h2 span { margin-left: 6px; font: 500 12px var(--body-font); color: var(--muted); }
.reader-comment { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 26px; }
.reader-comment:last-child { margin-bottom: 0; }
.reader-comment > div { min-width: 0; flex: 1; }
.reader-comment .comment-face { flex-shrink: 0; }
.reader-comment .member-avatar { width: 34px; height: 34px; }
.reader-comment-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 12px; }
.reader-comment-meta a { color: var(--ink); font-size: 13px; font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.reader-comment-meta time { color: var(--muted); font-size: 10px; }
.reader-comment-delete { margin-left: auto; min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; cursor: pointer; }
.reader-owner-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.reader-comment p { margin: 8px 0 0; font-size: 14px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.reader-composer { flex: 0 0 auto; padding: 15px 22px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.reader-composer label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 9px; }
.reader-composer form > div { display: flex; align-items: center; gap: 10px; }
.reader-composer textarea { flex: 1; min-width: 0; padding: 11px 13px; height: 44px; max-height: 110px; resize: vertical; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; font-size: 14px; line-height: 20px; color: var(--ink); }
.reader-composer .modal-action { min-height: 42px; margin: 0; width: auto; padding: 0 14px; font-size: 12px; white-space: nowrap; }
.reader-composer button:disabled { opacity: .45; cursor: default; }
.reader-composer #detail-status { margin: 0 0 10px; font-size: 13px; }
.crayon-h5 .h5-social-home { padding: 18px 20px 24px; }
.crayon-h5 .social-profile-head { flex-wrap: wrap; gap: 16px; padding: 12px 0 20px; }
.crayon-h5 .social-profile-avatar { width: 76px; height: 76px; }
.crayon-h5 .social-profile-head h1 { font-size: 23px; }
.crayon-h5 .social-profile-head p { font-size: 13px; }
.crayon-h5 .social-profile-head > button { margin-left: auto; }
.crayon-h5 .social-tabs { gap: 8px; justify-content: space-between; margin-bottom: 22px; }
.crayon-h5 .social-tabs > button { font-size: 12px; padding-right: 0; }
.crayon-h5 .social-post-grid { gap: 22px 14px; }
.crayon-h5 .social-post h3 { font-size: 14px; }
.crayon-h5 .social-member-actions .primary-button { width: auto; min-width: 84px; padding: 10px 16px; }
.crayon-h5 .post-author-info a, .crayon-h5 .post-comment-meta a { color: inherit; text-decoration: none; }
.crayon-h5 .post-follow.is-self { display: none; }
.crayon-h5 .comment-face { flex-shrink: 0; }
.crayon-h5 .member-link .post-avatar { flex-shrink: 0; }
@media(max-width:760px) {
  .crayon-web .modal-card:has(.web-reader) { max-height: calc(100dvh - 24px); overflow: auto; }
  .web-reader { display: flex; flex-direction: column; height: auto; }
  .reader-gallery { padding: 20px; max-height: 480px; }
  .reader-conversation { border-left: 0; }
  .reader-scroll { overflow: visible; }
  .reader-author { padding: 22px; }
  .reader-copy, .reader-comments { padding: 20px 22px; }
  .reader-composer { position: sticky; bottom: 0; }
  .reader-composer textarea { font-size: 16px; }
  .reader-composer .member-avatar { display: none; }
  .social-home { padding: 50px 22px 26px; }
  .social-profile-head { flex-wrap: wrap; gap: 16px; }
  .social-profile-avatar { width: 76px; height: 76px; }
  .social-profile-head h1 { font-size: 24px; }
  .social-tabs { gap: 8px; justify-content: space-between; }
  .social-tabs > a { padding: 10px; font-size: 14px; }
  .social-follow-bio { display: none; }
}
.social-profile-head > .auth-secondary { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; min-height: 42px; }
.crayon-h5 .social-post { text-decoration: none; }
@media(max-width:360px) {
  .crayon-h5 .social-profile-head { gap: 12px; }
  .crayon-h5 .social-profile-avatar { width: 64px; height: 64px; }
  .crayon-h5 .social-profile-head > .social-text-button { flex-basis: 100%; text-align: right; padding: 0; min-height: 32px; }
}
.social-home-footer { display: flex; justify-content: flex-end; margin-top: 24px; border-top: 1px solid var(--line); padding-top: 10px; }
.web-chat { display: grid; gap: 16px; }
.web-chat-thread { display: flex; flex-direction: column; gap: 10px; min-height: 220px; max-height: min(52vh, 420px); overflow: auto; padding: 8px 2px; }
.web-chat-row { display: flex; }
.web-chat-row.is-mine { justify-content: flex-end; }
.web-chat-bubble { max-width: min(82%, 420px); padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); overflow-wrap: anywhere; }
.web-chat-row.is-mine .web-chat-bubble { background: #eef1e3; }
.web-chat-bubble p { margin: 0; font-size: 14px; line-height: 1.6; }
.web-chat-bubble time { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.web-chat-form { display: flex; gap: 8px; align-items: flex-end; }
.web-chat-form textarea { flex: 1; min-height: 44px; max-height: 110px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; resize: vertical; }
.web-chat-form button { min-height: 44px; }
