/* Juntos — grupos, "En línea ahora", llamadas para jugar y temporadas. Loaded by every page with /js/grupos.js. */
:root { --grp-coral: var(--c-primary-strong); --grp-orange: var(--c-primary-strong); --grp-navy: var(--c-night); --grp-navy-2: var(--c-night); --grp-gold: var(--c-gold); --grp-green: var(--c-success); --grp-red: var(--c-error); }

.grp-ic { width: 22px; height: 22px; flex: none; }

/* ------------------------------------------------------------ avatars with a presence dot */
.grp-av { position: relative; display: inline-grid; place-items: center; flex: none; }
.grp-av .ndj-avatar { margin: 0; }
.grp-av--lg .ndj-avatar { width: 58px; height: 58px; font-size: 1.5rem; }
.grp-av--xl .ndj-avatar { width: 92px; height: 92px; font-size: 2.4rem; }
.grp-av--call .ndj-avatar { width: 128px; height: 128px; font-size: 3.4rem; box-shadow: 0 0 0 5px rgba(255, 255, 255, .92), 0 26px 44px -18px rgba(0, 0, 0, .7); }
.grp-av--sm .ndj-avatar { width: 34px; height: 34px; font-size: .95rem; }
.grp-dot {
  position: absolute; right: -1px; bottom: -1px; width: 30%; height: 30%; min-width: 12px; min-height: 12px; max-width: 20px; max-height: 20px;
  border-radius: 50%; background: var(--grp-green); box-shadow: 0 0 0 3px var(--card);
}
.grp-av.is-on .grp-dot::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--grp-green); animation: grp-ping 2s ease-out infinite; }
@keyframes grp-ping { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }

/* ------------------------------------------------------------ "En línea ahora" (hub, top) */
.grp-live {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 0 10px; border-radius: var(--r-card);
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 22px 40px -30px rgba(43, 45, 66, .5); animation: ndj-pop .35s ease both;
}
.grp-live__head { display: flex; align-items: center; gap: 8px; padding: 0 16px; min-height: 44px; flex-wrap: wrap; }
.grp-live__title { display: inline-flex; align-items: center; gap: 9px; font-size: 1.16rem; font-weight: 700; }
.grp-live__pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--grp-green); box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); animation: ndj-pulse 1.6s ease-in-out infinite; }
.grp-live__n { min-width: 26px; height: 26px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 99px; background: rgba(34, 197, 94, .14); color: var(--c-success-ink); font: 700 .9rem/1 var(--font-display); }
.grp-live__sp { flex: 1; }
.grp-live__empty { padding: 0 16px 6px; color: var(--fg-2); font-weight: 700; font-size: .95rem; }
/* the strip's states (loading, error, nobody online, no friends yet): one line + one action, never a spinner forever */
.grp-live__state { display: flex; align-items: center; gap: 10px; padding: 0 12px 4px 16px; }
.grp-live__state .grp-live__empty { flex: 1; min-width: 0; padding: 0; }
.grp-live__state.is-error .grp-live__empty { color: var(--fg); }
.grp-live__act { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card-2); color: var(--ink-teal); font: 800 var(--fs-sm) var(--font-body); cursor: pointer; }
.grp-live__act:active { transform: scale(.96); }
.grp-live__act:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.grp-live__loading { display: flex; align-items: center; gap: 8px; }
.grp-live__spin { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink-teal); animation: grp-spin .8s linear infinite; }
@keyframes grp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .grp-live__spin { animation: none; border-top-color: var(--line); } }
.hub.is-first .grp-live.is-start { display: none; } /* a first visit already has the welcome card */
.grp-live.is-start { padding: 8px 0; }
.grp-live__invis { margin: 0 16px; min-height: 44px; padding: 8px 14px; border: 1px dashed var(--line); border-radius: 14px; background: var(--card-2); color: var(--fg-2); font: 700 .92rem var(--font-body); text-align: left; cursor: pointer; }
.grp-live__row { display: flex; gap: 6px; overflow-x: auto; padding: 4px 12px 8px; margin: 0; list-style: none; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; }
.grp-live__row::-webkit-scrollbar { display: none; }
.grp-live__item { scroll-snap-align: start; }
.grp-person {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 104px; min-height: 132px; padding: 10px 6px 8px;
  border: 0; border-radius: 20px; background: transparent; color: var(--fg); cursor: pointer; transition: background .2s ease, transform .12s ease;
}
.grp-person:hover { background: var(--card-2); }
.grp-person:active { transform: scale(.96); }
.grp-person:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.grp-person.is-table { background: linear-gradient(180deg, color-mix(in srgb, var(--grp-orange) 14%, var(--card)), var(--card)); }
.grp-person__game { position: absolute; top: 6px; right: 12px; }
.grp-person__emblem.ndj-emblem { width: 26px; height: 26px; border-radius: 9px; box-shadow: 0 0 0 2px var(--card), 0 4px 8px -4px rgba(0, 0, 0, .5); }
.grp-person__name { font: 600 .98rem/1.15 var(--font-display); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-person__st { font-size: .74rem; font-weight: 700; line-height: 1.2; color: var(--fg-2); text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grp-person.is-table .grp-person__st { color: var(--c-primary-ink); }
.grp-missed-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 6px 12px; border: 0; border-radius: 99px; cursor: pointer;
  background: rgba(239, 68, 68, .12); color: #B91C1C; font: 700 .86rem var(--font-body);
}
.grp-missed-btn .grp-ic { width: 17px; height: 17px; }
.grp-badge { min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 99px; background: var(--grp-red); color: #fff; font: 700 .78rem/1 var(--font-display); }

/* ------------------------------------------------------------ onboarding (first visit) */
.grp-onb {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px 18px 18px; border-radius: var(--r-card); color: #fff; overflow: hidden; isolation: isolate; text-align: center; align-items: center;
  background: radial-gradient(300px 180px at 100% 0%, rgba(217, 164, 65, .22), transparent 70%), linear-gradient(160deg, var(--grp-navy) 0%, var(--grp-navy-2) 100%);
  box-shadow: var(--shadow-2);
}
.grp-onb__art { display: flex; justify-content: center; margin-bottom: 2px; }
.grp-onb__face {
  display: grid; place-items: center; width: 54px; height: 54px; margin-left: -10px; border-radius: 50%; font-size: 1.8rem;
  background: linear-gradient(135deg, #FFF7F0, #FFE3CC); box-shadow: 0 0 0 3px var(--grp-navy), 0 10px 18px -10px rgba(0, 0, 0, .7);
  animation: grp-bob 3.4s ease-in-out infinite; animation-delay: calc(var(--i) * .25s);
}
.grp-onb__face:first-child { margin-left: 0; }
@keyframes grp-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.grp-onb__title { font-size: var(--fs-h2); line-height: 1.15; text-wrap: balance; }
.grp-onb__text { color: rgba(255, 255, 255, .82); font-weight: 700; font-size: .98rem; max-width: 38ch; text-wrap: balance; }
.grp-onb__acts { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 4px; }
.grp-onb__acts .btn-secondary { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .22); box-shadow: none; }
.grp-onb .btn-primary, .grp-card__go, .grp-btn--call, .grp-create__go, .grp-join__go {
  color: #fff; background: linear-gradient(135deg, var(--grp-coral), var(--grp-orange)); box-shadow: var(--shadow-1);
}

/* ------------------------------------------------------------ "Mis grupos" */
.grp-hub { display: flex; flex-direction: column; gap: 14px; }
.grp-hub__head { margin-bottom: 0; align-items: center; }
.grp-new { min-height: 44px; }
.grp-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--r-card); color: #fff; overflow: hidden; isolation: isolate;
  background: radial-gradient(300px 180px at 100% 0%, rgba(217, 164, 65, .22), transparent 70%), linear-gradient(160deg, var(--grp-navy) 0%, var(--grp-navy-2) 100%);
  box-shadow: var(--shadow-2); animation: ndj-pop .35s ease both;
}
.grp-card__top { display: flex; align-items: center; gap: 12px; }
.grp-card__emoji {
  flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 20px; font-size: 1.9rem;
  background: linear-gradient(135deg, var(--grp-coral), var(--grp-orange)); box-shadow: var(--shadow-1);
}
.grp-card__id { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.grp-card__name { font-size: 1.3rem; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.grp-card__meta { font-size: .86rem; font-weight: 700; color: rgba(255, 255, 255, .72); }
.grp-card__more { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.grp-season {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; width: 100%; min-height: 56px; padding: 10px 14px; border-radius: 16px; text-align: left; cursor: pointer;
  border: 1px solid rgba(247, 183, 49, .35); background: linear-gradient(135deg, rgba(247, 183, 49, .2), rgba(247, 183, 49, .06)); color: #fff;
}
.grp-season__badge { font: 600 .98rem/1.2 var(--font-display); color: #FFE29A; }
.grp-season__left { font-size: .8rem; font-weight: 800; color: #FFD9B8; text-align: right; }
.grp-season__top { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .88rem; font-weight: 700; color: rgba(255, 255, 255, .9); }
.grp-season__top--empty { color: rgba(255, 255, 255, .66); }
.grp-card__avs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.grp-card__mem { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 64px; min-height: 64px; padding: 4px 2px; border: 0; border-radius: 14px; background: transparent; color: #fff; cursor: pointer; }
.grp-card__mem:disabled { cursor: default; opacity: 1; }
.grp-card__mem:not(:disabled):hover { background: rgba(255, 255, 255, .08); }
.grp-card__mem .grp-dot { box-shadow: 0 0 0 3px var(--grp-navy-2); }
.grp-card__mem:not(.is-on) .ndj-avatar { filter: saturate(.45) brightness(.86); }
.grp-card__mem:disabled .ndj-avatar { filter: none; }
.grp-card__memname { font-size: .74rem; font-weight: 700; max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, .86); }
.grp-crown { position: absolute; top: -6px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: .95rem; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4)); }
.grp-card__presence { font-weight: 700; font-size: .95rem; color: rgba(255, 255, 255, .72); }
.grp-card__presence.is-on { color: #86EFAC; }
.grp-card__live { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 14px; background: rgba(34, 197, 94, .16); font-weight: 800; font-size: .95rem; color: #DCFCE7; }
.grp-card__livedot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--grp-green); box-shadow: 0 0 0 4px rgba(34, 197, 94, .25); animation: ndj-pulse 1.4s ease-in-out infinite; }
.grp-card__go { min-height: 60px; border-radius: 18px; font-size: 1.16rem; gap: 10px; }
.grp-card__go .ndj-ic { width: 22px; height: 22px; }
.grp-card__goemblem.ndj-emblem, .grp-btn__emblem.ndj-emblem { width: 34px; height: 34px; border-radius: 11px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .8); }
.grp-card__acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grp-act {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 8px 10px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #fff; font: 700 .95rem var(--font-body);
}
.grp-act:hover { background: rgba(255, 255, 255, .14); }
.grp-act .ndj-ic, .grp-act .grp-ic { width: 19px; height: 19px; }
.grp-card :focus-visible, .grp-onb :focus-visible { outline: 3px solid #FFD9B8; outline-offset: 2px; }

/* ------------------------------------------------------------ sheets: person, create, invite, join, season */
.grp-sheet .ndj-sheet__box { max-height: calc(100dvh - 12px); overflow-y: auto; overscroll-behavior: contain; }
.grp-person-box { gap: 6px; }
.grp-person-box .grp-av { margin-top: 6px; }
.grp-person-box__st { font-weight: 700; color: var(--fg-2); }
.grp-person-box__st.is-on { color: var(--c-success-ink); }
.grp-person-box__grp { font-size: .9rem; font-weight: 700; color: var(--fg-2); }
.grp-btn { gap: 10px; }
.grp-btn--join { color: #fff; background: var(--c-success-ink); box-shadow: var(--shadow-1); }
.grp-btn--leave { color: #fff; background: linear-gradient(135deg, var(--grp-navy), var(--grp-navy-2)); }
.grp-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; margin-top: 4px; }
.grp-kind {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 64px; padding: 6px 2px; border-radius: 16px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card-2); color: var(--fg); font: 700 .82rem var(--font-body);
}
.grp-kind span { font-size: 1.5rem; line-height: 1.2; }
.grp-kind.is-on { border-color: var(--grp-coral); background: color-mix(in srgb, var(--grp-coral) 12%, var(--card)); box-shadow: 0 0 0 3px rgba(255, 107, 74, .18); }
.grp-create__lbl { align-self: stretch; text-align: left; margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.grp-emojis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; width: 100%; }
.grp-emoji { min-height: 46px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card-2); font-size: 1.4rem; cursor: pointer; }
.grp-emoji.is-on { border-color: var(--grp-coral); background: color-mix(in srgb, var(--grp-coral) 12%, var(--card)); }
.grp-invite__ic { background: linear-gradient(135deg, var(--grp-coral), var(--grp-orange)); }
.grp-invite__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grp-invite__row .btn { min-height: 48px; }
.grp-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .88rem; font-weight: 700; color: var(--fg-2); }
.grp-qr:empty { display: none; }
.grp-qr .ndj-qr { border-radius: 16px; padding: 6px; background: #fff; box-shadow: var(--shadow); }
.grp-invite__code { font-size: .92rem; color: var(--fg-2); font-weight: 700; }
.grp-invite__code strong { letter-spacing: .08em; color: var(--fg); }
.grp-join__kicker, .grp-seasonbox__kicker { font-weight: 800; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c-primary-ink); }
.grp-join__who { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--fg-2); }
.grp-join__who:empty { display: none; }
.grp-join__avs { display: flex; }
.grp-join__avs .grp-av + .grp-av { margin-left: -10px; }
.grp-join__avs .ndj-avatar { box-shadow: 0 0 0 2px var(--card); }
.grp-code-in { text-align: center; letter-spacing: .14em; font-family: var(--font-display); font-size: 1.3rem; text-transform: uppercase; }

/* season table */
.grp-seasonbox { gap: 8px; }
.grp-seasonbox__left { padding: 4px 12px; border-radius: 99px; background: rgba(247, 183, 49, .18); color: var(--c-gold-ink); font-weight: 800; font-size: .88rem; }
.grp-podium { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 8px; width: 100%; margin: 6px 0 0; padding: 0; list-style: none; }
.grp-podium__step { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.grp-podium__medal { font-size: 1.5rem; line-height: 1; }
.grp-podium__name { font: 600 .95rem/1.1 var(--font-display); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-podium__pts { font-weight: 800; font-size: .82rem; color: var(--fg-2); }
.grp-podium__bar { width: 100%; border-radius: 14px 14px 4px 4px; background: linear-gradient(180deg, #FFE29A, var(--grp-gold)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); }
.grp-podium__step--1 .grp-podium__bar { height: 70px; }
.grp-podium__step--2 .grp-podium__bar { height: 50px; background: linear-gradient(180deg, #F1F5F9, #B8C2CF); }
.grp-podium__step--3 .grp-podium__bar { height: 36px; background: linear-gradient(180deg, #FFD7B0, #D98A4A); }
.grp-table { display: flex; flex-direction: column; gap: 4px; width: 100%; margin: 4px 0 0; padding: 0; list-style: none; text-align: left; }
.grp-table__row { display: grid; grid-template-columns: 34px auto 1fr auto auto; align-items: center; gap: 8px; min-height: 46px; padding: 4px 10px; border-radius: 14px; background: var(--card-2); }
.grp-table__row.is-me { background: color-mix(in srgb, var(--grp-orange) 14%, var(--card)); }
.grp-table__pos { font: 700 1rem var(--font-display); text-align: center; }
.grp-table__name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-table__w { font-size: .82rem; font-weight: 700; color: var(--fg-2); }
.grp-table__pts { font: 700 1.1rem var(--font-display); min-width: 32px; text-align: right; }
.grp-seasonbox__rules, .grp-seasonbox__prize { font-size: .86rem; font-weight: 700; color: var(--fg-2); max-width: 40ch; }
.grp-hist { width: 100%; text-align: left; margin-top: 4px; }
.grp-hist__t { font-size: 1rem; margin-bottom: 4px; }
.grp-hist__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.grp-hist__row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--card-2); font-weight: 700; font-size: .9rem; }
.grp-hist__m { text-transform: capitalize; color: var(--fg-2); }
.grp-cer__trophy { font-size: 4.2rem; line-height: 1; filter: drop-shadow(0 12px 18px rgba(232, 164, 23, .55)); animation: grp-pop .6s cubic-bezier(.3, 1.5, .5, 1) both; }
.grp-cer__top { margin: 0; padding: 0; list-style: none; font-weight: 800; display: flex; flex-direction: column; gap: 2px; }
.grp-cer__coins { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; background: rgba(247, 183, 49, .2); font: 700 1.2rem var(--font-display); color: var(--c-gold-ink); }
.grp-cer__coins .ndj-ic { width: 24px; height: 24px; }
@keyframes grp-pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* missed calls */
.grp-missed__list { width: 100%; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.grp-missed__row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; background: var(--card-2); text-align: left; }
.grp-missed__txt { flex: 1; display: flex; flex-direction: column; min-width: 0; font-size: .86rem; color: var(--fg-2); font-weight: 700; }
.grp-missed__txt strong { color: var(--fg); font-size: 1rem; }
.grp-missed__back { min-height: 44px; color: #fff; background: var(--c-success-ink); gap: 6px; }
.grp-missed__back .grp-ic { width: 16px; height: 16px; }

/* ------------------------------------------------------------ the call screens (caller and incoming) */
.grp-call {
  position: fixed; inset: 0; z-index: 360; display: grid; place-items: center; padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(460px 360px at 50% 28%, color-mix(in srgb, var(--grp-orange) 28%, transparent), transparent 70%), var(--c-night);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; animation: ndj-fade .2s ease both; overflow-y: auto;
}
.grp-call.is-out { opacity: 0; transition: opacity .2s ease; }
.grp-call__box { width: min(380px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; animation: grp-rise .45s cubic-bezier(.3, 1.3, .5, 1) both; }
.grp-call__kicker { font-weight: 800; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #FFD9B8; }
.grp-call__art { position: relative; width: 210px; height: 210px; display: grid; place-items: center; margin: 6px 0 10px; }
.grp-call__ring { position: absolute; inset: 22px; border-radius: 50%; border: 3px solid rgba(255, 154, 60, .8); animation: grp-wave 2s ease-out infinite; }
.grp-call__ring--2 { animation-delay: 1s; }
@keyframes grp-wave { 0% { transform: scale(.75); opacity: .95; } 100% { transform: scale(1.35); opacity: 0; } }
.grp-call__game { position: absolute; right: 24px; bottom: 22px; }
.grp-call__emblem.ndj-emblem { width: 52px; height: 52px; border-radius: 17px; box-shadow: 0 0 0 4px #2A2C47, 0 10px 18px -8px rgba(0, 0, 0, .7); }
.grp-call__line { font: 700 clamp(1.5rem, 7vw, 1.9rem)/1.15 var(--font-display); text-wrap: balance; }
.grp-call__sub { font-weight: 700; color: rgba(255, 255, 255, .76); font-size: 1rem; text-wrap: balance; }
.grp-call__acts { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; margin-top: 14px; }
.grp-call__acts .btn-secondary { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .22); box-shadow: none; }
.grp-call__acts .btn-ghost { color: rgba(255, 255, 255, .78); }
.grp-call__answer { display: flex; justify-content: center; gap: 56px; margin-top: 18px; }
.grp-round { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: transparent; color: #fff; cursor: pointer; font: 700 .95rem var(--font-body); }
.grp-round .grp-ic { width: 76px; height: 76px; padding: 21px; border-radius: 50%; box-sizing: border-box; transition: transform .12s ease; }
.grp-round:active .grp-ic { transform: scale(.94); }
.grp-round--red .grp-ic { background: linear-gradient(180deg, #F87171, #DC2626); box-shadow: 0 16px 26px -12px rgba(220, 38, 38, .9); }
.grp-round--green .grp-ic { background: linear-gradient(180deg, #4ADE80, #16A34A); box-shadow: 0 16px 26px -12px rgba(22, 163, 74, .9); animation: grp-shake 1.4s ease-in-out infinite; }
.grp-round:focus-visible { outline: none; }
.grp-round:focus-visible .grp-ic { outline: 3px solid #FFD9B8; outline-offset: 4px; }
@keyframes grp-shake { 0%, 60%, 100% { transform: rotate(0); } 65% { transform: rotate(-14deg); } 72% { transform: rotate(12deg); } 79% { transform: rotate(-10deg); } 86% { transform: rotate(8deg); } }
.grp-chip { margin-top: 10px; min-height: 44px; padding: 8px 18px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .26); background: rgba(255, 255, 255, .1); color: #fff; font: 700 .95rem var(--font-body); cursor: pointer; }
.grp-call[data-state="join"] .grp-call__ring { border-color: rgba(74, 222, 128, .9); }
.grp-call[data-state="join"] .grp-call__line { color: #86EFAC; }
.grp-call:not([data-state="ring"]) .grp-call__ring { animation-play-state: paused; opacity: 0; }
@keyframes grp-rise { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ banners (a left invitation), the sender's pill, the push prompt */
.grp-banners { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; width: min(94vw, 460px); }
.grp-banners--top { bottom: auto; top: calc(8px + env(safe-area-inset-top, 0px)); }
.grp-banner {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 20px; color: #fff;
  background: linear-gradient(135deg, var(--grp-navy), var(--grp-navy-2)); box-shadow: 0 18px 34px -16px rgba(31, 33, 55, .9);
  animation: grp-drop .35s cubic-bezier(.3, 1.3, .5, 1) both;
}
.grp-banners:not(.grp-banners--top) .grp-banner { animation-name: grp-rise; }
.grp-banner.is-out { opacity: 0; transform: translateY(-8px); transition: all .2s ease; }
.grp-banner .grp-dot { box-shadow: 0 0 0 2px var(--grp-navy); }
.grp-banner__txt { flex: 1; display: flex; flex-direction: column; min-width: 0; font-size: .8rem; font-weight: 700; color: rgba(255, 255, 255, .72); line-height: 1.25; }
.grp-banner__txt strong { color: #fff; font-size: .95rem; }
.grp-banner__yes { min-height: 44px; color: #fff; background: var(--c-success-ink); border-radius: 12px; }
.grp-banner__no { min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: rgba(255, 255, 255, .72); font: 700 .82rem var(--font-body); cursor: pointer; }
@keyframes grp-drop { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
.grp-sent {
  position: fixed; left: 0; right: 0; margin: 0 auto; width: max-content; top: calc(64px + env(safe-area-inset-top, 0px)); z-index: 250; max-width: 92vw;
  padding: 8px 16px; border-radius: 99px; background: var(--c-night); color: #fff; font-weight: 800; font-size: .9rem; box-shadow: var(--shadow-lg); animation: grp-drop .3s ease both; pointer-events: none;
}
.grp-sent.is-ok { background: var(--c-success-ink); }
.grp-sent.is-no { background: #6B6E85; }
.grp-push {
  position: fixed; left: 0; right: 0; margin: 0 auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 290; width: min(94vw, 460px);
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 20px; background: var(--card); color: var(--fg); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: grp-rise .35s ease both;
}
.grp-push__ic { font-size: 1.6rem; }
.grp-push__txt { flex: 1; display: flex; flex-direction: column; font-size: .82rem; color: var(--fg-2); font-weight: 700; line-height: 1.25; }
.grp-push__txt strong { color: var(--fg); font-size: .98rem; }
.grp-push .btn { min-height: 44px; }
.grp-push__x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--fg-2); cursor: pointer; }
.grp-push__x .ndj-ic { width: 16px; height: 16px; }

/* ------------------------------------------------------------ dark mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .grp-live__n { color: #86EFAC; background: rgba(34, 197, 94, .2); }
  :root:not([data-theme="light"]) .grp-person.is-table .grp-person__st { color: #FDBA74; }
  :root:not([data-theme="light"]) .grp-missed-btn { color: #FCA5A5; background: rgba(239, 68, 68, .18); }
  :root:not([data-theme="light"]) .grp-person-box__st.is-on { color: #86EFAC; }
  :root:not([data-theme="light"]) .grp-join__kicker, :root:not([data-theme="light"]) .grp-seasonbox__kicker { color: #FDBA74; }
  :root:not([data-theme="light"]) .grp-seasonbox__left, :root:not([data-theme="light"]) .grp-cer__coins { color: #FFE29A; }
  :root:not([data-theme="light"]) .grp-card, :root:not([data-theme="light"]) .grp-onb { box-shadow: 0 26px 44px -26px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 0 1px rgba(255, 255, 255, .06); }
}
:root[data-theme="dark"] .grp-live__n { color: #86EFAC; background: rgba(34, 197, 94, .2); }
:root[data-theme="dark"] .grp-person.is-table .grp-person__st { color: #FDBA74; }
:root[data-theme="dark"] .grp-missed-btn { color: #FCA5A5; background: rgba(239, 68, 68, .18); }
:root[data-theme="dark"] .grp-person-box__st.is-on { color: #86EFAC; }
:root[data-theme="dark"] .grp-join__kicker, :root[data-theme="dark"] .grp-seasonbox__kicker { color: #FDBA74; }
:root[data-theme="dark"] .grp-seasonbox__left, :root[data-theme="dark"] .grp-cer__coins { color: #FFE29A; }

/* ------------------------------------------------------------ small phones, big screens, reduced motion */
@media (max-width: 360px) {
  .grp-card { padding: 16px 14px; }
  .grp-card__mem { width: 58px; }
  .grp-person { width: 96px; }
  .grp-call__art { width: 180px; height: 180px; }
  .grp-av--call .ndj-avatar { width: 108px; height: 108px; font-size: 2.9rem; }
  .grp-call__answer { gap: 40px; }
  .grp-emojis { grid-template-columns: repeat(6, 1fr); gap: 4px; }
}
@media (max-height: 640px) { .grp-call__art { width: 170px; height: 170px; margin: 0 0 4px; } .grp-av--call .ndj-avatar { width: 104px; height: 104px; } }
@media (min-width: 760px) { .grp-hub { display: grid; grid-template-columns: 1fr 1fr; align-items: start; } .grp-hub__head { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) {
  .grp-call__ring, .grp-round--green .grp-ic, .grp-onb__face, .grp-av.is-on .grp-dot::after, .grp-live__pulse, .grp-card__livedot { animation: none !important; }
  .grp-call__ring { opacity: .5; transform: scale(1.05); }
  .grp-call__box, .grp-banner, .grp-card, .grp-live, .grp-cer__trophy, .grp-sent, .grp-push { animation: none !important; }
}
