/* A conversation list with a single composer; identity and verification are secondary. */
.activity-comments-sheet { width: min(calc(100% - 48px),560px); height: min(78dvh,700px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; color: var(--text); background: var(--paper); box-shadow: 0 24px 100px rgb(0 0 0 / .2); }
.activity-comments-sheet::backdrop { background: rgb(0 0 0 / .35); backdrop-filter: blur(4px); }
.activity-comments-sheet[open] { display: flex; flex-direction: column; }
.activity-sheet-head { position: relative; display: flex; align-items: center; justify-content: flex-end; flex: 0 0 44px; padding: 0 12px; }
.activity-sheet-head > [data-sheet-close] { width: 44px; height: 44px; color: var(--muted); font: 25px/1 var(--sans); }
.activity-sheet-columns { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.activity-comments-column { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 20px; scrollbar-width: thin; }
.activity-comments-list:empty { display: none; }
.activity-comment-thread { border-bottom: 1px solid var(--line); }
.activity-comment-thread:last-child { border-bottom: 0; }
.activity-comment { position: relative; padding: 14px 0 8px 42px; }
.activity-comment::before { content: attr(data-initial); position: absolute; top: 14px; left: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--muted); background: var(--paper-2); font: 12px/1 var(--sans); }
.activity-comment header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; font: 12px/1.7 var(--sans); }
.activity-comment strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.activity-comment time { color: var(--muted); font-size: 10px; }
.activity-comment p { margin: 5px 0 0; font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.activity-comment.is-collapsed [data-comment-body] { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.activity-comment-actions { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.activity-comment-actions button { min-width: 32px; min-height: 32px; padding: 4px 0; border: 0; color: var(--muted); background: transparent; font: 11px/1.5 var(--sans); }
.activity-comment-target { color: var(--muted); font-family: var(--sans); font-size: 12px; }
.activity-comment-replies { margin: 0 0 14px 42px; padding: 0 10px; border-left: 2px solid var(--line-strong); border-radius: 0 8px 8px 0; background: var(--paper-2); }
.activity-comment--reply { padding: 10px 0 4px 32px; }
.activity-replies-toggle { min-height: 36px; padding: 6px 0 8px 32px; border: 0; background: transparent; color: var(--muted); font: 11px/1.5 var(--sans); text-align: left; }
.activity-comment--reply[hidden] { display: none; }
.activity-comment--reply + .activity-comment--reply { border-top: 1px solid var(--line); }
.activity-comment--reply::before { top: 10px; width: 24px; height: 24px; color: var(--muted); background: var(--paper); font-size: 10px; }
.activity-comment--reply p { font-size: 13px; }
.activity-comment-replying { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; padding-left: 10px; border-left: 2px solid var(--ink); color: var(--muted); font: 12px/1.5 var(--sans); }
.activity-comment-replying[hidden] { display: none; }
.activity-comment-replying > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-comment-replying strong { color: var(--ink); font-weight: 500; }
.activity-comment-replying button { flex-shrink: 0; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: 21px/1 var(--sans); }
.activity-comments-empty { margin: auto 0; padding: 28px 8px; text-align: center; color: var(--ink); font: 14px/1.9 var(--serif); }
.activity-comments-empty span { color: var(--muted); font: 12px/1.8 var(--sans); }
.activity-comments-empty[hidden] { display: none; }
.activity-comment-form { display: grid; flex: 0 1 auto; gap: 8px; min-height: 0; max-height: 86%; margin: 0; padding: 10px 20px 16px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); background: var(--paper); }
.activity-comment-form :is(input,textarea) { box-sizing: border-box; display: block; width: 100%; min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); color: var(--text); font: 13px/1.5 var(--sans); }
.activity-comment-form :is(input,textarea)::placeholder { color: var(--muted); opacity: 1; font: inherit; }
.activity-comment-form input { height: 44px; }
.activity-comment-submit { position: relative; display: flex; min-width: 0; }
.activity-comment-submit textarea { height: 86px; min-height: 86px; max-height: 136px; padding: 10px 12px 46px; border-radius: 12px; overflow-y: auto; resize: none; }
.activity-comment-submit > button { position: absolute; right: 7px; bottom: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 78px; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; color: var(--selected-fg); background: var(--selected-bg); font: 12px/1.5 var(--sans); }
.activity-comment-submit > button:disabled { opacity: .3; cursor: default; }
.activity-comment-submit > button[hidden] { display: none; }
.activity-comment-submit > [data-comment-back] { bottom: 6px; color: var(--muted); background: transparent; font-size: 11px; }
.activity-comment-submit > button svg { width: 16px; height: 16px; }
.activity-comment-confirmation { display: grid; gap: 12px; animation: activity-details-open 160ms ease-out; }
.activity-comment-confirmation[hidden] { display: none; }
.activity-comment-identity { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.activity-comment-identity legend { float: left; grid-column: 1 / -1; width: 100%; padding: 0; color: var(--muted); font: 11px/1.7 var(--sans); }
.activity-comment-identity label { display: grid; gap: 5px; min-width: 0; color: var(--muted); font: 11px/1.5 var(--sans); }
.activity-comment-confirmation.has-error legend { color: #b94d43; }
.activity-comment-send { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 9px; background: var(--selected-bg); color: var(--selected-fg); font: 13px/1.5 var(--sans); }
.activity-comment-send:disabled { opacity: .4; cursor: default; }
.activity-comment-send svg { width: 17px; height: 17px; }
.activity-verification { min-width: 0; }
.activity-verification[hidden] { display: none; }
.activity-verification-content { width: 100%; min-height: 65px; }
.activity-verification > button { min-height: 36px; padding: 6px 0; border: 0; color: var(--ink); background: transparent; font: 12px/1.5 var(--sans); }
.activity-verification > button[hidden] { display: none; }
@keyframes activity-details-open { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (hover:hover) {
  .activity-image:hover { opacity: .9; }
  .activity-actions button:hover { color: var(--ink); background: var(--paper-2); }
}
/* Views on the left, action icons on the right. */
.activity-post__body { display: grid; grid-template-columns: max-content minmax(0,1fr); column-gap: 12px; }
.activity-post__body > * { grid-column: 1 / -1; }
.activity-actions { display: contents; }
.activity-action-buttons { grid-column: 2; display: flex; align-items: center; justify-content: flex-end; align-self: center; gap: 10px; margin: 0; }
.activity-actions button { width: auto; min-width: 32px; min-height: 32px; padding: 4px 0; }
.activity-action-buttons svg { width: 16px; height: 16px; stroke-width: 2; }
.activity-actions :is([data-like-count],[data-comment-count],[data-activity-view-count]) { font: 10px/1.4 var(--sans); font-variant-numeric: tabular-nums; }
.activity-action-label,.activity-view-label { display: none; }
.activity-view-metric { grid-column: 1; order: 0; align-self: center; justify-self: start; margin: 0; }
.activity-views { min-height: 20px; padding: 0; }
.activity-views svg { width: 14px; height: 14px; }
.activity-views > span { font-size: 0; }
@media (min-width:601px) {
  .activity-page { width: min(calc(100% - 48px),var(--measure)); }
  .activity-panel { width: 100%; }
  .activity-post { position: relative; display: block; }
}
@media (max-width:600px) {
  .activity-page { width: calc(100% - 40px); padding-top: 28px; }
  .activity-post { position: relative; display: block; }


  .activity-copy { margin: 16px 0; letter-spacing: 0; }
  .activity-post__body { padding-bottom: 18px; }
  .activity-images { width: 100%; gap: 3px; }
  .activity-images--1,.activity-page .activity-video { width: min(100%,calc(400px * var(--media-ratio))); }
  .activity-comments-sheet { position: fixed; inset: auto 0 var(--sheet-bottom,0px); width: 100%; max-width: none; height: min(70dvh,620px); max-height: calc(var(--sheet-viewport,100dvh) - 12px); margin: 0; border: 0; border-radius: 20px 20px 0 0; }
  .activity-comments-sheet[open] { animation: activity-sheet-rise 180ms ease-out; }
  .activity-sheet-head { padding-inline: 8px; }
  .activity-comments-column { padding-inline: 16px; }
  .activity-comment-form { padding: 6px 16px max(10px,env(safe-area-inset-bottom)); }
}
@media (max-height:500px) {
  .activity-sheet-head { flex-basis: 36px; }
  .activity-sheet-head > [data-sheet-close] { height: 36px; }
}
@keyframes activity-sheet-rise { from { transform: translateY(32px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
@media (max-width:340px) { .activity-comment-form { padding-inline: 10px; } }
@media (prefers-reduced-motion:reduce) { .activity-comments-sheet[open],.activity-comment-confirmation { animation: none; } }

/* Threaded comments keep a stable reading panel while the composer follows the keyboard. */
html:has(body.activity-comments-open) { overflow: hidden; overscroll-behavior: none; }
body.activity-comments-open { position: fixed; top: var(--activity-page-top,0px); left: 0; width: 100%; overflow: hidden; overscroll-behavior: none; }
.activity-comments-sheet.activity-chat { position: fixed; inset: var(--sheet-top,9svh) 0 auto; width: min(720px,calc(100% - 32px)); height: var(--sheet-height,min(82svh,760px)); max-height: none; border-radius: 18px; background: var(--paper); }
.activity-chat .activity-sheet-head { position: absolute; z-index: 3; inset: 0 0 auto; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); height: 52px; padding: 0 12px; border: 0; background: transparent; }
.activity-chat .activity-sheet-head h2 { grid-column: 2; margin: 0; color: var(--ink); text-align: center; font: 500 15px/1.7 var(--sans); }
.activity-chat .activity-sheet-head > button { grid-column: 3; justify-self: end; width: 36px; height: 36px; border-radius: 50%; font-size: 23px; }
.activity-chat .activity-sheet-columns { position: relative; width: 100%; overflow: hidden; }
.activity-chat .guestbook-soft-edge { height: 44px; }
.activity-chat .activity-comments-column { overflow-anchor: none; scrollbar-gutter: stable; padding: 60px 24px calc(var(--activity-compose-height,64px) + 16px); scroll-padding-top: 60px; }
.activity-chat.is-composing .activity-comments-column { overflow-y: hidden; }
.activity-chat .activity-comments-list { display: block; margin: 0; }
.activity-chat .activity-comment-thread { padding: 8px 0 14px; border: 0; }
.activity-chat .activity-comment { width: 100%; max-width: none; box-sizing: border-box; padding: 12px 0 0 46px; }
.activity-chat .activity-comment::before { top: 12px; bottom: auto; right: auto; width: 34px; height: 34px; background-color: var(--paper-2); color: var(--muted); }
.activity-chat .activity-comment header { justify-content: flex-start; gap: 6px; font: 13px/1.6 var(--sans); }
.activity-chat .activity-comment strong { color: var(--muted); font-weight: 500; }
.activity-chat .activity-comment p { margin: 3px 0 0; color: var(--text); font: 15px/1.7 var(--sans); }
.activity-chat .activity-comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; color: var(--muted); }
.activity-chat .activity-comment-meta time { font: 11px/1.6 var(--sans); }
.activity-chat .activity-comment-actions { margin: 0; }
.activity-chat .activity-comment-actions button { min-height: 32px; font-size: 12px; }
.activity-chat .activity-comment-replies { margin: 0 0 0 46px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.activity-chat .activity-comment--reply { padding-left: 36px; }
.activity-chat .activity-comment--reply::before { width: 26px; height: 26px; }
.activity-chat .activity-comment--reply + .activity-comment--reply { border: 0; }
.activity-chat .activity-comment-target { font-size: inherit; }
.activity-chat .activity-chat-form { display: contents; margin: 0; padding: 0; border: 0; background: none; }
.activity-chat-dock { position: absolute; z-index: 2; inset: auto 0 0; transform: translate3d(0,calc(-1 * var(--composer-lift,0px)),0); padding: 8px 16px 14px; }
.activity-chat .guestbook-entry-bar { width: min(560px,100%); }
.activity-chat .guestbook-launcher { border-radius: 20px; }
.activity-chat-dock[data-multiline="true"] .guestbook-launcher { border-radius: 14px; }
.activity-chat .guestbook-launcher textarea { display: block; width: 100%; height: 22px; min-height: 22px; max-height: 132px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--text); font: 15px/22px var(--sans); resize: none; }
.activity-chat .guestbook-launcher textarea::placeholder { font-size: 14px; }
.activity-chat .activity-comment-submit > button { position: static; display: grid; place-items: center; flex: 0 0 24px; align-self: flex-end; width: 24px; min-width: 24px; height: 24px; min-height: 24px; margin: -1px 0; padding: 0; border-radius: 50%; background: transparent; color: var(--text); }
.activity-chat .activity-comment-submit > button:disabled { color: var(--muted); opacity: .4; }
.activity-chat .activity-comment-replying { width: min(560px,100%); margin: 0 auto 8px; padding: 2px 8px; border-left: 3px solid var(--muted); border-radius: 6px; background: var(--paper-2); }
.activity-chat .activity-chat-details { --guestbook-field-bg: var(--paper); --guestbook-field-border: var(--line); --guestbook-muted: var(--muted); position: absolute; z-index: 4; top: calc(var(--details-top,0px) + var(--details-height,100%) / 2); left: 50%; display: flex; flex-direction: column; gap: 0; width: min(420px,calc(100% - 24px)); max-height: calc(var(--details-height,100%) - 24px); padding: 0; overflow: hidden; transform: translate(-50%,-50%); border: 1px solid var(--line); border-radius: 16px; background: var(--paper-2); color: var(--text); box-shadow: 0 3px 18px rgb(0 0 0 / .12); animation: none; }
.activity-chat .activity-chat-details[hidden] { display: none; }
.activity-chat .guestbook-composer-head [data-comment-back] { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--muted); }
.activity-chat-details-body { display: grid; flex: 1 1 auto; gap: 12px; min-height: 0; padding: 8px 12px 12px; overflow-y: auto; overscroll-behavior: contain; }
.activity-chat .activity-comment-identity { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.activity-chat .activity-comment-identity label { font-size: 12px; }
.activity-chat .activity-comment-identity input { font: 14px/1.6 var(--sans); background: var(--paper); }
.activity-chat .guestbook-preview[hidden], .activity-chat [data-comment-hint][hidden] { display: none; }
.activity-chat .activity-comment-send { justify-self: end; width: auto; min-height: 36px; padding: 6px 12px; font-size: 12px; }
.activity-chat-verification-viewport { width: 100%; min-width: 0; overflow: hidden; }
.activity-chat-verification-viewport .activity-verification-content { max-width: none; transform-origin: top left; }
.activity-chat .comment-notice { position: absolute; z-index: 5; top: 12px; bottom: auto; width: min(480px,calc(100% - 24px)); border-radius: 18px; text-align: center; font-size: 12px; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
@media (max-width:600px) {
  .activity-comments-sheet.activity-chat { inset: var(--sheet-top,auto) 0 auto; width: 100%; height: var(--sheet-height,min(82svh,760px)); max-height: none; border-radius: 18px 18px 0 0; transition: none; }
  .activity-chat .activity-comments-column { padding-inline: 18px; }

  .activity-chat-dock { padding: 8px 12px max(10px,env(safe-area-inset-bottom,0px)); }
  .activity-chat .guestbook-reply-quote { font-size: 13px; }
  .activity-chat .activity-comment header { font-size: 13px; }
  .activity-chat .activity-chat-message-footer time { font-size: 11px; }
  .activity-chat .activity-comment-identity input, .activity-chat .guestbook-preview p { font-size: 15px; }
}
@supports (-webkit-touch-callout:none) {
  @media (pointer:coarse) {
    .activity-chat .guestbook-launcher textarea { --guestbook-input-scale: .9375; width: 106.666667%; max-width: none; min-height: 23.466667px; max-height: 140.8px; margin-bottom: calc(var(--guestbook-input-height,23.466667px) * -.0625); font-size: 16px; line-height: 23.466667px; transform: scale(.9375); transform-origin: top left; }
    .activity-chat .guestbook-launcher textarea::placeholder { font-size: 14.933333px; }
    .activity-chat .activity-comment-identity input { font-size: 16px; }
  }
}
@media (prefers-reduced-transparency:reduce) { .activity-chat .guestbook-soft-edge { display: none; } }

/* Use the same author photo as the activity and About page. */
.activity-chat .activity-comment::before { content: ""; }
.activity-chat .activity-comment.has-avatar::before { display: none; }
.activity-comment-avatar { position: absolute; top: 12px; left: 0; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--paper-2); }
.activity-comment--reply .activity-comment-avatar { width: 26px; height: 26px; }
.activity-chat .guestbook-author-badge { display: inline-flex; align-items: center; padding: 1px 5px; border: 1px solid color-mix(in srgb,var(--link-blue) 25%,transparent); border-radius: 4px; color: var(--link-blue); background: color-mix(in srgb,var(--link-blue) 9%,var(--paper)); font: 11px/1.5 var(--sans); }
.activity-chat .activity-sheet-head > .activity-keyboard-toggle { grid-column: 1; grid-row: 1; justify-self: start; width: auto; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; font: 11px/1.5 var(--sans); }
.activity-keyboard-toggle[aria-pressed="true"] { color: var(--link-blue); background: var(--paper-2); }
.activity-keyboard-preview { position: absolute; z-index: 1; inset: auto 0 0; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; height: var(--preview-keyboard-height,240px); padding: 8px 8px 12px; background: var(--paper-2); border-top: 1px solid var(--line); }
.activity-keyboard-preview[hidden] { display: none; }
.activity-keyboard-preview small { text-align: center; color: var(--muted); font: 10px/1.5 var(--sans); }
.activity-keyboard-row { display: flex; flex: 1; justify-content: center; gap: 6px; }
.activity-keyboard-row span { display: grid; place-items: center; flex: 1; max-width: 9%; border-radius: 5px; background: var(--paper); color: var(--text); box-shadow: 0 1px 1px rgb(0 0 0 / .16); font: 16px/1 var(--sans); }
.activity-keyboard-row:last-child span { max-width: none; font-size: 12px; }
.activity-keyboard-row .is-space { flex: 4; }

/* Only the guestbook composer follows the keyboard; its chat artwork and layout stay independent. */
.guestbook-page .guestbook-scroll { overflow-anchor: none; scrollbar-gutter: stable; }
.guestbook-page .guestbook-conversations { bottom: calc(0px - var(--guestbook-safe-bottom)); }
.guestbook-page .guestbook-device-dock { bottom: 0; transform: translate3d(0,calc(-1 * var(--guestbook-keyboard-offset,0px)),0); }
@media (max-width:699px) {
  .guestbook-page .guestbook-device-workspace[data-keyboard-open="true"] .guestbook-device-dock { padding-bottom: max(10px,env(safe-area-inset-bottom,0px)); }
}

/* Keep the horizontal player beneath the text on every screen size. */

@media (max-width:720px) {
}

/* Desktop activity typography shares a small set of reading and control sizes. */
@media (min-width:721px) {
  body[data-current="guestbook"] {
    --activity-type-main: 19px;
    --activity-type-heading: 17px;
    --activity-type-body: 16px;
    --activity-type-control: 15px;
    --activity-type-meta: 13px;
  }
  body[data-current="guestbook"] .activity-chat :is(.activity-sheet-head h2,.guestbook-composer-head h3) { font-size: var(--activity-type-heading); }
  body[data-current="guestbook"] .activity-chat .activity-comment header { font-size: var(--activity-type-control); }
  body[data-current="guestbook"] .activity-chat .activity-comment p { font-size: var(--activity-type-body); }
  body[data-current="guestbook"] .activity-chat :is(.activity-comment-meta time,.guestbook-author-badge,.activity-comment-identity legend,.guestbook-preview-label) { font-size: var(--activity-type-meta); }
  body[data-current="guestbook"] .activity-chat :is(.activity-comment-actions button,.activity-replies-toggle,.activity-comment-replying,.guestbook-reply-quote,.activity-verification > button,.comment-notice) { font-size: var(--activity-type-control); }
  body[data-current="guestbook"] .activity-chat .activity-comments-empty { font-size: var(--activity-type-body); }
  body[data-current="guestbook"] .activity-chat .activity-comments-empty span { font-size: var(--activity-type-control); }
  body[data-current="guestbook"] .activity-chat .guestbook-launcher textarea { font-size: var(--activity-type-body); }
  body[data-current="guestbook"] .activity-chat .guestbook-launcher textarea::placeholder { font-size: var(--activity-type-control); }
  body[data-current="guestbook"] .activity-chat .comment-glass-sheet .activity-comment-identity label { font-size: var(--activity-type-control); }
  body[data-current="guestbook"] .activity-chat .comment-glass-sheet :is(.activity-comment-identity input,.guestbook-preview p) { font-size: var(--activity-type-body); }
  body[data-current="guestbook"] .activity-chat .comment-glass-sheet .activity-comment-send { font-size: var(--activity-type-control); }
}
