/* =============================================================
   KOMANDINĖ VIKTORINA
   Vėsus mėlynas / žalsvas „komandinis" akcentas ant tamsaus fono.
   Mobile-first nuo 250px → centruotas, gyvas desktop.
   ============================================================= */

.team-body {
  --tm-cyan:        oklch(0.78 0.13 215);   /* pagrindinis akcentas (žalsvai mėlynas) */
  --tm-cyan-strong: oklch(0.70 0.15 230);   /* sodresnis */
  --tm-violet:      oklch(0.70 0.15 285);   /* antrinis akcentas */
  --tm-mint:        oklch(0.80 0.14 165);   /* sėkmė / teisinga */
  --tm-rose:        oklch(0.68 0.17 18);    /* klaida / neteisinga */
  --tm-gold:        oklch(0.83 0.13 85);    /* 1 vieta topuose */

  --tm-bg:          oklch(0.19 0.022 240);  /* pagrindinis fonas, vėsus */
  --tm-bg-deep:     oklch(0.15 0.02 240);   /* gilesnis */
  --tm-surface:     oklch(0.24 0.022 242);  /* kortelės paviršius */
  --tm-surface-2:   oklch(0.28 0.024 244);  /* pakeltas (inputai, eilutės) */
  --tm-border:      oklch(0.35 0.03 246);   /* kraštinės */
  --tm-border-soft: oklch(0.31 0.025 244);

  --tm-text:        oklch(0.96 0.012 250);  /* pagrindinis tekstas */
  --tm-text-soft:   oklch(0.80 0.02 248);   /* antrinis */
  --tm-text-mute:   oklch(0.66 0.02 246);   /* prislopintas */

  --tm-radius:      16px;
  --tm-radius-sm:   10px;
  --tm-ease:        cubic-bezier(0.22, 1, 0.36, 1); /* ease-out-quint */

  background:
    radial-gradient(120% 80% at 50% -10%, oklch(0.30 0.07 240 / 0.55), transparent 60%),
    linear-gradient(180deg, var(--tm-bg) 0%, var(--tm-bg-deep) 100%);
  background-attachment: fixed;
  color: var(--tm-text);
  min-height: 100vh;
}

/* `hidden` atributas privalo nugalėti display:flex/block (kitaip paslėpti
   ekranai/modalas/meniu rodomi nuolatos). Galioja visiems team modulio elementams. */
.team-body [hidden] { display: none !important; }

/* =====================
   SHELL
   ===================== */
.team-shell {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(0.75rem, 3vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 1.5rem);
}

/* =====================
   INTRO + VARTOTOJO KORTELĖ
   ===================== */
.team-intro {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.team-intro__title {
  font-size: clamp(1.4rem, 6vw, 2.1rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--tm-text);
}

.team-intro__subtitle {
  margin-top: 0.4rem;
  font-size: clamp(0.9rem, 3.4vw, 1.05rem);
  color: var(--tm-text-soft);
  max-width: 56ch;
}

.team-intro__subtitle #user-name {
  color: var(--tm-cyan);
  font-weight: 600;
}

.team-user {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2.5vw, 1rem);
  padding: clamp(0.6rem, 2.5vw, 0.9rem);
  background: linear-gradient(135deg, var(--tm-surface) 0%, var(--tm-surface-2) 100%);
  border: 1px solid var(--tm-border-soft);
  border-radius: var(--tm-radius);
  box-shadow: 0 6px 22px oklch(0.1 0.02 240 / 0.4);
}

.team-user__avatar {
  flex-shrink: 0;
  width: clamp(44px, 14vw, 56px);
  height: clamp(44px, 14vw, 56px);
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--tm-cyan);
  box-shadow: 0 0 0 3px oklch(0.78 0.13 215 / 0.12);
}

.team-user__body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.team-user__name {
  font-size: clamp(0.9rem, 3.6vw, 1.05rem);
  font-weight: 600;
  color: var(--tm-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-user__balance {
  font-size: clamp(1.05rem, 4.5vw, 1.35rem);
  font-weight: 700;
  color: var(--tm-cyan);
  line-height: 1.1;
}
/* Sufiksą „litų" prideda small_user_info.js — čia nedubliuojam. */

.team-user__meta {
  margin: 0.35rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.85rem;
}

.team-user__meta-item {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  font-size: var(--font-size-xs, 0.75rem);
}

.team-user__meta-item dt { color: var(--tm-text-mute); }
.team-user__meta-item dd { margin: 0; font-weight: 600; color: var(--tm-text-soft); }

/* =====================
   KORTELĖS
   ===================== */
.team-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1rem, 4vw, 1.75rem);
  background: var(--tm-surface);
  border: 1px solid var(--tm-border-soft);
  border-radius: var(--tm-radius);
  box-shadow: 0 12px 36px oklch(0.1 0.02 240 / 0.45);
  animation: team-card-in 0.5s var(--tm-ease) both;
}

/* display:flex perrašytų [hidden] numatytąjį display:none — grąžinam */
.team-card[hidden] { display: none; }

@keyframes team-card-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.team-card__head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.team-card__step {
  align-self: flex-start;
  font-size: var(--font-size-xs, 0.75rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tm-cyan);
  background: oklch(0.78 0.13 215 / 0.14);
  padding: 0.2rem 0.6rem;
  border-radius: var(--tm-radius-sm);
}

.team-card__title {
  font-size: clamp(1.1rem, 4.5vw, 1.4rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--tm-text);
}

.team-card__lead {
  font-size: clamp(0.85rem, 3.4vw, 0.98rem);
  color: var(--tm-text-soft);
  line-height: 1.5;
  max-width: 60ch;
}

/* =====================
   KOMANDOS PASIRINKIMAS (sukurti / prisijungti)
   ===================== */
.team-choice {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.team-choice__col {
  flex: 1;
  padding: clamp(0.85rem, 3vw, 1.15rem);
  background: var(--tm-bg-deep);
  border: 1px solid var(--tm-border-soft);
  border-radius: var(--tm-radius-sm);
}

.team-choice__or {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--tm-text-mute);
  font-size: var(--font-size-sm, 0.875rem);
}
.team-choice__or span { padding: 0 0.6rem; }
.team-choice__or::before,
.team-choice__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--tm-border-soft);
}

.team-form__heading {
  font-size: clamp(0.95rem, 3.6vw, 1.1rem);
  font-weight: 700;
  color: var(--tm-text);
  margin-bottom: 0.6rem;
}

/* =====================
   FORMOS
   ===================== */
.team-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.team-form__label {
  font-size: clamp(0.82rem, 3.3vw, 0.92rem);
  font-weight: 600;
  color: var(--tm-text);
}

.team-form__input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-family: inherit;
  font-size: 1rem; /* ≥16px — iOS nedidina zoom */
  color: var(--tm-text);
  background: var(--tm-surface-2);
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-sm);
  transition: border-color 0.25s var(--tm-ease), box-shadow 0.25s var(--tm-ease);
}

.team-form__input::placeholder { color: var(--tm-text-mute); }

.team-form__input:focus {
  outline: none;
  border-color: var(--tm-cyan);
  box-shadow: 0 0 0 3px oklch(0.78 0.13 215 / 0.2);
}

.team-form__input--code {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
}

.team-form__note {
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--tm-mint);
  min-height: 1.1rem;
  line-height: 1.4;
}
.team-form__note.is-error { color: var(--tm-rose); }

/* =====================
   MYGTUKAI
   ===================== */
.team-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.1rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--tm-text);
  border: 1px solid transparent;
  border-radius: var(--tm-radius-sm);
  cursor: pointer;
  transition: transform 0.2s var(--tm-ease), box-shadow 0.25s var(--tm-ease), background 0.25s var(--tm-ease);
}

.team-btn:focus-visible {
  outline: 2px solid var(--tm-cyan);
  outline-offset: 2px;
}

.team-btn--primary {
  margin-top: 0.3rem;
  color: #07151c; /* fallback senoms naršyklėms */
  color: oklch(0.18 0.02 230);
  background: linear-gradient(135deg, var(--tm-cyan) 0%, var(--tm-cyan-strong) 100%);
  box-shadow: 0 6px 18px oklch(0.70 0.15 230 / 0.32);
}
.team-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 24px oklch(0.70 0.15 230 / 0.42);
}

.team-btn--ghost {
  margin-top: 0.3rem;
  color: var(--tm-cyan);
  background: oklch(0.78 0.13 215 / 0.1);
  border-color: var(--tm-border);
}
.team-btn--ghost:hover {
  background: oklch(0.78 0.13 215 / 0.18);
  border-color: var(--tm-cyan);
}

.team-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

/* =====================
   TAVO KOMANDOS JUOSTA (arenoje)
   ===================== */
.team-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  background: linear-gradient(135deg, oklch(0.78 0.13 215 / 0.12), oklch(0.70 0.15 285 / 0.1));
  border: 1px solid var(--tm-border-soft);
  border-radius: var(--tm-radius-sm);
}
.team-banner__label {
  display: block;
  font-size: var(--font-size-2xs, 0.625rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tm-text-mute);
}
.team-banner__name {
  font-size: clamp(1rem, 4vw, 1.25rem);
  font-weight: 700;
  color: var(--tm-text);
}
.team-banner__codeval {
  font-family: inherit;
  font-size: clamp(0.95rem, 3.8vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--tm-cyan);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.team-banner__members {
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--tm-text-soft);
}

/* =====================
   KRUMPLIĖS MENIU (komandos veiksmai – paslėpti)
   ===================== */
.team-menu {
  position: relative;
  margin-left: auto;
}
.team-menu__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--tm-text);
  background: oklch(1 0 0 / 0.06);
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-sm);
  cursor: pointer;
  transition: background 0.2s var(--tm-ease), transform 0.2s var(--tm-ease);
}
.team-menu__toggle:hover { background: oklch(1 0 0 / 0.12); }
.team-menu__toggle[aria-expanded="true"] { transform: rotate(45deg); }
.team-menu__toggle:focus-visible { outline: 2px solid var(--tm-cyan); outline-offset: 2px; }

.team-menu__dropdown {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 20;
  min-width: 14rem;
  display: flex;
  flex-direction: column;
  padding: 0.35rem;
  background: oklch(0.22 0.03 275);
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-sm);
  box-shadow: 0 10px 30px oklch(0.1 0.03 275 / 0.55);
}
.team-menu__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.7rem;
  font-family: inherit;
  font-size: var(--font-size-sm, 0.9rem);
  font-weight: 600;
  text-align: left;
  color: var(--tm-text);
  background: none;
  border: none;
  border-radius: var(--tm-radius-sm);
  cursor: pointer;
  transition: background 0.18s var(--tm-ease);
}
.team-menu__item:hover { background: oklch(1 0 0 / 0.08); }
.team-menu__item:focus-visible { outline: 2px solid var(--tm-cyan); outline-offset: -2px; }
.team-menu__item--danger {
  /* Šviesus raudonas atspalvis tamsiame fone — kontrastas ≥ 4.5:1 */
  color: oklch(0.78 0.15 25);
}
.team-menu__item--danger:hover { background: oklch(0.55 0.18 25 / 0.16); }

/* =====================
   KVIETIMO FORMA
   ===================== */
.team-invite {
  margin-top: 0.6rem;
  padding: 0.85rem;
  background: oklch(0.78 0.13 215 / 0.07);
  border: 1px solid var(--tm-border-soft);
  border-radius: var(--tm-radius-sm);
}

/* Autocomplete pasiūlymai (vartotojų nick'ai rašant kvietimą) */
.team-suggest {
  position: relative;
  flex: 1;
  min-width: 0;
}
.team-suggest .team-form__input { width: 100%; }
.team-suggest__list {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  max-height: 13rem;
  overflow-y: auto;
  background: oklch(0.22 0.03 275);
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-sm);
  box-shadow: 0 10px 30px oklch(0.1 0.03 275 / 0.55);
}
.team-suggest__item {
  padding: 0.55rem 0.7rem;
  font-size: var(--font-size-sm, 0.9rem);
  color: var(--tm-text);
  border-radius: var(--tm-radius-sm);
  cursor: pointer;
}
.team-suggest__item:hover,
.team-suggest__item.is-active {
  background: oklch(0.78 0.13 215 / 0.18);
  color: var(--tm-cyan);
}
.team-suggest__empty {
  padding: 0.55rem 0.7rem;
  font-size: var(--font-size-sm, 0.9rem);
  color: var(--tm-text-mute);
}

/* =====================
   INFO (ℹ️) MYGTUKAS
   ===================== */
.team-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  margin-left: 0.5rem;
  font-size: 1rem;
  line-height: 1;
  vertical-align: middle;
  background: oklch(1 0 0 / 0.08);
  border: 1px solid var(--tm-border);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s var(--tm-ease), transform 0.2s var(--tm-ease);
}
.team-info-btn:hover { background: oklch(1 0 0 / 0.16); transform: scale(1.08); }
.team-info-btn:focus-visible { outline: 2px solid var(--tm-cyan); outline-offset: 2px; }

/* =====================
   TAISYKLIŲ MODALAS
   ===================== */
.team-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.team-modal__backdrop {
  position: absolute;
  inset: 0;
  background: oklch(0.1 0.02 275 / 0.7);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.team-modal__box {
  position: relative;
  z-index: 1;
  max-width: 32rem;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.5rem 1.4rem;
  background: linear-gradient(150deg, oklch(0.24 0.03 275), oklch(0.27 0.04 285));
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius);
  box-shadow: 0 20px 50px oklch(0.08 0.02 275 / 0.6);
}
.team-modal__close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2rem;
  height: 2rem;
  font-size: 1rem;
  color: var(--tm-text-soft);
  background: oklch(1 0 0 / 0.06);
  border: 1px solid var(--tm-border);
  border-radius: 50%;
  cursor: pointer;
}
.team-modal__close:hover { color: var(--tm-text); background: oklch(1 0 0 / 0.14); }
.team-modal__title {
  margin: 0 0 1rem;
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  color: var(--tm-cyan);
}
.team-modal__list {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: var(--font-size-sm, 0.9rem);
  line-height: 1.55;
  color: var(--tm-text-soft);
}
.team-modal__list strong { color: var(--tm-text); }

/* Patvirtinimo (išėjimo) modalas */
.team-modal__box--confirm {
  max-width: 26rem;
  text-align: center;
}
.team-modal__text {
  margin: 0 0 1.4rem;
  font-size: var(--font-size-md, 1rem);
  line-height: 1.55;
  color: var(--tm-text-soft);
}
.team-modal__text strong { color: var(--tm-text); }
.team-modal__actions {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}
.team-modal__actions .team-btn { margin-top: 0; flex: 1; max-width: 11rem; }

/* Vientisas raudonas mygtukas (destruktyvus veiksmas) — kontrastas ≥ 4.5:1 */
.team-btn--danger-solid {
  margin-top: 0.3rem;
  color: oklch(0.99 0 0);
  background: linear-gradient(135deg, oklch(0.58 0.2 25), oklch(0.52 0.21 22));
  box-shadow: 0 6px 18px oklch(0.55 0.2 25 / 0.35);
}
.team-btn--danger-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 24px oklch(0.55 0.2 25 / 0.45);
}

/* =====================
   KVIETIMO TOAST (interaktyvus – Prisijungti / Atmesti)
   ===================== */
.team-invite-toast {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.team-invite-toast__text { line-height: 1.4; }
.team-invite-toast__actions {
  display: flex;
  gap: 0.5rem;
}
.team-invite-toast__actions button {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}
.team-invite-toast__actions [data-invite-accept] {
  color: #07151c;
  background: #2bd7ff;
}
.team-invite-toast__actions [data-invite-decline] {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

/* =====================
   KLAUSIMAS (arena)
   ===================== */
.team-question {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.team-question__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.team-timer {
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 700;
  color: var(--tm-text-mute);
  font-variant-numeric: tabular-nums;
}
.team-question__text {
  font-size: clamp(1.1rem, 4.6vw, 1.45rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--tm-text);
}

.team-answer-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.team-answer-row .team-form__input { flex: 1; min-width: 0; }
.team-answer-row .team-btn { margin-top: 0; flex-shrink: 0; }

/* Paimto taško pranešimas */
.team-flash {
  padding: 0.7rem 0.9rem;
  border-radius: var(--tm-radius-sm);
  font-weight: 600;
  font-size: clamp(0.85rem, 3.4vw, 0.98rem);
  animation: team-flash-in 0.35s var(--tm-ease) both;
}
.team-flash[hidden] { display: none; }
.team-flash.is-mine  { background: oklch(0.80 0.14 165 / 0.18); color: var(--tm-mint); }
.team-flash.is-other { background: var(--tm-surface-2); color: var(--tm-text-soft); }
.team-flash.is-timeout { background: var(--tm-surface-2); color: var(--tm-text-mute); }

@keyframes team-flash-in {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}

/* =====================
   TOPAI
   ===================== */
.team-tops__head {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.team-period {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  background: var(--tm-bg-deep);
  border: 1px solid var(--tm-border-soft);
  border-radius: var(--tm-radius-sm);
}
.team-period__btn {
  font-family: inherit;
  font-size: var(--font-size-xs, 0.75rem);
  font-weight: 600;
  color: var(--tm-text-mute);
  background: none;
  border: none;
  padding: 0.35rem 0.6rem;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.2s var(--tm-ease), color 0.2s var(--tm-ease);
}
.team-period__btn.is-active {
  color: #07151c;
  color: oklch(0.18 0.02 230);
  background: var(--tm-cyan);
}

.team-tops__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.team-top__title {
  font-size: clamp(0.9rem, 3.4vw, 1rem);
  font-weight: 700;
  color: var(--tm-cyan);
  margin-bottom: 0.5rem;
}

.team-top__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  counter-reset: tm-rank;
}

.team-top__list:not(.team-top__list--plain) li {
  counter-increment: tm-rank;
}

.team-top__list li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: var(--tm-surface-2);
  border: 1px solid var(--tm-border-soft);
  border-radius: var(--tm-radius-sm);
  font-size: var(--font-size-sm, 0.875rem);
}

.team-top__list:not(.team-top__list--plain) li::before {
  content: counter(tm-rank);
  flex-shrink: 0;
  min-width: 1.4rem;
  font-weight: 700;
  color: var(--tm-text-mute);
}
.team-top__list:not(.team-top__list--plain) li:first-child::before { color: var(--tm-gold); }

.team-top__name  { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tm-text); }
.team-top__value { font-weight: 700; color: var(--tm-text-soft); flex-shrink: 0; }

.team-top__empty {
  color: var(--tm-text-mute);
  font-size: var(--font-size-sm, 0.875rem);
  padding: 0.45rem 0;
}

/* Live indikatorius */
.team-top__list--plain li::before { display: none; }
.team-top__list--plain .team-top__value::after {
  content: "🟢";
  margin-left: 0.3rem;
  font-size: 0.6em;
  vertical-align: middle;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 320px) {
  .team-user__balance { font-size: 1rem; }
}

/* Nuo 560px: komandos pasirinkimas dviem stulpeliais; topai 2 stulpeliai */
@media (min-width: 560px) {
  .team-choice {
    flex-direction: row;
    align-items: stretch;
  }
  .team-choice__or {
    flex-direction: column;
  }
  .team-choice__or::before,
  .team-choice__or::after {
    width: 1px;
    height: auto;
  }
  .team-tops__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Desktop (≥760px): intro dviguba, topai 4 stulpeliai */
@media (min-width: 760px) {
  .team-intro {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
  .team-intro__heading { flex: 1; }
  .team-user {
    flex-shrink: 0;
    width: 300px;
  }
  .team-tops__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-card,
  .team-flash { animation: none; }
  .team-btn:hover { transform: none; }
}

/* =====================
   PLŪDURIUOJANTIS MYGTUKAS (FAB) + ARC MENIU
   ===================== */
.team-fab {
  position: fixed;
  right: 2.25rem;
  bottom: 4.25rem;
  z-index: 900;
  width: 56px;
  height: 56px;
}
.team-fab__main {
  position: relative;
  z-index: 2;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--tm-violet), oklch(0.6 0.16 290));
  box-shadow: 0 8px 22px oklch(0.5 0.15 290 / 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--tm-ease), box-shadow 0.25s var(--tm-ease);
}
.team-fab__main:hover { transform: scale(1.06); }
.team-fab__main:focus-visible { outline: 3px solid var(--tm-cyan); outline-offset: 3px; }

/* Hamburgeris → X */
.team-fab__bars { display: flex; flex-direction: column; gap: 5px; width: 22px; }
.team-fab__bars span {
  display: block; height: 2px; border-radius: 2px;
  background: oklch(0.99 0 0);
  transition: transform 0.3s var(--tm-ease), opacity 0.3s var(--tm-ease);
}
.team-fab.is-open .team-fab__bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.team-fab.is-open .team-fab__bars span:nth-child(2) { opacity: 0; }
.team-fab.is-open .team-fab__bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Arc items — vertikaliai kyla virš pagrindinio mygtuko */
.team-fab__item {
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: oklch(0.99 0 0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(0, 0) scale(0.5);
  box-shadow: 0 6px 16px oklch(0.2 0.03 275 / 0.5);
  transition: transform 0.3s var(--tm-ease), opacity 0.25s var(--tm-ease);
}
.team-fab.is-open .team-fab__item {
  opacity: 1;
  pointer-events: all;
}
/* Lanko (vėduoklės) pozicijos: 3 mygtukai per 90° lanką, spindulys ~100px.
   Tolygūs tarpai (45°), netoli X. FAB apatiniame dešiniame kampe → lankas į viršų-kairę. */
.team-fab.is-open .team-fab__item[data-arc="0"] { transform: translate(-6px,  -100px) scale(1); } /*  90° */
.team-fab.is-open .team-fab__item[data-arc="1"] { transform: translate(-71px,  -71px) scale(1); } /* 135° */
.team-fab.is-open .team-fab__item[data-arc="2"] { transform: translate(-100px,  -6px) scale(1); } /* 180° */
/* Stagger */
.team-fab.is-open .team-fab__item[data-arc="0"] { transition-delay: 0.00s; }
.team-fab.is-open .team-fab__item[data-arc="1"] { transition-delay: 0.04s; }
.team-fab.is-open .team-fab__item[data-arc="2"] { transition-delay: 0.08s; }
.team-fab.is-open .team-fab__item[data-arc="3"] { transition-delay: 0.12s; }

.team-fab__item--chat    { background: linear-gradient(135deg, var(--tm-violet), oklch(0.58 0.16 290)); }
.team-fab__item--invite  { background: linear-gradient(135deg, var(--tm-cyan), var(--tm-cyan-strong)); color: oklch(0.18 0.02 230); }
.team-fab__item--invites { background: linear-gradient(135deg, oklch(0.75 0.15 55), oklch(0.68 0.16 50)); color: oklch(0.18 0.02 60); }
.team-fab__item--info    { background: linear-gradient(135deg, var(--tm-mint), oklch(0.7 0.14 165)); color: oklch(0.18 0.02 165); }
.team-fab__item:focus-visible { outline: 3px solid var(--tm-cyan); outline-offset: 3px; }
/* Išjungtas (kol ne komandoje) */
.team-fab__item.is-disabled { opacity: 0.4 !important; cursor: not-allowed; filter: grayscale(0.5); }

/* Kvietimų skaičiaus ženkliukas */
.team-fab__badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 9999px;
  background: oklch(0.6 0.2 25);
  color: oklch(0.99 0 0);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid oklch(0.19 0.022 240);
}

.team-fab-backdrop {
  position: fixed;
  inset: 0;
  z-index: 890;
  background: oklch(0.1 0.02 275 / 0.35);
}

/* =====================
   DRAWER (slenka iš dešinės / apačios mobilėje)
   ===================== */
.team-drawer {
  position: fixed;
  z-index: 950;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  height: 50vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, oklch(0.23 0.03 250), oklch(0.2 0.025 245));
  border-left: 1px solid var(--tm-border);
  box-shadow: -12px 0 40px oklch(0.08 0.02 275 / 0.55);
  animation: team-drawer-in 0.3s var(--tm-ease);
}
@keyframes team-drawer-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.team-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--tm-border-soft);
}
.team-drawer__title { margin: 0; font-size: 1.15rem; color: var(--tm-cyan); }
.team-drawer__close {
  width: 2rem; height: 2rem; font-size: 1rem;
  color: var(--tm-text-soft); background: oklch(1 0 0 / 0.06);
  border: 1px solid var(--tm-border); border-radius: 50%; cursor: pointer;
}
.team-drawer__close:hover { color: var(--tm-text); background: oklch(1 0 0 / 0.14); }
.team-drawer__body { padding: 1.1rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.85rem; }
.team-drawer__row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin: 0; }
.team-drawer__row--col { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
.team-drawer__label { font-size: var(--font-size-2xs, 0.65rem); text-transform: uppercase; letter-spacing: 0.08em; color: var(--tm-text-mute); }
.team-drawer__val { font-size: 1.05rem; font-weight: 600; color: var(--tm-text); }
.team-drawer__code {
  font-family: inherit; font-size: 1.15rem; font-weight: 700; letter-spacing: 0.15em;
  color: var(--tm-cyan); background: none; border: none; cursor: pointer; padding: 0;
}
.team-drawer__actions { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.4rem; }
.team-btn--sm { margin-top: 0; padding: 0.55rem 0.85rem; font-size: var(--font-size-sm, 0.875rem); }

/* =====================
   KOMANDOS INFO (perdarytas — kvėpuoja, su avatarais)
   ===================== */
.team-info { gap: 1.25rem; padding: 1.25rem 1.1rem; }

.team-info__label {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tm-text-mute);
}

/* Pavadinimas + kodas — dvi plytelės šalia (arba viena po kita siaurame) */
.team-info__stats {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
}
.team-info__stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 0.95rem;
  background: oklch(0.78 0.13 215 / 0.06);
  border: 1px solid var(--tm-border-soft);
  border-radius: var(--tm-radius-sm);
  text-align: left;
}
.team-info__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--tm-text);
  line-height: 1.15;
  word-break: break-word;
}
.team-info__stat--code {
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s var(--tm-ease), background 0.2s var(--tm-ease);
  position: relative;
}
.team-info__stat--code:hover { border-color: var(--tm-cyan); background: oklch(0.78 0.13 215 / 0.12); }
.team-info__code {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--tm-cyan);
  line-height: 1.15;
}
.team-info__copy-hint {
  font-size: 0.62rem;
  color: var(--tm-text-mute);
  transition: color 0.2s var(--tm-ease);
}
.team-info__stat--code:hover .team-info__copy-hint { color: var(--tm-cyan); }

/* Nariai */
.team-info__members-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}
.team-info__count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--tm-cyan);
}
.team-info__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.team-info__member {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--tm-radius-sm);
  background: oklch(1 0 0 / 0.03);
}
.team-info__member-avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: oklch(0.99 0 0);
  overflow: hidden;
}
.team-info__member-name {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tm-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-info__member-badge {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tm-gold);
  background: oklch(0.83 0.13 85 / 0.14);
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
}
.team-info__member--me .team-info__member-name { color: var(--tm-cyan); }

/* Veiksmai — prisispaudę prie dugno */
.team-info__actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 0.5rem;
}
.team-info__actions .team-btn { margin-top: 0; font-size: 0.875rem; padding: 0.6rem 1rem; }
.team-info__actions .team-form__note { margin: 0.1rem 0 0; text-align: center; font-size: 0.75rem; }

/* Siaurame ekrane stat'ai vienas po kitu */
@media (max-width: 360px) {
  .team-info__stats { grid-template-columns: 1fr; }
}

/* Drawer sekcijos (Pakviesti / Gauti kvietimai viename drawer'yje) */
.team-drawer__section + .team-drawer__section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--tm-border-soft);
}
.team-drawer__subtitle {
  margin: 0 0 0.6rem;
  font-size: var(--font-size-sm, 0.9rem);
  font-weight: 700;
  color: var(--tm-text);
}
.team-drawer__section .team-invite { margin-top: 0; background: none; border: none; padding: 0; }
.team-btn--danger {
  color: oklch(0.78 0.15 25);
  background: oklch(0.55 0.18 25 / 0.12);
  border-color: oklch(0.55 0.18 25 / 0.45);
}
.team-btn--danger:hover { background: oklch(0.55 0.18 25 / 0.2); border-color: oklch(0.65 0.2 25); }

/* Gautų kvietimų sąrašas */
.team-drawer__invites { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.team-drawer__empty { color: var(--tm-text-mute); font-size: var(--font-size-sm, 0.9rem); }
.team-invite-card {
  padding: 0.75rem; border: 1px solid var(--tm-border-soft); border-radius: var(--tm-radius-sm);
  background: oklch(0.78 0.13 215 / 0.07);
}
.team-invite-card__name { font-weight: 600; color: var(--tm-text); margin: 0 0 0.5rem; }
.team-invite-card__actions { display: flex; gap: 0.5rem; }
.team-invite-card__actions .team-btn { margin-top: 0; flex: 1; padding: 0.45rem; font-size: var(--font-size-sm, 0.85rem); }

/* =====================
   CHAT
   ===================== */
.team-drawer--chat { padding: 0; }
.team-drawer__handle { display: none; } /* matomas tik mobile (bottom sheet) */

.team-drawer--chat .team-chat__messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.9rem 0.9rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Datos skirtukas (Šiandien / Vakar / data) */
.team-chat__divider {
  align-self: center;
  margin: 0.4rem 0;
  padding: 0.15rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--tm-text-mute);
  background: oklch(1 0 0 / 0.06);
  border-radius: 9999px;
}

/* Žinutės eilutė: avataras + burbulas */
.team-chat__row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: 88%;
}
.team-chat__row--mine { align-self: flex-end; flex-direction: row-reverse; }
.team-chat__row--other { align-self: flex-start; }
/* Iš eilės to paties autoriaus žinutės — glaudžiau, be pasikartojančio avataro */
.team-chat__row--grouped { margin-top: -0.35rem; }

/* Avataras / inicialų ratukas */
.team-chat__avatar {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--tm-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: oklch(0.99 0 0);
  overflow: hidden;
}
.team-chat__avatar--hidden { visibility: hidden; } /* grupuotoms žinutėms — vietos rezervas */

.team-chat__bubble {
  min-width: 0;
  padding: 0.45rem 0.7rem 0.5rem;
  border-radius: 14px;
  font-size: var(--font-size-sm, 0.9rem);
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.team-chat__row--mine .team-chat__bubble {
  background: linear-gradient(135deg, var(--tm-cyan), var(--tm-cyan-strong));
  color: oklch(0.18 0.02 230);
  border-bottom-right-radius: 4px;
}
.team-chat__row--other .team-chat__bubble {
  background: oklch(0.3 0.03 250);
  color: var(--tm-text);
  border-bottom-left-radius: 4px;
}
.team-chat__author {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--tm-cyan);
  margin-bottom: 0.15rem;
}
.team-chat__row--mine .team-chat__author { display: none; } /* savo vardo nerodom */
.team-chat__time {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.62rem;
  opacity: 0.7;
  text-align: right;
}
.team-chat__row--other .team-chat__time { text-align: left; }

/* Įvesties forma */
.team-chat__form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.7rem;
  border-top: 1px solid var(--tm-border-soft);
  background: oklch(0.2 0.025 245);
}
.team-chat__form .team-form__input {
  flex: 1;
  border-radius: 9999px;
  padding: 0.6rem 0.9rem;
}
.team-chat__send {
  margin-top: 0 !important;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  padding: 0 !important;
  border-radius: 50%;
  font-size: 1.1rem;
}

/* Emoji parinkiklis */
.team-chat__emoji-wrap { position: relative; flex-shrink: 0; }
.team-chat__emoji-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--tm-border);
  background: oklch(1 0 0 / 0.06);
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-chat__emoji-btn:hover { background: oklch(1 0 0 / 0.12); }
.team-chat__emoji-panel {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 0;
  z-index: 5;
  width: 264px;
  max-width: 78vw;
  padding: 0.5rem;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.15rem;
  background: oklch(0.24 0.03 260);
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-sm);
  box-shadow: 0 10px 30px oklch(0.1 0.03 275 / 0.55);
}
.team-chat__emoji-panel button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  padding: 0.25rem;
  border-radius: 8px;
  line-height: 1;
}
.team-chat__emoji-panel button:hover { background: oklch(1 0 0 / 0.1); }

/* Emoji parinkiklį rodom tik nuo ~360px (mažuose ekranuose – native klaviatūra) */
@media (max-width: 359px) {
  .team-chat__emoji-wrap { display: none; }
}

/* =====================
   MOBILE: drawer kaip apatinis lapas (bottom sheet)
   ===================== */
@media (max-width: 640px) {
  .team-drawer {
    width: 100vw;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    height: 85vh;
    max-height: 85dvh;
    border-left: none;
    border-top: 1px solid var(--tm-border);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 40px oklch(0.08 0.02 275 / 0.6);
    animation: team-drawer-up 0.3s var(--tm-ease);
  }
  @keyframes team-drawer-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  /* Tempimo rankenėlė viršuje */
  .team-drawer__handle {
    display: block;
    width: 40px;
    height: 4px;
    margin: 0.5rem auto 0.1rem;
    border-radius: 9999px;
    background: var(--tm-border);
    cursor: grab;
  }
  .team-drawer__head { padding: 0.6rem 1rem; }
  /* Drag būsenoje — be animacijos, kad tiesiogiai sektų pirštą */
  .team-drawer.is-dragging { animation: none; transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .team-fab__item, .team-drawer { animation: none; transition: opacity 0.2s; }
}
