/* Groups (web/groups.js): #gruppi, #gruppo/<id> (bacheca), #gruppo/<id>/info, #join/<code>, home slot, «Proponi al gruppo».
   Mobile first (no horizontal overflow at 360 px), light and dark tokens of app.css. */
.grp-page { min-width: 0; }
.grp-i { width: 18px; height: 18px; flex: none; }
.grp-back { margin: 4px 0 2px; }
.grp-center { justify-content: center; }
.grp-fine { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: 12.5px; line-height: 1.45; margin: 10px 0 0; }
.grp-fine .grp-i { width: 15px; height: 15px; margin-top: 1px; }
.grp-h2 { font: 650 21px/1.2 var(--display); letter-spacing: -.01em; margin: 0; font-stretch: var(--display-stretch);}
.grp-h3 { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.grp-block { margin: 26px 0 0; min-width: 0; }
.grp-block-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.grp-count { min-width: 24px; height: 24px; padding: 0 8px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 800; display: inline-grid; place-items: center; }
.grp-optional { font-weight: 600; color: var(--muted); font-size: 12px; }

/* Group avatar: the emoji on a soft disc of the group colour. */
.grp-avatar { --gc: var(--accent); width: 50px; height: 50px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 26px; line-height: 1;
  background: color-mix(in srgb, var(--gc) 20%, var(--surface)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gc) 38%, transparent); }
.grp-avatar.is-xl { width: 72px; height: 72px; border-radius: 22px; font-size: 38px; }
.grp-person { --pc: var(--sea); width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--pc); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.grp-person img { width: 100%; height: 100%; object-fit: cover; }
.grp-person.is-xs { width: 28px; height: 28px; font-size: 10.5px; }
.grp-person.is-more { background: var(--surface-3); color: var(--ink-2); }

/* ---------- #gruppi ---------- */
.grp-list-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.grp-list-actions .button { flex: 1 1 auto; white-space: nowrap; padding: 0 16px; }
.grp-welcome { text-align: center; padding: 26px 18px 20px; border-radius: var(--r-xl); background: radial-gradient(120% 80% at 50% 0%, var(--accent-soft) 0%, transparent 70%), var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.grp-welcome h2 { font: 650 24px/1.2 var(--display); margin: 14px 0 6px; font-stretch: var(--display-stretch);}
.grp-welcome > p { color: var(--ink-2); max-width: 36ch; margin: 0 auto 16px; }
.grp-welcome .grp-list-actions { margin: 18px 0 4px; }
.grp-welcome .grp-fine { justify-content: center; text-align: left; }
.grp-welcome-art { display: flex; justify-content: center; }
.grp-welcome-art span { --gc: var(--accent); width: 58px; height: 58px; margin: 0 -7px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; background: color-mix(in srgb, var(--gc) 22%, var(--surface)); border: 3px solid var(--surface); box-shadow: var(--shadow-1); }
.grp-welcome-art span:nth-child(2) { transform: translateY(-8px); z-index: 1; }
.grp-steps-intro { list-style: none; padding: 0; margin: 0 auto; display: grid; gap: 8px; max-width: 340px; text-align: left; }
.grp-steps-intro li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg-elev); font-weight: 650; font-size: 14px; }
.grp-steps-intro b { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 13px; }
.grp-empty-mark { display: block; font-size: 38px; margin-bottom: 8px; }

/* ---------- Forms and sheets ---------- */
.grp-form .field { margin: 12px 0; }
.grp-emoji-field { border: 0; padding: 0; margin: 14px 0 6px; min-width: 0; }
.grp-emoji-field legend { font-size: 13px; font-weight: 750; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.grp-emoji-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.grp-emoji { position: relative; display: block; cursor: pointer; }
.grp-emoji input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.grp-emoji > span[aria-hidden] { display: grid; place-items: center; aspect-ratio: 1; min-height: 42px; border-radius: 14px; font-size: 22px; background: var(--bg-elev); box-shadow: inset 0 0 0 1.5px var(--line); transition: .15s var(--ease); }
.grp-emoji input:checked + span { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); transform: scale(1.04); }
.grp-emoji input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.grp-code-input { text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }

/* ---------- #gruppo/<id> ---------- */
.grp-hero { --gc: var(--accent); display: flex; align-items: center; gap: 16px; margin: 8px 0 12px; }
.grp-hero-copy { min-width: 0; flex: 1; }
.grp-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grp-hero-copy h1 { font: 650 clamp(26px, 7vw, 34px)/1.08 var(--display); letter-spacing: -.02em; margin: 4px 0 4px; overflow-wrap: anywhere; font-stretch: var(--display-stretch);}
.grp-hero-copy p { color: var(--muted); font-size: 14px; font-weight: 650; margin: 0; }
.grp-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; }
.grp-hero-actions .button { flex: 1 1 auto; }
.grp-settings-btn { flex: none; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); }

.grp-tastes { display: flex; flex-wrap: wrap; gap: 8px; }
.grp-taste { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: var(--r-pill); background: var(--sea-soft); color: var(--sea); font-weight: 750; font-size: 13.5px; }

/* Plans */
.grp-plan { position: relative; padding: 16px; margin: 0 0 12px; border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); min-width: 0; scroll-margin-top: calc(var(--header-h) + 16px); }
.grp-plan::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.grp-plan.is-confirmed::before { background: var(--ok); }
.grp-plan.is-cancelled { opacity: .78; }
.grp-plan.is-cancelled::before { background: var(--line-strong); }
.grp-plan.is-focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent), var(--shadow-2); }
.grp-plan-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.grp-pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 800; letter-spacing: .02em; background: var(--accent-soft); color: var(--accent-deep); }
.grp-pill .grp-i { width: 13px; height: 13px; }
.grp-pill.is-confirmed { background: var(--ok-soft); color: var(--ok); }
.grp-pill.is-cancelled { background: var(--surface-2); color: var(--muted); }
.grp-plan-source { color: var(--muted); font-size: 12px; font-weight: 700; min-width: 0; }
.grp-plan-title { font-size: 18px; line-height: 1.25; margin: 0 0 4px; overflow-wrap: anywhere; }
.grp-plan-when { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--ink-2); font-weight: 700; font-size: 14px; }
.grp-plan-when .grp-i { width: 16px; height: 16px; color: var(--accent-deep); }
.grp-steps { list-style: none; counter-reset: step; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.grp-step { counter-increment: step; min-width: 0; }
.grp-step > a, .grp-step > span { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); background: var(--bg-elev); text-decoration: none; color: inherit; min-width: 0; }
.grp-step > a::before, .grp-step > span::before { content: counter(step); width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); font-size: 11.5px; font-weight: 800; }
.grp-step-copy { display: grid; flex: 1; min-width: 0; }
.grp-step strong { display: block; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.grp-step small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-step-go { margin-left: auto; color: var(--muted); width: 16px; height: 16px; }
.grp-steps.is-compact .grp-step > a, .grp-steps.is-compact .grp-step > span { padding: 7px 9px; }

.grp-votes { margin: 14px 0 0; }
.grp-tally { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--surface-2); margin-bottom: 10px; gap: 2px; }
.grp-tally i { display: block; min-width: 0; }
.grp-tally .is-yes { background: var(--ok); }
.grp-tally .is-maybe { background: var(--warn); }
.grp-tally .is-no { background: var(--danger); }
.grp-tally .is-none { background: var(--surface-3); }
.grp-vote-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grp-vote { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 8px; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); font-weight: 750; font-size: 14px; transition: .15s var(--ease); min-width: 0; }
.grp-vote b { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--surface); font-size: 11.5px; }
.grp-vote:active { transform: scale(.96); }
.grp-vote.is-yes[aria-pressed="true"] { background: var(--ok); color: #fff; }
.grp-vote.is-maybe[aria-pressed="true"] { background: var(--warn); color: #fff; }
.grp-vote.is-no[aria-pressed="true"] { background: var(--danger); color: #fff; }
.grp-vote[aria-pressed="true"] b { background: rgba(255, 255, 255, .25); color: inherit; }
@media (prefers-color-scheme: dark) { .grp-vote[aria-pressed="true"] { color: #0e1a1f; } .grp-vote[aria-pressed="true"] b { background: rgba(0, 0, 0, .18); } }
.grp-vote-summary { color: var(--muted); font-size: 12.5px; font-weight: 650; margin: 8px 0 0; }

.grp-comments { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.grp-comments > summary { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; color: var(--ink-2); font-weight: 750; font-size: 13.5px; }
.grp-comments > summary .grp-i { width: 17px; height: 17px; }
.grp-comment-list { display: grid; gap: 10px; margin: 8px 0 10px; }
.grp-comments-all { font-size: 13px; padding: 4px 0 0; }
.grp-comment { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.grp-comment p { margin: 0; font-size: 14px; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.grp-comment small { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.grp-comment-form { display: flex; gap: 6px; align-items: center; }
.grp-comment-form input { flex: 1; min-width: 0; min-height: 42px; border-radius: var(--r-pill); }
.grp-comment-form .icon-button { flex: none; background: var(--accent); color: var(--accent-ink); }
.grp-plan-manage { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
/* Weekend proposals */
.grp-loading { display: grid; gap: 10px; }
.grp-loading p { color: var(--muted); font-size: 13.5px; font-weight: 650; margin: 0; }
.grp-skeleton { display: block; height: 76px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: grp-shimmer 1.3s linear infinite; }
@keyframes grp-shimmer { to { background-position: -200% 0; } }
.grp-weather { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 0 0 12px; }
.grp-wday { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 26%, var(--surface)) 0%, var(--surface) 70%); border: 1px solid var(--line); min-width: 0; }
.grp-wday.is-rain { background: linear-gradient(135deg, var(--sea-soft) 0%, var(--surface) 75%); }
.grp-wicon { font-size: 26px; line-height: 1; flex: none; }
.grp-wcopy { display: grid; min-width: 0; flex: 1; }
.grp-wcopy strong { font-size: 14px; }
.grp-wcopy small { color: var(--muted); font-size: 11.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-wtemp { display: grid; justify-items: end; flex: none; line-height: 1.15; }
.grp-wtemp b { font-size: 16px; }
.grp-wtemp small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.grp-wtemp .grp-wrain { color: var(--sea); }
/* Members and my participation */
.grp-member-list { list-style: none; padding: 0; margin: 0; border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); overflow: hidden; }
.grp-member { display: flex; align-items: center; gap: 12px; padding: 11px 12px 11px 14px; min-width: 0; }
.grp-member + .grp-member { border-top: 1px solid var(--line); }
.grp-member-copy { display: grid; min-width: 0; flex: 1; }
.grp-member-copy strong { font-size: 15px; overflow-wrap: anywhere; }
.grp-member-copy strong small { color: var(--muted); font-weight: 650; }
.grp-member-copy > small { color: var(--muted); font-size: 12.5px; font-weight: 650; }
.grp-share { color: var(--muted); }
.grp-share.is-on { color: var(--ok); font-weight: 750; }
.grp-remove { flex: none; color: var(--muted); }
.grp-invite-cta { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--accent-soft); color: var(--ink); text-align: left; }
.grp-invite-cta > span:first-child { font-size: 26px; }
.grp-invite-cta > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.grp-invite-cta small { color: var(--ink-2); font-size: 13px; }
.grp-me-card { padding: 4px 16px; border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); margin-top: 12px; }
.grp-switch { display: flex; align-items: center; gap: 14px; padding: 12px 0; cursor: pointer; min-width: 0; }
.grp-me-card .grp-switch + .grp-switch, .grp-me-card .grp-consent-note + .grp-switch { border-top: 1px solid var(--line); }
.grp-switch-copy { display: grid; gap: 2px; flex: 1; min-width: 0; }
.grp-switch-copy strong { font-size: 15px; }
.grp-switch-copy small { color: var(--muted); font-size: 12.5px; line-height: 1.4; font-weight: 600; }
.grp-switch input[role="switch"] { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; border-radius: 14px; margin: 0; position: relative; background: var(--surface-3); box-shadow: inset 0 0 0 1.5px var(--line-strong); cursor: pointer; transition: background .18s var(--ease); }
.grp-switch input[role="switch"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s var(--ease); }
.grp-switch input[role="switch"]:checked { background: var(--ok); box-shadow: none; }
.grp-switch input[role="switch"]:checked::after { transform: translateX(20px); }
.grp-switch input[role="switch"]:disabled { opacity: .5; }
.grp-consent-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: -4px 0 10px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--warn-soft); color: color-mix(in srgb, var(--warn) 70%, var(--ink)); font-size: 12.5px; font-weight: 650; }
.grp-consent-note span { flex: 1 1 160px; }
.grp-consent-note .grp-i { width: 15px; height: 15px; }
.grp-consent-note .text-button { padding: 0; font-size: 13px; }

/* Settings (owner / admin) */
.grp-settings { border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); }
.grp-settings > summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.grp-settings > summary > span:last-child { display: grid; flex: 1; min-width: 0; }
.grp-settings > summary small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.grp-settings > summary::after { content: "+"; font-size: 22px; color: var(--muted); }
.grp-settings[open] > summary::after { content: "–"; }
.grp-settings-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.grp-settings > form, .grp-settings > .grp-digest-now { margin: 0 16px; }
.grp-digest { border: 0; padding: 12px 0 0; margin: 14px 0 12px; border-top: 1px solid var(--line); min-width: 0; }
.grp-digest legend { font: 650 18px/1.2 var(--display); padding: 0; float: left; width: 100%; margin-bottom: 4px; font-stretch: var(--display-stretch);}
.grp-digest legend + * { clear: both; }
.grp-segment { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); margin-top: 6px; }
.grp-segment label { position: relative; cursor: pointer; }
.grp-segment input { position: absolute; opacity: 0; pointer-events: none; }
.grp-segment span { display: grid; place-items: center; min-height: 38px; padding: 0 8px; border-radius: var(--r-pill); font-weight: 750; font-size: 13px; color: var(--muted); text-align: center; }
.grp-segment input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.grp-segment input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); }
.grp-digest-now { padding: 14px 0 16px; margin-top: 16px !important; border-top: 1px solid var(--line); }
.grp-digest-now p { color: var(--ink-2); font-size: 13.5px; }
.grp-danger { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; margin: 28px 0 8px; }

/* Invite sheet and join page */
.grp-code-box { display: grid; justify-items: center; gap: 2px; padding: 14px; margin: 14px 0 4px; border-radius: var(--r-lg); background: var(--bg-elev); border: 1.5px dashed var(--line-strong); }
.grp-code-box small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.grp-code { font: 800 clamp(22px, 7vw, 28px)/1.2 var(--font); letter-spacing: .16em; color: var(--ink); overflow-wrap: anywhere; text-align: center; }
.grp-invite .field input { font-size: 13.5px; }
.grp-invite-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.grp-invite-actions .button { flex: 1 1 140px; }
.grp-join { max-width: 520px; margin: 0 auto; }
.grp-join-card { margin-top: 12px; padding: 26px 20px 18px; border-radius: var(--r-xl); text-align: center; background: radial-gradient(120% 70% at 50% 0%, var(--accent-soft) 0%, transparent 70%), var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.grp-join-card h1 { font: 650 clamp(26px, 7vw, 32px)/1.1 var(--display); letter-spacing: -.02em; margin: 6px 0 8px; font-stretch: var(--display-stretch);}
.grp-join-card .app-kicker { margin-top: 18px; }
.grp-join-lead { color: var(--ink-2); max-width: 34ch; margin: 0 auto; }
.grp-join-points { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; text-align: left; }
.grp-join-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.grp-join-points .grp-i { color: var(--sea); margin-top: 2px; }
.grp-join-card .button + .button { margin-top: 8px; }

/* Voters, plan reasons, comment removal, personal-account notice */
.grp-voters { color: var(--ink-2); font-size: 13px; font-weight: 700; margin: 8px 0 0; overflow-wrap: anywhere; }
.grp-voters + .grp-vote-summary { margin-top: 2px; }
.grp-why { list-style: none; padding: 0; margin: 12px 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.grp-why li { padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 700; }
.grp-why.is-plan { margin: 10px 0 0; }
.grp-comment { position: relative; }
.grp-comment-del { flex: none; width: 28px; height: 28px; margin-left: auto; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.grp-comment-del:hover { background: var(--surface-2); }
.grp-comment-del .grp-i { width: 14px; height: 14px; }
.grp-account-notice { margin: 0 0 18px; }
.grp-join-card > .grp-avatar { margin: 0 auto; }
.grp-join-share { text-align: left; border-top: 1px solid var(--line); margin-top: 4px; }
.grp-invite-switch { border-top: 1px solid var(--line); margin-bottom: 12px; }

@media (min-width: 560px) {
  .grp-hero-actions .button { flex: 0 0 auto; }
}
@media (max-width: 360px) {
  .grp-vote { gap: 4px; padding: 0 4px; font-size: 13px; }
  .grp-vote > span[aria-hidden] { display: none; }
  .grp-avatar.is-xl { width: 60px; height: 60px; font-size: 32px; }
}

/* ---------- Groups list: chat-like rows (#gruppi, «Gruppi» of #amici) ---------- */
.grp-list { min-width: 0; }
.grp-rows { display: grid; gap: 8px; margin: 0 0 18px; }
.grp-row { --gc: var(--accent); display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px 12px 12px; border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); text-decoration: none; color: inherit; min-width: 0; transition: transform .12s var(--ease), box-shadow .15s; }
.grp-row:hover { box-shadow: var(--shadow-2); }
.grp-row:active { transform: scale(.99); }
.grp-row.has-unread { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.grp-row-avatar { position: relative; flex: none; }
.grp-badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 800; border: 2px solid var(--surface); }
.grp-row-copy { display: grid; gap: 3px; min-width: 0; flex: 1; }
.grp-row-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.grp-row-top strong { font-size: 16px; line-height: 1.25; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-row-top time { flex: none; color: var(--muted); font-size: 12px; font-weight: 700; }
.grp-row.has-unread .grp-row-top time { color: var(--accent-deep); }
.grp-row-last { color: var(--muted); font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.grp-row.has-unread .grp-row-last { color: var(--ink); font-weight: 700; }
.grp-row-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; min-width: 0; }
.grp-row-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-height: 26px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 750; min-width: 0; }
.grp-row-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.grp-row-chip .grp-i { width: 14px; height: 14px; }
.grp-row-chip.is-poll.is-todo { background: var(--accent-soft); color: var(--accent-deep); }
.grp-row-chip.is-plan { background: var(--sea-soft); color: var(--sea); }
@media (prefers-color-scheme: dark) { .grp-row-chip.is-poll.is-todo, .grp-row.has-unread .grp-row-top time { color: var(--accent); } }

/* ---------- Home slot 'groups' ---------- */
.grp-home { min-width: 0; }
.grp-home-list { display: grid; gap: 8px; }
.grp-home-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); text-decoration: none; color: inherit; min-width: 0; }
.grp-home-tile.is-poll { background: linear-gradient(120deg, var(--accent-soft) 0%, var(--surface) 70%); }
.grp-home-tile.is-poll.is-done { background: var(--surface); }
.grp-home-icon { width: 42px; height: 42px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--bg-elev); }
.grp-home-copy { display: grid; gap: 1px; min-width: 0; flex: 1; }
.grp-home-copy small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-home-copy strong { font-size: 15px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.grp-home-copy em { font-style: normal; color: var(--ink-2); font-size: 12.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-home-cta { flex: none; padding: 7px 12px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 800; }
.grp-home-invite { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 16px; border-radius: var(--r-xl); background: radial-gradient(120% 90% at 0% 0%, var(--accent-soft) 0%, transparent 70%), var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.grp-home-invite-copy { display: grid; gap: 2px; flex: 1 1 180px; min-width: 0; }
.grp-home-invite-copy small { color: var(--ink-2); font-size: 13px; }
.grp-welcome-art.is-small span { width: 42px; height: 42px; font-size: 20px; margin: 0 -6px; border-width: 2px; }
.grp-welcome-art.is-small { justify-content: flex-start; padding-left: 6px; }

/* ---------- Bacheca ---------- */
/* The composer sticks above the bottom navigation: the page ends right above it (no extra gap). */
.workspace:has(.grp-board) { padding-bottom: calc(var(--nav-h) + var(--safe-bottom)); }
main:has(.grp-board) { padding-bottom: 0; }
.grp-board { display: flex; flex-direction: column; min-height: calc(100dvh - var(--header-h) - var(--safe-top) - var(--nav-h) - var(--safe-bottom) - 8px); }
.grp-board-head { --gc: var(--accent); position: sticky; top: calc(var(--header-h) + var(--safe-top)); z-index: 22; display: flex; align-items: center; gap: 6px; margin: -8px calc(-1 * var(--gutter)) 0; padding: 8px calc(var(--gutter) - 6px) 8px calc(var(--gutter) - 10px); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.grp-head-back { flex: none; }
.grp-head-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: inherit; padding: 2px 4px; border-radius: var(--r-md); }
.grp-avatar.is-sm { width: 40px; height: 40px; border-radius: 13px; font-size: 21px; }
.grp-head-copy { display: grid; min-width: 0; }
.grp-head-copy strong { font: 650 18px/1.15 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-stretch: var(--display-stretch);}
.grp-head-copy small { color: var(--muted); font-size: 12.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-head-btn { flex: none; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }

/* Pinned: open polls and the next plan */
.grp-pins { display: grid; gap: 8px; margin: 12px 0 0; }
.grp-pin { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); text-align: left; color: inherit; min-width: 0; }
.grp-pin.is-poll.is-todo { background: linear-gradient(120deg, var(--accent-soft) 0%, var(--surface) 75%); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.grp-pin.is-plan { background: linear-gradient(120deg, var(--sea-soft) 0%, var(--surface) 75%); }
.grp-pin-icon { font-size: 20px; flex: none; }
.grp-pin-copy { display: grid; min-width: 0; flex: 1; }
.grp-pin-copy strong { font-size: 14.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-pin-copy small { color: var(--ink-2); font-size: 12px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-pin-cta { flex: none; padding: 6px 11px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 800; }
.grp-pin.is-todo .grp-pin-cta, .grp-pin.is-plan .grp-pin-cta { background: var(--accent); color: var(--accent-ink); }

/* «Idee del sistema per il weekend» */
.grp-ideas-strip { margin: 12px 0 0; border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); min-width: 0; }
.grp-ideas-strip > summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.grp-ideas-strip > summary::-webkit-details-marker { display: none; }
.grp-ideas-mark { width: 34px; height: 34px; flex: none; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 40%, var(--surface)) 0%, var(--accent-soft) 100%); font-size: 17px; }
.grp-ideas-title { display: grid; min-width: 0; flex: 1; }
.grp-ideas-title strong { font-size: 14.5px; }
.grp-ideas-title small { color: var(--muted); font-size: 12px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-ideas-chev { color: var(--muted); transition: transform .2s var(--ease); }
.grp-ideas-strip[open] .grp-ideas-chev { transform: rotate(180deg); }
.grp-ideas-body { padding: 0 14px 14px; min-width: 0; }
.grp-idea-rail { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 8px; margin: 0 -14px; padding-left: 14px; padding-right: 14px; scroll-padding: 0 14px; scrollbar-width: none; }
.grp-idea-rail::-webkit-scrollbar { display: none; }
.grp-idea-card { flex: 0 0 min(250px, 78%); scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--r-md); background: var(--bg-elev); border: 1.5px solid transparent; min-width: 0; transition: border-color .15s, background .15s; }
.grp-idea-card.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 60%, var(--bg-elev)); }
.grp-idea-card h3 { font: 650 17px/1.2 var(--display); margin: 0; overflow-wrap: anywhere; font-stretch: var(--display-stretch);}
.grp-idea-when { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--accent-deep); font-weight: 800; font-size: 12px; }
.grp-idea-when .grp-i { width: 14px; height: 14px; }
.grp-idea-steps { margin: 0; color: var(--ink-2); font-size: 12.5px; font-weight: 650; line-height: 1.35; }
.grp-idea-why { margin: 0; color: var(--sea); font-size: 12px; font-weight: 700; }
.grp-idea-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; }
.grp-idea-pick, .grp-idea-go { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 0 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 800; }
.grp-idea-pick { flex: 1; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink-2); }
.grp-idea-pick[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.grp-idea-pick .grp-i { width: 15px; height: 15px; }
.grp-idea-go { background: var(--surface-2); color: var(--ink-2); }
.grp-idea-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 6px; }
.grp-idea-bar p { flex: 1 1 180px; margin: 0; color: var(--ink-2); font-size: 12.5px; font-weight: 650; }
.grp-idea-bar .button { flex: 0 0 auto; }
@media (prefers-color-scheme: dark) { .grp-idea-when, .grp-plan-when .grp-i { color: var(--accent); } }

/* The stream */
.grp-feed { flex: 1; min-width: 0; padding: 8px 0 6px; }
.grp-feed-top { display: flex; justify-content: center; margin: 6px 0 4px; }
.grp-older { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-2); font-size: 13px; font-weight: 750; }
.grp-older .grp-i { width: 15px; height: 15px; }
.grp-origin { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.grp-stream { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.grp-post { min-width: 0; scroll-margin-top: calc(var(--header-h) + 80px); scroll-margin-bottom: 150px; animation: grp-in .22s var(--ease); }
@keyframes grp-in { from { opacity: 0; transform: translateY(6px); } }
.grp-post.is-cont { margin-top: -7px; }
.grp-post.is-focus > .grp-plan, .grp-post.is-focus > .grp-poll, .grp-post.is-focus .grp-reminder, .grp-post.is-focus .grp-bubble { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 50%, transparent), var(--shadow-2); }
.grp-day-sep, .grp-unread-sep { display: flex; justify-content: center; margin: 8px 0 10px; }
.grp-day-sep span { padding: 4px 12px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; font-weight: 800; letter-spacing: .02em; }
.grp-unread-sep { align-items: center; gap: 10px; color: var(--accent-deep); font-size: 12px; font-weight: 800; }
.grp-unread-sep::before, .grp-unread-sep::after { content: ""; flex: 1; height: 1.5px; background: color-mix(in srgb, var(--accent) 40%, transparent); }

/* Messages */
.grp-msg { display: flex; align-items: flex-end; gap: 8px; min-width: 0; }
.grp-person.is-xxs { width: 22px; height: 22px; font-size: 9px; }
.grp-msg > .grp-person, .grp-msg-gap { flex: none; width: 28px; }
.grp-bubble { position: relative; max-width: min(78%, 480px); padding: 8px 12px 6px; border-radius: 18px 18px 18px 6px; background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); min-width: 0; }
.grp-post.is-cont .grp-bubble { border-top-left-radius: 8px; }
.grp-msg-name { --pc: var(--sea); display: block; color: var(--pc); font-size: 12.5px; font-weight: 800; margin-bottom: 1px; }
.grp-bubble p { margin: 0; font-size: 15px; line-height: 1.42; overflow-wrap: anywhere; }
.grp-msg-meta { display: flex; justify-content: flex-end; align-items: center; gap: 2px; color: var(--muted); font-size: 10.5px; font-weight: 700; margin-top: 2px; min-height: 16px; }
.grp-post.is-mine .grp-msg { justify-content: flex-end; }
.grp-post.is-mine .grp-bubble { background: var(--accent); color: var(--accent-ink); border-color: transparent; border-radius: 18px 18px 6px 18px; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 22%, transparent); }
.grp-post.is-mine.is-cont .grp-bubble { border-top-right-radius: 8px; }
.grp-post.is-mine .grp-msg-meta { color: color-mix(in srgb, var(--accent-ink) 78%, transparent); }
.grp-post.is-pending .grp-bubble { opacity: .72; }
.grp-post.is-failed .grp-bubble { background: var(--danger-soft); color: var(--ink); }
.grp-retry { color: var(--danger); font-size: 11.5px; font-weight: 800; text-decoration: underline; }
.grp-msg-more { flex: none; width: 26px; height: 18px; margin: -2px -6px -2px 2px; border-radius: 9px; display: grid; place-items: center; color: inherit; opacity: .7; }
.grp-msg-more .grp-i { width: 16px; height: 16px; }
.grp-msg-more:hover, .grp-msg-more:focus-visible { background: color-mix(in srgb, currentColor 14%, transparent); opacity: 1; }
.grp-reminder-top > .grp-msg-more { width: 28px; height: 22px; margin: -1px -4px 0 -4px; color: var(--muted); }

/* System lines */
.grp-sys { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 8px; margin: 0 auto; max-width: 90%; text-align: center; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.grp-sys time { font-size: 11px; opacity: .8; }

/* Cards in the stream (proposals and polls) */
.grp-post.is-card { display: grid; gap: 6px; }
.grp-card-by { display: flex; align-items: center; gap: 7px; margin: 0 4px; color: var(--ink-2); font-size: 12.5px; font-weight: 650; min-width: 0; }
.grp-card-by > span:not(.grp-person):not(.grp-sys-dot) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-card-by time { flex: none; color: var(--muted); font-size: 11px; font-weight: 700; }
.grp-sys-dot { font-size: 14px; }
.grp-post .grp-plan { margin: 0; }
.grp-plan.is-past { opacity: .82; }

/* RSVP and reminders */
.grp-rsvp { margin: 14px 0 0; }
.grp-rsvp-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.grp-rsvp-btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 10px; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); font-weight: 800; font-size: 14.5px; min-width: 0; transition: .15s var(--ease); }
.grp-rsvp-btn b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: inline-grid; place-items: center; background: var(--surface); font-size: 12px; }
.grp-rsvp-btn:active { transform: scale(.97); }
.grp-rsvp-btn.is-yes { background: var(--ok-soft); color: var(--ok); }
.grp-rsvp-btn.is-yes[aria-pressed="true"] { background: var(--ok); color: #fff; }
.grp-rsvp-btn.is-no[aria-pressed="true"] { background: var(--ink-2); color: var(--bg); }
.grp-rsvp-btn[aria-pressed="true"] b { background: rgba(255, 255, 255, .25); color: inherit; }
@media (prefers-color-scheme: dark) { .grp-rsvp-btn.is-yes[aria-pressed="true"] { color: #0e1a1f; } }
.grp-rsvp-who { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--ink-2); font-size: 13px; font-weight: 700; min-width: 0; }
.grp-rsvp-who > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.grp-faces-mini { display: inline-flex; flex: none; }
.grp-faces-mini .grp-person { border: 2px solid var(--surface); margin-right: -6px; }
.grp-faces-mini .grp-person:last-child { margin-right: 0; }
.grp-rsvp.is-compact { margin: 10px 0 0; }
.grp-rsvp.is-compact .grp-rsvp-btn { min-height: 38px; font-size: 13.5px; }
.grp-remind { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 42px; margin-top: 10px; border-radius: var(--r-md); background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink-2); font-size: 13.5px; font-weight: 800; }
.grp-remind .grp-i { width: 17px; height: 17px; color: var(--accent-deep); }
.grp-reminded { display: flex; align-items: center; gap: 7px; margin: 10px 0 0; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.grp-reminded .grp-i { width: 15px; height: 15px; }
.grp-reminder { padding: 12px 12px 12px 14px; border-radius: var(--r-lg); background: linear-gradient(120deg, color-mix(in srgb, var(--gold) 26%, var(--surface)) 0%, var(--surface) 80%); border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); min-width: 0; }
.grp-reminder-top { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.grp-reminder-top p { flex: 1; min-width: 0; margin: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.grp-reminder-top time { flex: none; color: var(--muted); font-size: 11px; font-weight: 700; margin-top: 2px; }
.grp-reminder-icon { font-size: 20px; line-height: 1.1; flex: none; }
.grp-reminder-copy { margin-left: 30px; min-width: 0; }
.grp-reminder-copy p { margin: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.grp-reminder-when { color: var(--ink-2); font-size: 12.5px !important; font-weight: 700; margin-top: 2px !important; }
.grp-reminder-note { margin-top: 8px !important; padding: 7px 11px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 75%, transparent); font-style: italic; }
.grp-inline-link { display: inline; padding: 0; color: var(--accent-deep); font-weight: 800; text-align: left; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
@media (prefers-color-scheme: dark) { .grp-inline-link, .grp-remind .grp-i { color: var(--accent); } }

/* Polls */
.grp-poll { position: relative; padding: 14px 14px 12px; border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); min-width: 0; overflow: hidden; }
.grp-poll::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--accent) 0%, var(--gold) 100%); }
.grp-poll.is-closed::before { background: var(--ok); }
.grp-poll-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.grp-poll-icon { font-size: 16px; }
.grp-poll-who { flex: 1; min-width: 0; color: var(--ink-2); font-size: 12.5px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-countdown { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 4px 9px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.grp-countdown .grp-i { width: 13px; height: 13px; }
.grp-countdown.is-soon { background: var(--warn-soft); color: color-mix(in srgb, var(--warn) 75%, var(--ink)); }
.grp-countdown.is-closed { background: var(--ok-soft); color: var(--ok); }
.grp-poll-q { font: 650 21px/1.2 var(--display); margin: 8px 0 2px; overflow-wrap: anywhere; font-stretch: var(--display-stretch);}
.grp-poll-hint { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; font-weight: 650; }
.grp-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.grp-option { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; padding: 9px 10px 9px 10px; border-radius: var(--r-md); background: var(--bg-elev); box-shadow: inset 0 0 0 1.5px var(--line); text-align: left; color: inherit; overflow: hidden; isolation: isolate; min-width: 0; transition: box-shadow .15s, transform .12s var(--ease); }
button.grp-option:active { transform: scale(.985); }
.grp-option-bar { position: absolute; inset: 0 auto 0 0; z-index: -1; background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: inherit; transition: width .35s var(--ease); }
.grp-option.is-leading .grp-option-bar { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.grp-option.is-mine { box-shadow: inset 0 0 0 2px var(--accent); }
.grp-option-check { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); color: transparent; font-size: 14px; }
.grp-option-check .grp-i { width: 15px; height: 15px; stroke-width: 2.6; }
.grp-option.is-mine .grp-option-check { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.grp-option.is-winner { box-shadow: inset 0 0 0 2px var(--ok); }
.grp-option.is-winner .grp-option-bar { background: color-mix(in srgb, var(--ok) 20%, transparent); }
.grp-option.is-winner .grp-option-check { background: var(--ok-soft); box-shadow: none; color: inherit; }
.grp-option-copy { display: grid; gap: 1px; flex: 1; min-width: 0; }
.grp-option-copy strong { font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.grp-option-copy small { color: var(--ink-2); font-size: 12px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-option-copy .grp-option-steps { color: var(--muted); }
.grp-option-side { display: flex; align-items: center; gap: 6px; flex: none; }
.grp-option-side .grp-faces-mini .grp-person { border-color: var(--bg-elev); }
.grp-option-count { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; display: inline-grid; place-items: center; background: var(--surface); font-size: 13px; font-weight: 800; }
.grp-option.is-leading .grp-option-count { background: var(--accent); color: var(--accent-ink); }
.grp-poll.is-closed .grp-option:not(.is-winner) { opacity: .7; }
.grp-poll-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.grp-chip-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 13px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 800; text-decoration: none; }
.grp-chip-btn .grp-i { width: 15px; height: 15px; }
.grp-chip-btn.is-quiet { background: transparent; color: var(--muted); }
.grp-chip-btn.is-accent { background: var(--ok); color: #fff; }
@media (prefers-color-scheme: dark) { .grp-chip-btn.is-accent { color: #0e1a1f; } }
.grp-sheet-card .grp-plan, .grp-sheet-card .grp-poll { box-shadow: none; }

/* Composer (sticky above the bottom navigation, like Iris) */
.grp-dock { position: sticky; bottom: calc(var(--nav-h) + var(--safe-bottom)); z-index: 20; margin: 6px calc(-1 * var(--gutter)) 0; padding: 8px var(--gutter) 10px; background: var(--bg); box-shadow: 0 -12px 16px -8px var(--bg); }
.grp-dock-actions { display: flex; gap: 8px; margin-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.grp-dock-actions::-webkit-scrollbar { display: none; }
.grp-dock-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 34px; padding: 0 13px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink-2); font-size: 13px; font-weight: 800; white-space: nowrap; }
.grp-composer { display: flex; align-items: flex-end; gap: 8px; padding: 5px 5px 5px 16px; border-radius: 24px; background: var(--surface); box-shadow: var(--card-shadow); border: var(--card-border); }
.grp-composer textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 132px; padding: 9px 0; border: 0; background: transparent; resize: none; font-size: 15px; line-height: 1.4; box-shadow: none !important; outline: none; }
.grp-send { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.grp-send .grp-i { width: 19px; height: 19px; }
.grp-jump { position: absolute; left: 50%; top: -42px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--r-pill); background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 800; box-shadow: var(--shadow-2); white-space: nowrap; }
.grp-jump .grp-i { width: 15px; height: 15px; }
@media (min-width: 960px) {
  .workspace:has(.grp-board) { padding-bottom: 0; }
  .grp-dock { bottom: 0; }
  .grp-board { min-height: calc(100dvh - var(--header-h) - 40px); }
}

/* Sheets: «Proponi al gruppo», new poll, add option, reminder */
.grp-propose-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); background: var(--bg-elev); margin-bottom: 4px; min-width: 0; }
.grp-propose-emoji { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--surface); }
.grp-propose-item > span:last-child { display: grid; min-width: 0; }
.grp-propose-item strong { font-size: 15.5px; overflow-wrap: anywhere; }
.grp-propose-item small { color: var(--muted); font-size: 12.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-propose-to { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 14.5px; }
.grp-choice { border: 0; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; min-width: 0; }
.grp-choice legend { font-size: 13px; font-weight: 750; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.grp-choice-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg-elev); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; min-width: 0; }
.grp-choice-row input { position: absolute; opacity: 0; pointer-events: none; }
.grp-choice-row > span:last-child { display: grid; min-width: 0; flex: 1; }
.grp-choice-row strong { font-size: 14.5px; }
.grp-choice-row small { color: var(--muted); font-size: 12.5px; font-weight: 650; overflow-wrap: anywhere; }
.grp-choice-row:has(input:checked) { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent-soft) 55%, var(--bg-elev)); }
.grp-choice-row:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.grp-choice-row::after { content: ""; width: 20px; height: 20px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-strong); }
.grp-choice-row:has(input:checked)::after { box-shadow: inset 0 0 0 6px var(--accent); }
.grp-sheet-ideas { margin: 4px 0 6px; min-width: 0; }
.grp-sheet-label { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--ink-2); font-size: 12.5px; font-weight: 800; }
.grp-sheet-label .grp-i { width: 15px; height: 15px; color: var(--accent-deep); }
.grp-chip-rail { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.grp-chip-rail::-webkit-scrollbar { display: none; }
.grp-idea-chip { display: grid; gap: 1px; flex: none; max-width: 210px; padding: 8px 12px; border-radius: var(--r-md); background: var(--bg-elev); box-shadow: inset 0 0 0 1.5px var(--line); text-align: left; }
.grp-idea-chip strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-idea-chip small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.grp-idea-chip[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent-soft) 55%, var(--bg-elev)); }
.grp-poll-opts { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
.grp-poll-opts legend { font-size: 13px; font-weight: 750; color: var(--ink-2); padding: 0; margin-bottom: 8px; }
.grp-poll-opt { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.grp-poll-opt-n { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 800; }
.grp-poll-opt input { flex: 1; min-width: 0; }
.grp-add-opt .grp-i { width: 15px; height: 15px; }
.grp-done { text-align: center; padding: 8px 4px 4px; }
.grp-done-mark { display: block; font-size: 44px; margin-bottom: 6px; }
.grp-done h3 { font: 650 22px/1.2 var(--display); margin: 0 0 6px; font-stretch: var(--display-stretch);}
.grp-done p { color: var(--ink-2); max-width: 36ch; margin: 0 auto 12px; }
.grp-done .actions { justify-content: center; }

/* «Proponi al gruppo» on other screens */
.grp-place-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 14px 0 0; padding: 12px 14px; border-radius: var(--r-lg); background: linear-gradient(120deg, var(--accent-soft) 0%, var(--surface) 80%); border: 1px solid var(--line); }
.grp-place-extra p { display: grid; flex: 1 1 180px; margin: 0; min-width: 0; }
.grp-place-extra small { color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.grp-propose-btn { flex: none; }
.grp-propose-btn .grp-i, .grp-propose-chip .grp-i { width: 16px; height: 16px; }
.grp-propose-chip { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 11px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 800; white-space: nowrap; position: relative; z-index: 3; }

@media (max-width: 380px) {
  .grp-bubble { max-width: 84%; }
  .grp-option-side .grp-faces-mini { display: none; }
  .grp-rsvp-btn { font-size: 13.5px; gap: 4px; }
  .grp-rsvp-btn > span[aria-hidden] { display: none; }
}
/* «Proponi al gruppo» inside other modules' cards (web/taste.js «Per te», web/pa.js events): above their full-card links. */
.tg-card-propose { margin-top: 8px; position: relative; z-index: 2; }
.tg-plan-propose { display: flex; justify-content: flex-end; margin-top: 12px; }
.pa-event-body > .grp-propose-chip { align-self: flex-start; margin-top: 8px; }
