/* Share sheet — rebuilt in #814 (25 Nov 2026, owner order 24 Nov
   ~12:50 WAT, decisions item 108) to the owner's supplied mockup:
   magenta header pill, post preview card, blue section pills with a
   gold rule, three destination buttons, image-format picker, seven
   outside tiles. Approved colours: pink magenta #b40059, bright blue,
   gold, white; the purple on "Share to a friend" and the More dots is
   the owner's own supplied design. Inline SVG icons, no emoji. */
dialog.hk-share-dialog {
  box-sizing: border-box;
  /* Release #830 (26 Nov 2026): explicit fixed centering with a safe
     top clearance, so the close button is never clipped at the top
     edge of the viewport (seen in the #829 browser re-verification).
     inset: 0 + height: fit-content + margin: auto centres the box;
     max-height keeps at least 1.5rem clear above and below it. */
  position: fixed;
  inset: 0;
  width: min(48rem, calc(100vw - 2rem));
  height: fit-content;
  max-height: calc(100dvh - 3rem);
  margin: auto;
  padding: 1.25rem;
  overflow: auto;
  overscroll-behavior: contain;
  border: 3px solid #e8b93b;
  border-radius: 1.5rem;
  background: #fff;
  color: #142449;
  color-scheme: light;
  font: 1rem/1.45 system-ui, sans-serif;
  box-shadow: 0 16px 60px #10265855;
  text-align: start;
}
.hk-share-dialog::backdrop { background: #56002fb3; }
.hk-share-dialog [hidden] { display: none !important; }
.hk-share-dialog :focus-visible { outline: 3px solid #b77516; outline-offset: 2px; }
.hk-share-dialog .hk-share-header { display: flex; align-items: flex-start; gap: .6rem; }
.hk-share-dialog .hk-share-title-pill { flex: 1; display: flex; align-items: center; gap: .65rem; min-height: 3.25rem; padding: .35rem .95rem .35rem .5rem; border: 2px solid #e8b93b; border-radius: 999px; background: linear-gradient(180deg, #d4006e, #b40059 55%, #8f0047); color: #fff; box-shadow: 0 2px 0 #b8860b; }
.hk-share-dialog .hk-share-title-icon { flex: 0 0 auto; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 2px solid #e8b93b; border-radius: 50%; background: #8f0047; color: #fff; }
.hk-share-dialog .hk-share-title-icon .hk-share-svg { width: 1.35rem; height: 1.35rem; }
.hk-share-dialog h2 { margin: 0; color: #142449; font: 700 1.5625rem/1.2 system-ui, sans-serif; }
.hk-share-dialog .hk-share-title { color: #fff; font: italic 800 clamp(1.15rem, 4.5vw, 1.5rem)/1.2 Georgia, 'Times New Roman', serif; }
.hk-share-dialog :is(button, a) { font: inherit; letter-spacing: normal; text-transform: none; }
.hk-share-dialog button { cursor: pointer; }
.hk-share-dialog .hk-share-close { flex: 0 0 auto; width: 2.75rem; height: 2.75rem; padding: 0; border: 2px solid #e8b93b; border-radius: 50%; background: #b40059; color: #fff; font-size: 1.5rem; line-height: 1; }
.hk-share-dialog .hk-share-close:hover { background: #d4006e; }
.hk-share-dialog .hk-share-preview { display: flex; align-items: center; gap: .7rem; overflow-wrap: anywhere; margin-block: .9rem; padding: .8rem; border: 1px solid #e3b9cb; border-radius: .75rem; background: #fff8fb; }
.hk-share-dialog .hk-share-preview-thumb { flex: 0 0 auto; width: 4rem; height: 4rem; border: 2px solid #e8b93b; border-radius: .6rem; background: #fff; object-fit: contain; }
.hk-share-dialog .hk-share-preview-bar { flex: 0 0 auto; align-self: stretch; width: 4px; border-radius: 2px; background: #b40059; }
.hk-share-dialog .hk-share-preview-text { display: grid; gap: .15rem; min-width: 0; }
.hk-share-dialog .hk-share-preview-text strong { color: #142449; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.hk-share-dialog .hk-share-preview span, .hk-share-dialog small { color: #495875; font-size: 1rem; }
.hk-share-dialog :is(.hk-share-copy, .hk-share-url) { box-sizing: border-box; width: 100%; min-height: 2.75rem; border-radius: .65rem; padding: .55rem; }
.hk-share-dialog .hk-share-copy { border: 1px solid #102658; background: #102658; color: #fff; font-weight: 700; }
.hk-share-dialog .hk-share-url { margin-top: .65rem; color: #142449; background: #fff; border: 1px solid #a9b9db; }
.hk-share-dialog .hk-share-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; margin-block: .8rem; }
.hk-share-dialog .hk-share-option { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: .3rem; min-width: 0; min-height: 5.6rem; padding: .5rem .15rem; border: 2px solid #e8b93b; border-radius: .9rem; background: #fff; color: #142449; text-decoration: none; text-align: center; overflow-wrap: anywhere; font-size: 1rem; }
.hk-share-dialog .hk-share-option:hover { background: #fff8fb; }
.hk-share-dialog .hk-share-mark { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: .8rem; color: #fff; }
.hk-share-dialog .hk-share-mark .hk-share-svg { display: block; width: 100%; height: 100%; }
.hk-share-dialog .hk-share-mark.hk-share-whatsapp { background: #25d366; }
.hk-share-dialog .hk-share-mark.hk-share-facebook { background: #1877f2; }
.hk-share-dialog .hk-share-mark.hk-share-twitter { background: #000; }
.hk-share-dialog .hk-share-mark.hk-share-youtube { background: #ff0000; }
.hk-share-dialog .hk-share-mark.hk-share-tiktok { background: #000; }
.hk-share-dialog .hk-share-mark.hk-share-instagram { background: transparent; }
.hk-share-dialog .hk-share-mark.hk-share-linkedin { background: #0a66c2; }
.hk-share-dialog .hk-share-mark.hk-share-email { background: #ea4335; }
.hk-share-dialog .hk-share-mark.hk-share-more { background: transparent; }
.hk-share-dialog .hk-share-mark.hk-share-copytile { background: #102658; }
.hk-share-dialog .hk-share-status { margin: .6rem 0 0; color: #14633e; font-size: 1rem; overflow-wrap: anywhere; }
.hk-share-dialog .hk-share-status:empty { display: none; }
.hk-share-dialog .hk-share-open-link { color: #1b3982; text-decoration: underline; }
.hk-site-share-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1rem; border: 1px solid #e3c478; border-radius: 999px; color: #102658; background: #f2d48b; font-weight: 700; cursor: pointer; }
@media (max-width: 560px) {
  dialog.hk-share-dialog { width: 100%; max-width: none; margin: auto 0 0; max-height: calc(100dvh - 3rem); border-radius: 1.1rem 1.1rem 0 0; padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
  .hk-share-dialog .hk-share-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .hk-share-dialog .hk-share-destination { transition: none; }
}

/* Post Patterns upgrade — Phase A, 21 Nov 2026 (Account 3). Composer tiles,
   pattern chips, Studio swatches and the sticky composer action bar. Approved
   colours only: pink magenta #b40059, bright blue, gold, white. */
.composer-format-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.composer-format-tile { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: .2rem; min-height: 48px; padding: .6rem .3rem; border: 1px solid #d7c8e6; border-radius: 12px; background: #fff; color: #193a87; font: inherit; cursor: pointer; }
.composer-format-tile .tile-icon { font-size: 1.25rem; line-height: 1; }
.composer-format-tile .tile-label { font-size: 1rem; font-weight: 700; text-align: center; }
.composer-format-tile[aria-pressed="true"] { border-color: #b40059; background: #b40059; color: #fff; }
.composer-format-tile:focus-visible { outline: 3px solid #b77516; outline-offset: 2px; }
.composer-char-count { display: block; margin: .3rem 0 0; color: #495875; font-size: 1rem; }
.composer-design-themes { display: grid; gap: .75rem; margin: 1rem 0; }
.composer-dialog [hidden] { display: none !important; }
.composer-actions { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .5rem; padding: .75rem 0 .25rem; background: #fff; border-top: 1px solid #e5c46b; }
.composer-actions .btn { min-height: 48px; }
.studio-color-swatches { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.studio-color-swatch { width: 32px; height: 32px; padding: 0; border: 1px solid #00000055; border-radius: 50%; cursor: pointer; }
.studio-color-swatch:focus-visible { outline: 3px solid #b77516; outline-offset: 2px; }
.studio-theme-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.studio-theme-chip { min-height: 48px; padding: .55rem .8rem; border: 2px solid transparent; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; }
.studio-theme-chip[aria-pressed="true"] { border-color: #b40059; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #b40059; }
.studio-theme-chip:focus-visible { outline: 3px solid #b77516; outline-offset: 2px; }
/* Owner correction 22 Nov 2026 (#791, Task B): the post-pattern chip is
   gone — Facebook does not label post types, and neither do we. The
   pattern data (patternOf / dataset.pattern) stays for the feed filter
   tabs. */
/* Release #799 (R4): the .post-read-time rule is removed with the label — no element carries the class any more. */
@media (max-width: 600px) { .composer-format-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Phase B — structured shares (21 Nov 2026): quoted original on a share
   card, share-as-message picker, rich link preview in chat. Approved
   colours only: pink magenta #b40059, bright blue, gold, white. */
.post-quote { margin: .75rem 0; padding: .85rem 1rem; border: 1px solid #e3b9cb; border-left: 4px solid #b40059; border-radius: 12px; background: #fff8fb; }
.post-quote-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .4rem; color: #193a87; font-size: 1rem; }
.post-quote-note { margin: .35rem 0; color: #193a87; }
.post-quote-unavailable { margin: .35rem 0; color: #495875; font-style: italic; }
.post-quote-original { display: inline-block; margin-top: .5rem; color: #0b5ed7; font-weight: 700; }
.post-quote .post { margin-top: .5rem; }
.share-picker-dialog { position: fixed; inset: auto 0 0 0; z-index: 60; max-width: 560px; margin: 0 auto; padding: 1.25rem; border: 1px solid #e5c46b; border-radius: 18px 18px 0 0; background: #fffdf8; color: #193a87; box-shadow: 0 -10px 28px #173b781f; display: grid; gap: .75rem; }
.share-picker-dialog input[type="search"] { width: 100%; min-height: 48px; padding: .85rem; border: 1px solid #d7c8e6; border-radius: 12px; background: #fff; color: #193a87; font: inherit; }
.share-picker-results { display: grid; gap: .5rem; max-height: 40vh; overflow: auto; }
.share-picker-row { min-height: 48px; padding: .7rem .85rem; border: 1px solid #d7c8e6; border-radius: 12px; background: #fff; color: #193a87; font: inherit; text-align: left; cursor: pointer; }
.share-picker-row:disabled { opacity: .6; }
.chat-link-preview { display: block; margin-top: .5rem; padding: .7rem .85rem; border: 1px solid #e3b9cb; border-radius: 12px; background: #fff8fb; color: #193a87; text-decoration: none; }
.chat-link-preview p { margin: .3rem 0 0; color: #495875; font-size: 1rem; }
.fc-share-reply { margin-top: .4rem; }

/* Global share rule (owner correction ~00:58 WAT, 23 Nov 2026, item 94;
   REVISED 25 Nov 2026, #821f): "Share this to bless others." lives ONLY
   in the share sheet — as its title "Share this post to bless others"
   and its closing line — never on a button or card. Feed cards render
   the share button bare (app.js shareLabelWrap returns it unwrapped),
   so the action row stays four equal pills on one straight line. The
   .hk-share-wrap / .hk-share-label rules below now serve only the
   purpose-share path (purpose-share.js), which still wraps its button.
   Approved colours. */
.hk-share-wrap { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; vertical-align: middle; }
/* #812b (24 Nov 2026): the label sits IN FLOW on its own line above the
   button — it takes layout space and can never overlap content above it
   (the old absolute bottom:calc(100% + 2px) label painted over the
   WELCOME card's "Connect • Grow • Serve" line and shifted on feed
   posts). DOM order (label first, button second) keeps the label ON TOP
   of the button visually (item 92). max-width:11em keeps the label about
   the button's width so it wraps to two centred lines instead of
   stretching the row. 16px per the #812 floor (visible text). */
.hk-share-label { display: block; position: static; max-width: 11em; white-space: normal; overflow-wrap: anywhere; font-size: 16px; line-height: 1.25; font-weight: 700; letter-spacing: .02em; color: #b40059; text-align: center; }
/* Release #821f (25 Nov 2026): the feed action row must stay four EQUAL
   pills on ONE straight line. .gc-fb-actions is display:flex, whose
   default align-items:stretch makes every pill as tall as the tallest
   item — the old label-above-Share column was ~62px, so Like / Comment
   / Save stretched to ~62px and, with border-radius:999px, read as
   giant circles. The label is gone from feed cards, and this rule
   centres the pills so no future tall item can stretch them again.
   Specificity (0,3,1) beats the base (0,2,1) rule in
   community-feed-cleanup.css regardless of sheet order. */
body.community-unified-theme .social-stream .gc-fb-actions{align-items:center}
.hk-share-dialog .hk-share-section-title { display: flex; align-items: center; gap: .6rem; margin: 1.1rem 0 .6rem; }
.hk-share-dialog .hk-share-section-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border: 2px solid #e8b93b; border-radius: 999px; background: linear-gradient(180deg, #1a56db, #1235ff); color: #fff; font-size: 1rem; font-weight: 800; white-space: nowrap; }
.hk-share-dialog .hk-share-section-pill .hk-share-svg { width: 1.25rem; height: 1.25rem; }
.hk-share-dialog .hk-share-section-rule { flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #e8b93b, #f5d76e); }
.hk-share-dialog .hk-share-destinations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.hk-share-dialog .hk-share-destination { box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: .5rem; min-width: 0; min-height: 3.25rem; margin: 0; border: 2px solid #e8b93b; border-radius: .9rem; padding: .55rem .5rem; color: #fff; font-weight: 800; text-align: center; cursor: pointer; transition: filter .15s ease, transform .1s ease; }
.hk-share-dialog .hk-share-destination:hover { filter: brightness(1.08); }
.hk-share-dialog .hk-share-destination:active { transform: scale(.98); }
.hk-share-dialog .hk-share-dest-community { background: linear-gradient(180deg, #d4006e, #b40059); }
.hk-share-dialog .hk-share-dest-message { background: linear-gradient(180deg, #1a56db, #1235ff); }
.hk-share-dialog .hk-share-dest-friend { background: linear-gradient(180deg, #8b3fd9, #6d28b8); }
.hk-share-dialog .hk-share-destination-icon { flex: 0 0 auto; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; }
.hk-share-dialog .hk-share-destination-icon .hk-share-svg { width: 100%; height: 100%; }
.hk-share-dialog .hk-share-destination-text { line-height: 1.25; overflow-wrap: anywhere; }
.hk-share-dialog .hk-share-image-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: stretch; }
.hk-share-dialog .hk-share-create-image { background: linear-gradient(180deg, #d4006e, #b40059); }
.hk-share-dialog .hk-share-image-size { box-sizing: border-box; width: 100%; min-height: 2.75rem; border: 1px solid #a9b9db; border-radius: .65rem; padding: .55rem; background: #fff; color: #142449; font: inherit; }
.hk-share-dialog .hk-share-image-status { margin: .3rem 0 .6rem; color: #14633e; font-size: 1rem; overflow-wrap: anywhere; }
.hk-share-dialog .hk-share-image-status:empty { display: none; }
.hk-share-dialog .hk-share-image-download { color: #1b3982; text-decoration: underline; }
/* #814: on narrow screens the destinations and the image row stack to
   one column. This block sits AFTER the base rules (same specificity,
   so it wins); the earlier narrow-screen block above only restyles the
   dialog and the outside grid. */
@media (max-width: 560px) {
  .hk-share-dialog .hk-share-destinations { grid-template-columns: 1fr; }
  .hk-share-dialog .hk-share-image-row { grid-template-columns: 1fr; }
}

/* ONE UNIQUE SHARE PATTERN (owner order 26 Nov 2026): the in-pop-up
   login form and the friend picker behind the community options.
   Approved colours only; 16px floor; 44px targets. */
.hk-share-dialog .hk-share-checking { margin: .4rem 0; color: #495875; font-size: 1rem; }
.hk-share-dialog .hk-share-login { display: grid; gap: .55rem; margin-top: .4rem; }
.hk-share-dialog .hk-share-login-intro { margin: 0; color: #142449; font-size: 1rem; line-height: 1.45; }
.hk-share-dialog .hk-share-login-input { box-sizing: border-box; width: 100%; min-height: 2.75rem; border: 1px solid #a9b9db; border-radius: .65rem; padding: .55rem .7rem; color: #142449; background: #fff; font-size: 1rem; }
.hk-share-dialog .hk-share-login-input:focus-visible { outline: 3px solid #b77516; outline-offset: 2px; }
.hk-share-dialog .hk-share-login-submit { box-sizing: border-box; width: 100%; min-height: 2.75rem; border: 2px solid #e8b93b; border-radius: .9rem; background: #b40059; color: #fff; font-size: 1rem; font-weight: 800; cursor: pointer; }
.hk-share-dialog .hk-share-login-submit:disabled { opacity: .65; cursor: default; }
.hk-share-dialog .hk-share-login-resend { box-sizing: border-box; min-height: 2.75rem; border: 1px solid #102658; border-radius: .65rem; background: #fff; color: #102658; font-size: 1rem; font-weight: 700; cursor: pointer; }
.hk-share-dialog .hk-share-login-forgot { color: #1b3982; font-size: 1rem; text-decoration: underline; }
.hk-share-dialog .hk-share-back { box-sizing: border-box; min-height: 2.75rem; border: 1px solid #102658; border-radius: .65rem; background: #fff; color: #102658; font-size: 1rem; font-weight: 700; cursor: pointer; padding: .4rem .9rem; }
.hk-share-dialog .hk-share-picker-note { margin: .5rem 0; color: #142449; font-size: 1rem; }
.hk-share-dialog .hk-share-picker-search { box-sizing: border-box; width: 100%; min-height: 2.75rem; border: 1px solid #a9b9db; border-radius: .65rem; padding: .55rem .7rem; color: #142449; background: #fff; font-size: 1rem; }
.hk-share-dialog .hk-share-picker-search:focus-visible { outline: 3px solid #b77516; outline-offset: 2px; }
.hk-share-dialog .hk-share-picker-results { display: grid; gap: .4rem; margin-top: .55rem; max-height: 16rem; overflow-y: auto; }
.hk-share-dialog .hk-share-picker-row { box-sizing: border-box; width: 100%; min-height: 2.75rem; border: 1px solid #d7c8e6; border-radius: .65rem; background: #fff; color: #142449; font-size: 1rem; font-weight: 700; text-align: left; padding: .5rem .7rem; cursor: pointer; overflow-wrap: anywhere; }
.hk-share-dialog .hk-share-picker-row:hover { background: #fff8fb; }
.hk-share-dialog .hk-share-picker-row:disabled { opacity: .65; cursor: default; }
.hk-share-dialog .hk-share-picker-empty { margin: .3rem 0; color: #495875; font-size: 1rem; }
