.project-share { position: relative; width: max-content; }
.project-share-trigger {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px; padding: 10px 18px; border: 1px solid #9cb4a4;
  border-radius: 999px; color: #294e38; background: #edf4ef;
  box-shadow: 0 2px 4px rgb(25 43 35 / 4%);
  font: 600 14px/1.4 var(--sans); cursor: pointer; list-style: none;
  transition: background 150ms, border-color 150ms, box-shadow 150ms;
}
.project-share-trigger::-webkit-details-marker { display: none; }
.project-share-trigger::marker { content: ''; }
.project-share-trigger::after { content: ''; width: 6px; height: 6px; margin: -3px 1px 0 3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.project-share[open] > .project-share-trigger::after { transform: rotate(225deg); margin-top: 3px; }
.project-share-trigger:hover, .project-share[open] > .project-share-trigger { background: #e2eee5; border-color: #6f927c; box-shadow: 0 3px 8px rgb(25 43 35 / 8%); }
.project-share svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.project-share-panel {
  position: absolute; z-index: 45; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: min(288px, calc(100vw - 32px)); padding: 12px;
  border: 1px solid #cddbd2; border-radius: 18px; background: #fff; color: #192b23;
  box-shadow: 0 18px 48px -16px rgb(25 43 35 / 26%), 0 2px 6px rgb(25 43 35 / 4%); text-align: left;
}
.project-share:not([open]) > .project-share-panel { display: none; }
.project-share-label { margin: 4px 10px 10px; color: #4f6256; font: 600 12px/1.5 var(--sans); }
.project-share-panel > :is(a, button) {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px;
  padding: 9px 10px; border: 0; border-radius: 11px; background: transparent;
  color: #253c2e; font: 550 14px/1.4 var(--sans); text-decoration: none; text-align: left; cursor: pointer;
}
.project-share-panel > :is(a, button):hover { background: #f2f6f3; }
.project-share-panel small { color: #627168; font-size: 12px; }
.project-share-panel .share-outward { margin-left: auto; color: #6f8175; font-size: 16px; }
.share-platform-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; }
.share-platform-icon.is-x { background: #eff1f0; color: #1b2520; }
.share-platform-icon.is-xhs { background: #fff0f2; color: #d82e49; }
.share-platform-icon.is-facebook { background: #edf3ff; color: #1762c4; }
.share-platform-icon.is-link { background: #edf4ef; color: #3c684c; }
.share-xhs-mark { font: 700 9px/1 var(--sans); white-space: nowrap; }
.project-share-panel > .project-share-copy { border-top: 1px solid #e8edea; border-radius: 0 0 9px 9px; margin-top: 6px; padding-top: 12px; }
.project-share-status { margin: 0 10px; color: #42614e; font: 400 12px/1.5 var(--sans); }
.project-share-status:empty { display: none; }
.project-share-status:not(:empty) { padding-top: 6px; }
.project-share-manual { width: 100%; margin-top: 8px; padding: 8px; color: #253c2e; background: #f6f8f7; border: 1px solid #dce4df; border-radius: 6px; font: 12px/1.5 var(--sans); resize: none; }
.project-share :is(summary, a, button, textarea):focus-visible,
.project-xhs-dialog :is(a, button, textarea):focus-visible { outline: 2px solid #318768; outline-offset: 3px; }
.project-xhs-dialog {
  position: fixed; width: min(760px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px);
  margin: auto; padding: 32px; overflow: auto; border: 1px solid #dce4df; border-radius: 24px;
  color: #192b23; background: #fff; font-family: var(--sans); box-shadow: 0 30px 90px rgb(10 30 20 / 20%);
}
.project-xhs-dialog::backdrop { background: rgb(10 25 17 / 42%); backdrop-filter: blur(6px); }
.project-xhs-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f2f6f3; color: #42614e; font: 28px/1 var(--sans); cursor: pointer; }
.project-xhs-eyebrow { color: #627168; font: 500 11px/1.5 var(--sans); letter-spacing: .08em; }
.project-xhs-dialog h2 { margin: 10px 36px 12px 0; font: 550 26px/1.25 var(--sans); letter-spacing: -.025em; }
#project-xhs-description { max-width: 600px; margin: 0; color: #627168; font: 400 14px/1.75 var(--sans); }
.project-xhs-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 24px; margin-top: 24px; }
.project-xhs-cover { overflow: hidden; border: 1px solid #e3e8e5; border-radius: 14px; background: #fafcfb; }
.project-xhs-cover img { display: block; width: 100%; height: auto; object-fit: contain; }
.project-xhs-cover [data-cover-status] { min-height: 190px; display: grid; place-items: center; margin: 0; padding: 20px; color: #627168; font: 13px/1.7 var(--sans); }
.project-xhs-caption label { display: block; margin-bottom: 8px; color: #42614e; font: 500 12px/1.5 var(--sans); }
.project-xhs-caption textarea { display: block; width: 100%; min-height: 170px; padding: 12px; border: 1px solid #dce4df; border-radius: 10px; color: #253c2e; background: #fafcfb; font: 400 13px/1.7 var(--sans); resize: vertical; }
.project-share-action { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 15px; border: 1px solid #dce4df; border-radius: 999px; background: #fff; color: #334f40; font: 500 13px/1.4 var(--sans); cursor: pointer; text-decoration: none; }
.project-share-action:hover { background: #f4f7f5; }
.project-share-action:disabled { cursor: wait; opacity: .6; }
.project-xhs-caption .project-share-action { margin-top: 10px; }
.project-xhs-caption [data-copy-status] { margin: 8px 0 0; font: 400 12px/1.5 var(--sans); color: #507961; }
.project-xhs-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.project-share-action.is-primary { background: #203e30; border-color: #203e30; color: #fff; }
.project-share-action.is-primary:hover { background: #2f5742; }
.project-xhs-help { margin: 14px 0 0; color: #627168; font: 400 12px/1.7 var(--sans); }
@media (max-width: 540px) {
  .project-share-trigger { min-height: 44px; }
  .project-xhs-dialog { padding: 24px 20px; border-radius: 18px; }
  .project-xhs-dialog h2 { font-size: 22px; }
  .project-xhs-content { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .project-xhs-cover { max-width: 240px; margin-inline: auto; }
  .project-xhs-actions .project-share-action { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .project-share-trigger { transition: none; } }
