.tg-connection-identity { display: flex; align-items: center; gap: 1rem; }
.tg-connection-identity > div:last-child { min-width: 0; }
.tg-connection-identity__profile-links { display: flex; flex-wrap: wrap; gap: .75rem; }
.tg-connection-identity h1, .tg-connection-identity h2 { color: inherit; font-size: clamp(1.4rem, 4vw, 1.8rem); line-height: 1.3; margin: 0 0 .4rem; overflow-wrap: anywhere; }
.tg-connection-identity__portrait { display: grid; place-items: center; flex: 0 0 3.5rem; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: #deebd0; font-size: 1.5rem; font-weight: 700; }
.tg-connection-identity__portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
/* Public connection landing page; sharing dialogs retain their shared styles below. */
.tg-connect-page { --app-body-font: "Albert Sans", "Segoe UI", sans-serif; font-family: var(--app-body-font); min-height: 100dvh; margin: 0; background: #f5f7f3; color: #17201d; }
.tg-connect { width: min(100%, 46rem); margin: 0 auto; padding: 0 0 3rem; }
.tg-connect [hidden] { display: none !important; }
.tg-connect-topbar { display: flex; align-items: center; justify-content: space-between; width: min(100% - 2rem, 46rem); min-height: 56px; margin: auto; padding-top: env(safe-area-inset-top); }
.tg-connect-brand { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.15rem; font-weight: 750; color: #214e39; text-decoration: none; }
.tg-connect-brand img { width: 32px; height: 32px; object-fit: contain; }
.tg-connect :is(button, a) { -webkit-tap-highlight-color: transparent; }
.tg-connect :is(button, a, input, [tabindex]):focus-visible, .tg-connect-topbar a:focus-visible { outline: 3px solid #517441; outline-offset: 3px; }
.tg-connect h1 { font-size: clamp(2rem, 5vw, 2.5rem); font-weight: 700; line-height: 1.08; letter-spacing: -.035em; margin: .65rem 0 .3rem; color: #111915; overflow-wrap: anywhere; }
.tg-connect h2 { margin: 0; font-size: 1.2rem; font-weight: 650; line-height: 1.3; color: #17201d; }
.tg-connect-hero { height: auto; min-height: 0; padding: 0; background: transparent; }
.tg-connect-cover { height: 180px; border-radius: 0; overflow: hidden; background: #e2eadb; }
.tg-connect-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.tg-connect-cover--empty { height: 96px; background: #e2e9df; }
.tg-connect-hero .tg-connection-identity__portrait { position: relative; display: grid; place-items: center; width: 104px; height: 104px; margin: -60px 0 0; border: 4px solid #f5f7f3; border-radius: 50%; background: #dbe7ce; font-size: 2rem; font-weight: 700; }
.tg-connect-hero .tg-connection-identity__portrait img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.tg-connect-avatar-link { position: absolute; inset: 0; border-radius: inherit; cursor: zoom-in; }
.tg-connect-avatar-dialog { border: 0; border-radius: 1rem; padding: 3rem 1rem 1rem; max-width: calc(100vw - 2rem); max-height: calc(100vh - 2rem); }
.tg-connect-avatar-dialog::backdrop { background: rgb(0 0 0 / 75%); }
.tg-connect-avatar-dialog img { display: block; max-width: 100%; max-height: calc(100vh - 6rem); width: auto; height: auto; object-fit: contain; }
.tg-connect-avatar-dialog .close-modal { position: absolute; top: .5rem; right: .5rem; }
.tg-connect-identity { display: inline-block; color: #415b47; font-size: 1rem; font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.tg-connect-bio { margin: .8rem 0 0; line-height: 1.5; font-size: 1rem; overflow-wrap: anywhere; }
.tg-connect__actions { display: flex; margin-top: 1.2rem; }
.tg-connect .tg-pill-button { min-height: 48px; text-align: center; white-space: normal; overflow-wrap: anywhere; }
.tg-connect__actions > .tg-pill-button { width: 100%; min-height: 54px; justify-content: space-between; gap: .7rem; padding: .8rem 1rem; border-radius: 20px; background: #415e48; color: white; font-size: 1.05rem; }
.tg-connect-quick { display: flex; gap: .55rem; margin-top: .85rem; }
.tg-connect-quick > :is(a, button) { flex: 1; display: flex; flex-direction: column; gap: .5rem; align-items: center; justify-content: center; padding: .7rem .25rem; min-width: 0; min-height: 68px; border: 1px solid #e6eae3; border-radius: 14px; background: #eaf0e8; color: #17201d; font: inherit; font-size: .82rem; text-decoration: none; cursor: pointer; }
.tg-connect-quick .ph { flex-shrink: 0; width: 24px; height: 24px; color: #415e48; }
.tg-connect .ph-butterfly { color: #1485ff; }
.tg-connect [data-connect-open="fediverse"] > .ph { color: #6654d9; }
.tg-connect__preview { display: flex; flex-direction: column; margin: 0 1.1rem; }
.tg-connect__preview > section { border-top: 1px solid #e0e6dd; padding-top: .8rem; margin-top: 1.3rem; }
.tg-connect-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.tg-connect-section-heading > a { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 44px; font-size: .85rem; color: #42653b; }
.tg-connect-activities { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: .55rem; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px .7rem; overscroll-behavior-x: contain; }
.tg-connect-activity { display: flex; flex-direction: column; align-items: start; gap: .3rem; padding: .65rem; border: 1px solid #e6ebe3; border-radius: 14px; background: #fff; text-decoration: none; color: #253e2d; scroll-snap-align: start; min-width: 0; }
.tg-connect-activity img { width: 100%; height: 110px; object-fit: cover; border-radius: 7px; }
.tg-connect-activity--book img { object-fit: contain; }
.tg-connect-activity > span { font-size: .8rem; color: #5d6b56; }
.tg-connect-activity strong { font-size: .95rem; line-height: 1.35; overflow-wrap: anywhere; }
.tg-connect-activity small { color: #5d6b56; overflow-wrap: anywhere; }
.tg-connect__post-list { display: flow-root; }
.tg-connect__post-media { display: contents; }
.tg-connect__links-section { margin: 1.8rem 1.1rem 0; }
.tg-connect__preview > .tg-connect__links-section { margin: 1.3rem 0 0; }
.tg-connect__links { margin-top: .6rem; }
.tg-connect__links a { min-height: 44px; overflow-wrap: anywhere; }
.tg-connect-sticky { position: fixed; z-index: 100; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: calc(.5rem + env(safe-area-inset-top)) max(1rem, calc((100vw - 46rem) / 2)) .5rem; background: #f7f8f2; border-bottom: 1px solid #dce3d4; }
.tg-connect-sticky > span { font-weight: 650; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-connect-sticky .tg-pill-button { flex-shrink: 0; max-width: 55%; font-size: .85rem; }
.tg-connect-sheet { box-sizing: border-box; position: fixed; inset: auto 0 0; width: 100%; max-width: 100%; max-height: calc(100dvh - max(1rem, env(safe-area-inset-top))); margin: 0; padding: 1.3rem 1.2rem calc(1.3rem + env(safe-area-inset-bottom)); border: 1px solid #dce3d4; border-radius: 28px 28px 0 0; background: #fafbf9; color: #213e32; overflow-y: auto; overscroll-behavior: contain; }
.tg-connect-sheet::backdrop { background: rgb(21 40 28 / 48%); }
.tg-connect-sheet-heading { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: 1.2rem; }
.tg-connect-sheet-heading h2 { flex: 1; padding: 0; font-size: 1.3rem; font-weight: 700; letter-spacing: -.025em; overflow-wrap: anywhere; }
.tg-connect-sheet-heading h2:focus { outline: none; }
.tg-connect-sheet-heading button { flex-shrink: 0; min-width: 44px; min-height: 44px; }
.tg-connect-sheet p { font-size: .9rem; line-height: 1.5; }
.tg-connect-sheet [role=status]:empty { margin: 0; }
.tg-connect-sheet [data-connect-panel] { margin-top: 1rem; }
.tg-connect-methods { display: grid; gap: .65rem; }
.tg-connect-methods > :is(button, a) { display: flex; align-items: center; gap: .7rem; min-height: 66px; padding: .85rem; border: 1px solid #e0e5dc; border-radius: 14px; font: inherit; color: #17201d; background: #fff; text-decoration: none; cursor: pointer; text-align: left; }
.tg-connect-method-copy { flex: 1; display: grid; gap: .3rem; min-width: 0; }
.tg-connect-method-copy strong { font-size: .95rem; font-weight: 600; }
.tg-connect-method-copy small { color: #677169; font-size: .8rem; line-height: 1.4; overflow-wrap: anywhere; }
.tg-connect-method-icon { flex: 0 0 34px; width: 34px; height: 34px; color: #415e48; }
.tg-connect-methods .ph-caret-right { margin-left: auto; flex-shrink: 0; color: #69756b; }
.tg-connect-methods p { margin: 0; }

.tg-connect__email-form { display: grid; gap: .75rem; }
.tg-connect__email-form p { margin: 0; }
.tg-connect .input-field { box-sizing: border-box; width: 100%; min-width: 0; margin: 0; min-height: 48px; font-size: 1rem; }
@media (min-width: 768px) {
  .tg-connect-topbar { min-height: 68px; }
  .tg-connect-cover { height: 240px; border-radius: 20px 20px 0 0; }
  .tg-connect-cover--empty { height: 100px; }
  .tg-connect-activities { grid-auto-columns: minmax(0, 1fr); overflow: visible; }
  .tg-connect-sheet { inset: 0; width: min(100% - 2rem, 30rem); max-height: calc(100dvh - 4rem); margin: auto; border-radius: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .tg-connect *, .tg-connect *::before, .tg-connect *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.tg-connection-share { width: min(100%, 34rem); }
.tg-connection-share__actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.tg-connection-share__settings { display: grid; gap: .65rem; margin-top: 1rem; }
.tg-connection-share__settings label { font-weight: 600; }
.tg-connection-share__url { width: 100%; margin-top: 1rem; }
.tg-people-connect-card { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.tg-people-connect-card h2, .tg-people-connect-card p { margin: 0; }
.tg-people-connect-card p { margin-top: .4rem; }
.tg-people-familiar-search { display: grid; gap: .5rem; margin: .5rem 0 1rem; }
.tg-people-shared-circle-settings-disclosure { margin: 1rem 0; }
.tg-people-shared-circle-settings-disclosure summary { cursor: pointer; font-weight: 600; }
.tg-group-invite-status { flex-basis: 100%; }

@media (max-width: 767px) { .tg-connection-share__actions > * { flex: 1; justify-content: center; } }

.tg-connect-profile-summary { position: relative; margin-top: -10px; padding: 1px 1.1rem 1.2rem; border-radius: 12px 12px 0 0; background: #f5f7f3; }
.tg-connect__actions [data-connect-primary-label] { flex: 1; text-align: left; }
.tg-connect__actions .ph { flex-shrink: 0; width: 22px; height: 22px; }
.tg-connect-section-heading > a { gap: .3rem; text-decoration: none; }
.tg-connect-activity-category { display: flex; align-items: center; gap: .35rem; min-height: 23px; margin-bottom: .2rem; }
.tg-connect-activity-category .ph { width: 16px; height: 16px; color: #405b44; }
.tg-connect-activity-rating { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: auto; padding-top: .3rem; }
.tg-connect-activity-stars { display: flex; color: #ee9a19; }
.tg-connect-activity-stars .ph { width: 14px; height: 14px; }
.tg-connect-activity-stars .is-unrated { color: #dbe0d7; }
.tg-connect-sheet::before { content: ''; display: block; width: 44px; height: 5px; margin: -.4rem auto 1rem; border-radius: 9px; background: #a9b0a7; }
.tg-connect-sheet .tg-connect-sheet-intro { color: #677169; margin: 0 0 1.1rem; }
.tg-connect-sheet-more-heading { margin: 1.2rem 0 .8rem; padding-top: 1rem; border-top: 1px solid #e0e5dc; font-size: 1rem; font-weight: 600; }

.tg-connect-sticky > button > .ph { display: none; }

.tg-connect-sheet-heading .tg-icon-button { width: 44px; height: 44px; padding: 10px; background: transparent; border-radius: 50%; }
.tg-connect-sheet-heading .ph { width: 22px; height: 22px; }
.tg-connect-sheet .tg-connect__email-form { gap: .7rem; }
.tg-connect-sheet .tg-connect__email-form label { font-size: .9rem; font-weight: 600; }
.tg-connect-sheet .tg-connect__email-form .input-field { border-radius: 12px; padding: .8rem; background: #fff; }
.tg-connect-sheet .tg-connect__email-form p { color: #677169; font-size: .85rem; }
.tg-connect-sheet .tg-connect__email-form .tg-pill-button { margin-top: .4rem; border-radius: 14px; }
.tg-connect-handle { box-sizing: border-box; display: flex; align-items: center; gap: 1rem; width: 100%; min-height: 64px; margin: 0 0 .65rem; padding: .9rem; border: 1px solid #e0e5dc; border-radius: 14px; font: inherit; text-align: left; background: #f0f3ed; color: #213e32; cursor: pointer; }
.tg-connect-handle > .ph { width: 22px; height: 22px; flex-shrink: 0; }
.tg-connect-sheet [data-connect-panel="fediverse"] > .tg-connect-handle { margin-top: 1rem; }
.tg-connect-sheet [data-connect-panel="more"] > .tg-connect-methods { margin-top: 1.2rem; }
.tg-connect-sheet :is(.tg-connect-handle, .tg-connect-methods > a, .tg-connect-methods > button):hover { background: #eaf0e6; }
.tg-connect-activity-progress { font-weight: 600; }
