/* Deeper profile (docs/flutter/SOCIALE.md «Profilo e privacy per campo»): person links (web/person.js), the public
   profile with cover, accent and sections, «Modifica profilo» with live preview (web/social.js). Tokens only: the
   colours of the illustrations and accents come from design/profile_art.json through inline custom properties. */

/* ---- person links: a name or avatar that opens the profile */
.tg-person { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; color: inherit; text-decoration: none; font-weight: 750; }
.tg-person:hover .tg-person-name, .tg-person:focus-visible .tg-person-name { text-decoration: underline; text-underline-offset: 3px; }
.tg-person.is-plain { cursor: default; }
.tg-person-avatar, .social-note-who, .grp-person-link.is-face { display: inline-flex; flex: none; border-radius: 50%; }
.grp-person-link { color: inherit; text-decoration: none; }
.grp-person-link:hover strong, .grp-person-link:focus-visible strong { text-decoration: underline; text-underline-offset: 3px; }
.grp-voters .grp-person-link { font-weight: 750; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.tg-profile-name-link, .tu-plain-head h1 a { color: inherit; text-decoration: none; }
.tg-profile-name-link:hover, .tg-profile-name-link:focus-visible, .tu-plain-head h1 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.social-note { display: flex; align-items: center; gap: 12px; }
.social-note-main { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.sfy-member { display: flex; align-items: center; gap: 4px; }
.sfy-member .sfy-member-btn { flex: 1; min-width: 0; }
.sfy-member-profile { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; color: var(--ink-2); }
.sfy-member-profile:hover, .sfy-member-profile:focus-visible { background: var(--surface-2); color: var(--ink); }
.sfy-member-profile .sfy-i { width: 20px; height: 20px; }

/* ---- illustrated avatars (web/profile-art.js) */
.social-avatar.is-art, .grp-person.is-art, .dm-avatar.is-art { background: var(--surface-2); }
.social-avatar.is-art svg, .grp-person.is-art svg, .dm-avatar.is-art svg { display: block; width: 100%; height: 100%; }
.social-avatar.is-md { width: 46px; height: 46px; }
.social-avatar.is-lg { width: 58px; height: 58px; }

/* ---- public profile: cover, accent, travel style, sections */
.pf-profile { --pf-accent: var(--accent); --pf-accent-ink: var(--accent-ink); }
.pf-profile .social-avatar.is-xl, .pf-profile .social-avatar.is-lg { box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--pf-accent); }
.pf-cover { position: relative; overflow: hidden; background: var(--surface-2); }
.pf-cover.has-photo img, .pf-cover.is-art svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.pf-cover::after { content: 'THE GUIDE'; position: absolute; right: 12px; top: 10px; padding: 3px 8px; border: 2px dashed var(--pf-accent); border-radius: var(--radius-sm, 6px); background: var(--surface); color: var(--ink); font-size: var(--type-caption-size); font-weight: 800; letter-spacing: .14em; transform: rotate(4deg); opacity: .92; }
.pf-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: var(--type-body-s-size); font-weight: 700; }
.pf-chip.is-accent { border-color: var(--pf-accent); background: color-mix(in srgb, var(--pf-accent) 14%, var(--surface)); }
.pf-travel { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.pf-about-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pf-about-list li { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 10px; align-items: start; }
.pf-about-k { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--type-body-s-size); font-weight: 750; }
.pf-about-k .social-i { width: 16px; height: 16px; }
.pf-about-v { display: flex; flex-wrap: wrap; gap: 6px; font-weight: 700; }
.pf-stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.pf-stamp-item { display: grid; justify-items: center; gap: 4px; text-align: center; }
.pf-stamp-art { display: grid; place-items: center; width: 96px; height: 96px; }
.pf-stamp-art svg { width: 100%; height: 100%; }
.pf-stamp-label { color: var(--ink-2); font-size: var(--type-caption-size); font-weight: 750; }

/* ---- «Modifica profilo» */
.pf-form { display: grid; gap: 16px; }
.pf-group { display: grid; gap: 12px; margin: 0; border: 2px solid var(--color-outline); }
.pf-preview { position: sticky; top: 8px; z-index: 2; }
.pf-preview-card { overflow: hidden; border: 2px solid var(--color-outline); border-radius: var(--radius-lg, 16px); background: var(--surface); box-shadow: 4px 4px 0 var(--color-outline); }
.pf-preview-card .cm-band { height: 72px; margin: 0; }
.pf-preview-id { display: flex; align-items: flex-end; gap: 12px; padding: 0 14px; margin-top: -26px; }
.pf-preview-id strong { display: block; font-size: var(--type-title-size); line-height: 1.15; }
.pf-preview-id small { color: var(--muted); font-size: var(--type-body-s-size); }
.pf-preview-card .pf-travel, .pf-preview-bio, .pf-preview-note { margin: 8px 14px 0; }
.pf-preview-bio { color: var(--ink-2); font-size: var(--type-body-s-size); }
.pf-preview-note { display: flex; align-items: center; gap: 6px; padding-bottom: 12px; color: var(--muted); font-size: var(--type-caption-size); }
.pf-preview-note .social-i { width: 14px; height: 14px; }
.pf-field-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pf-field-label { font-weight: 800; }
.pf-who { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: var(--type-body-s-size); }
.pf-who .social-i { width: 14px; height: 14px; }
.pf-who select { min-height: 36px; padding: 4px 8px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 750; }
.pf-presets, .pf-covers, .pf-accents { display: grid; gap: 10px; }
.pf-presets { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
.pf-covers { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.pf-accents { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.pf-preset, .pf-cover-pick, .pf-accent-pick { position: relative; display: grid; justify-items: center; gap: 4px; padding: 6px; border: 2px solid transparent; border-radius: var(--radius-md, 12px); cursor: pointer; text-align: center; }
.pf-preset input, .pf-cover-pick input, .pf-accent-pick input { position: absolute; opacity: 0; pointer-events: none; }
.pf-preset:has(input:checked), .pf-cover-pick:has(input:checked), .pf-accent-pick:has(input:checked) { border-color: var(--color-outline); background: var(--surface-2); }
.pf-preset:has(input:focus-visible), .pf-cover-pick:has(input:focus-visible), .pf-accent-pick:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.pf-preset-art { display: grid; place-items: center; width: 56px; height: 56px; overflow: hidden; border: 2px solid var(--color-outline); border-radius: 50%; background: var(--surface-2); }
.pf-preset-art svg { width: 100%; height: 100%; }
.pf-preset-label { color: var(--ink-2); font-size: var(--type-caption-size); font-weight: 750; }
.pf-cover-swatch { display: block; width: 100%; height: 44px; overflow: hidden; border: 2px solid var(--color-outline); border-radius: var(--radius-sm, 8px); background: var(--cover, var(--surface-2)); }
.pf-cover-swatch.is-art svg { display: block; width: 100%; height: 100%; }
.pf-accent-dot { width: 36px; height: 36px; border: 2px solid var(--color-outline); border-radius: 50%; background: var(--pf-accent, var(--accent)); }
.pf-cover-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pf-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-pick { position: relative; display: inline-flex; cursor: pointer; }
.pf-pick input { position: absolute; opacity: 0; pointer-events: none; }
.pf-pick span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1.6px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: var(--type-body-s-size); font-weight: 800; }
.pf-pick input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.pf-pick input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.pf-layout { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.pf-layout-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 4px 8px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-md, 12px); background: var(--surface); }
.pf-layout-show { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; }
.pf-layout-show input { width: 20px; height: 20px; accent-color: var(--accent); }
.pf-layout-move { display: inline-flex; gap: 2px; }
.pf-layout-move .pf-up { transform: rotate(90deg); }
.pf-layout-move .pf-down { transform: rotate(90deg); }
#pf-handle-note.is-bad { color: var(--danger); font-weight: 750; }

@media (min-width: 900px) {
  .pf-form { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .pf-form > .pf-preview { grid-column: 2; grid-row: 1 / span 6; }
  .pf-form > :not(.pf-preview) { grid-column: 1; }
}

/* Moderation notifications (web/social.js notificationsPage): title, then the whole text on several lines, never cut. */
.social-note p.social-note-system { display: grid; gap: 2px; white-space: normal; overflow: visible; text-overflow: clip; -webkit-line-clamp: unset; }
.social-note-title { display: block; }
.social-note-text { display: block; white-space: normal; overflow-wrap: anywhere; }
.social-note p.social-note-system small { white-space: normal; }

/* Profile photo in full screen (web/avatar-viewer.js). */
.tg-avatar-zoom { display: inline-flex; flex: none; padding: 0; margin: 0; border: 0; background: none; color: inherit; border-radius: 50%; cursor: zoom-in; }
.tg-avatar-zoom:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
html.tg-av-open, html.tg-av-open body { overflow: hidden; }
.tg-avatar-viewer { --tg-av-fade: 1; position: fixed; inset: 0; z-index: var(--layer-overlay); }
.tg-av-backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--color-block-ink) 94%, transparent); opacity: 0; transition: opacity var(--motion-slow) var(--motion-ease); }
.tg-avatar-viewer.is-open .tg-av-backdrop { opacity: var(--tg-av-fade); }
.tg-av-stage { position: absolute; inset: 0; display: grid; place-items: center; padding: calc(72px + var(--layout-safe-top)) 16px calc(150px + var(--layout-safe-bottom)); }
.tg-av-figure { margin: 0; width: min(86vw, 58vh, 560px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: var(--elevation-4); touch-action: none; cursor: grab; will-change: transform;
  transition: transform var(--motion-slow) var(--motion-ease), border-radius var(--motion-slow) var(--motion-ease); }
.tg-avatar-viewer.is-open .tg-av-figure { border-radius: var(--radius-lg); }
.tg-av-pic { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--surface-2); }
.tg-av-pic.is-art svg { display: block; width: 100%; height: 100%; }
.tg-av-bar { position: absolute; left: 0; right: 0; bottom: 0; display: grid; justify-items: center; gap: 8px; padding: 16px 16px calc(24px + var(--layout-safe-bottom)); text-align: center; color: var(--color-block-ink-text);
  opacity: 0; transform: translateY(12px); transition: opacity var(--motion-slow) var(--motion-ease), transform var(--motion-slow) var(--motion-ease); }
.tg-avatar-viewer.is-open .tg-av-bar { opacity: 1; transform: none; }
.tg-av-name { margin: 0; font: var(--type-title); }
.tg-av-state { margin: 0; font-size: var(--type-body-s-size); }
.tg-av-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tg-av-close { position: absolute; top: calc(12px + var(--layout-safe-top)); right: 12px; width: 48px; height: 48px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: color-mix(in srgb, var(--color-block-ink-text) 18%, transparent); color: var(--color-block-ink-text); opacity: 0; transition: opacity var(--motion-slow) var(--motion-ease); }
.tg-avatar-viewer.is-open .tg-av-close { opacity: 1; }
.tg-av-close:focus-visible, .tg-av-action:focus-visible { outline: 3px solid var(--color-yellow); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .tg-av-figure, .tg-av-backdrop, .tg-av-bar, .tg-av-close { transition: opacity var(--motion-fast) linear; transform: none; }
}

/* «Le mie segnalazioni» (web/reports-mine.js). */
.rm-page { display: grid; gap: 14px; }
.rm-i { width: 20px; height: 20px; flex: none; }
.rm-block { display: grid; gap: 8px; }
.rm-list { display: grid; gap: 6px; }
.rm-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: var(--border-width) solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: inherit; text-decoration: none; }
.rm-row:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rm-row-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); }
.rm-row-icon.is-own { background: var(--sea-soft); color: var(--sea); }
.rm-row-copy { display: grid; gap: 2px; flex: 1; min-width: 0; }
.rm-row-copy strong, .rm-row-text { overflow-wrap: anywhere; }
.rm-row-copy small, .rm-row-text { color: var(--muted); font-size: var(--type-body-s-size); }
.rm-chip { flex: none; align-self: center; padding: 4px 10px; border-radius: var(--radius-pill); font-size: var(--type-caption-size); font-weight: 800; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.rm-chip.is-sent, .rm-chip.is-pending { background: var(--gold-soft); color: var(--ink); }
.rm-chip.is-review, .rm-chip.is-auto_hidden { background: var(--warn-soft); color: var(--ink); }
.rm-chip.is-removed, .rm-chip.is-refused, .rm-chip.is-suspended { background: var(--danger-soft); color: var(--ink); }
.rm-chip.is-conform, .rm-chip.is-visible { background: var(--ok-soft); color: var(--ink); }
.rm-empty { margin: 0; color: var(--muted); }
.rm-status { display: grid; gap: 8px; justify-items: start; }
.rm-status p { margin: 0; }
.rm-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rm-steps li { display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--muted); position: relative; }
.rm-steps li + li::before { content: ""; position: absolute; top: 14px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.rm-steps li.is-done + li::before, .rm-steps li.is-done + li.is-current::before { background: var(--accent); }
.rm-step-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); color: var(--accent-ink); }
.rm-step-dot .rm-i { width: 16px; height: 16px; }
.rm-steps li.is-done .rm-step-dot { background: var(--accent); border-color: var(--accent); }
.rm-steps li.is-current { color: var(--ink); }
.rm-steps li.is-current .rm-step-dot { border-color: var(--accent); }
.rm-step-copy { display: grid; gap: 2px; }
.rm-step-copy small { font-size: var(--type-caption-size); }
.rm-facts { margin: 0; display: grid; gap: 8px; }
.rm-facts div { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 10px; }
.rm-facts dt { color: var(--muted); font-weight: 700; }
.rm-facts dd { margin: 0; overflow-wrap: anywhere; }
.rm-preview { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-md); background: var(--surface-2); color: inherit; text-decoration: none; }
.rm-preview img { width: 56px; height: 56px; flex: none; border-radius: var(--radius-xs); object-fit: cover; }
.rm-preview-copy { display: grid; gap: 2px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rm-preview.is-empty { margin: 0; color: var(--muted); }
.rm-appeal { display: grid; gap: 8px; justify-items: start; padding: 14px; border-radius: var(--radius-md); border: var(--border-width) dashed var(--line-strong); }
.rm-appeal p { margin: 0; }
.rm-appeal-status { font-weight: 750; }
.rm-privacy { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--muted); font-size: var(--type-body-s-size); }
.cm-friend > .tg-avatar-zoom { margin-left: 8px; }
.cm-friend > .tg-avatar-zoom .social-avatar { width: 46px; height: 46px; font-size: var(--type-body-l-size); border: 2px solid var(--color-outline); }
