/*
 * Teams (/organizations/) on the Film set theme.
 * Tokens, glass, tiles, pills, buttons and the toast come from tokens.css (B1); this file
 * lays out the page and neutralises styles.css's sign-in era defaults (uppercase chamfered
 * buttons and labels) so team names and actions read as written. Every animation and
 * transition lives in the reduced-motion no-preference block at the end.
 */

.teams-page [hidden] { display: none !important; }

.teams-page {
  min-height: 100vh;
  font-family: var(--fs-font);
  font-size: 15px;
  line-height: 1.5;
}

/* styles.css gives every button a chamfer, caps and a transition, and every label caps. */
.teams-page button {
  clip-path: none;
  font-family: var(--fs-font);
  letter-spacing: 0;
  text-transform: none;
  transition: none;
}

.teams-page label,
.teams-page legend {
  display: block;
  color: var(--fs-ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.teams-page a { color: var(--fs-link); }
.teams-page a:hover { color: var(--fs-ink); }

.teams-page :is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--fs-focus);
  outline-offset: 3px;
}

.teams-page .skip-link {
  background: var(--fs-glass-solid);
  border: 1px solid var(--fs-focus);
  border-radius: var(--fs-radius-ctl);
  color: var(--fs-ink);
}

/* ---------- Header ---------- */
.teams-page .teams-topbar {
  position: relative;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(8, 8, 10, .42);
  -webkit-backdrop-filter: var(--fs-blur);
  backdrop-filter: var(--fs-blur);
  border-bottom: 1px solid var(--fs-line);
}

.teams-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--fs-ink);
  text-decoration: none;
}

.teams-page .teams-brand,
.teams-page .teams-brand:hover { color: var(--fs-ink); }

.teams-brand img { width: 36px; height: 36px; }

.teams-brand span {
  display: grid;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
}

.teams-brand small {
  color: var(--fs-ink-2);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.teams-page .topbar .teams-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  color: var(--fs-ink);
  border: 1px solid var(--fs-line-strong);
  border-radius: var(--fs-radius-ctl);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, .06);
}

.teams-page .topbar .teams-back:hover { background: rgba(255, 255, 255, .12); color: var(--fs-ink); }

/* ---------- Page ---------- */
.teams-shell {
  display: grid;
  gap: 20px;
  align-content: start;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 40px) 128px;
  outline: none;
}

.teams-loading,
.teams-status:not(:empty) {
  margin: 0;
  padding: 12px 16px;
  color: var(--fs-ink);
  background: var(--fs-glass);
  -webkit-backdrop-filter: var(--fs-blur);
  backdrop-filter: var(--fs-blur);
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-radius-ctl);
  font-size: 14px;
}

.teams-status:empty { display: none; }

.teams-sub,
.teams-fineprint {
  margin: 0;
  color: var(--fs-ink-2);
  font-size: 14px;
}

.teams-fineprint { font-size: 13px; }

.teams-hint {
  color: var(--fs-ink-2);
  font-size: 12px;
  font-weight: 500;
}

.teams-label {
  display: block;
  margin: 0 0 6px;
  color: var(--fs-ink);
  font-size: 14px;
  font-weight: 600;
}

.teams-h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.teams-h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.teams-h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.teams-text-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 4px;
  color: var(--fs-link);
  background: none;
  border: 0;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}

.teams-page .teams-text-button:hover:not(:disabled) { color: var(--fs-ink); background: none; }

.teams-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: var(--fs-radius);
}

.teams-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* ---------- Invitations for you ---------- */
.teams-inbox-list {
  display: grid;
  gap: 12px;
}

.teams-invitation .fs-sub { color: rgba(255, 255, 255, .80); }

.teams-invitation.is-highlighted {
  box-shadow: 0 0 0 2px var(--fs-info);
}

/* ---------- Team head and switcher ---------- */
.teams-workspace {
  display: grid;
  gap: 18px;
}

.teams-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}

.teams-head-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.teams-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.teams-page .teams-title {
  max-width: none;
  margin: 0;
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-transform: none;
}

.teams-meta {
  margin: 0;
  color: var(--fs-ink-2);
  font-size: 14px;
}

.teams-switcher-wrap { position: relative; flex: none; }

.teams-icon-button {
  display: inline-grid;
  place-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  color: var(--fs-ink);
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--fs-line-strong);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.teams-page .teams-icon-button:hover:not(:disabled) { color: var(--fs-ink); background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .30); }

.teams-icon-button[aria-expanded="true"] { background: rgba(255, 255, 255, .16); }

.teams-popover {
  position: absolute;
  z-index: 30;
  display: grid;
  gap: 2px;
  min-width: 240px;
  max-width: min(340px, calc(100vw - 32px));
  padding: 8px;
  color: var(--fs-ink);
  background: rgba(14, 14, 18, .94);
  -webkit-backdrop-filter: var(--fs-blur);
  backdrop-filter: var(--fs-blur);
  border: 1px solid var(--fs-line-strong);
  border-radius: 12px;
  box-shadow: var(--fs-shadow);
}

.teams-team-menu { top: calc(100% + 8px); left: 0; }
.teams-team-menu .fs-kicker { padding: 6px 10px 4px; }

.teams-team-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.teams-page .teams-menu-item {
  display: grid;
  justify-items: start;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  color: var(--fs-ink);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.teams-page .teams-menu-item:hover:not(:disabled),
.teams-page .teams-menu-item:focus-visible { color: var(--fs-ink); background: rgba(255, 255, 255, .09); }

.teams-menu-item small { color: var(--fs-ink-2); font-size: 12px; font-weight: 500; }
.teams-menu-name { overflow-wrap: anywhere; }
.teams-menu-item[aria-current="true"] { background: rgba(255, 255, 255, .06); box-shadow: inset 3px 0 0 var(--fs-ink); }
.teams-page .teams-menu-new { border-top: 1px solid var(--fs-line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.teams-page .teams-menu-item--danger { color: var(--fs-danger-label); }
.teams-page .teams-menu-item--danger:hover:not(:disabled) { color: var(--fs-danger-action); }

.teams-invite-button { flex: none; }

.teams-archived { padding: 14px 18px; font-size: 14px; }

/* ---------- Tabs (real links) ---------- */
.teams-tabs {
  display: flex;
  gap: 4px 26px;
  border-bottom: 1px solid var(--fs-line);
  overflow-x: auto;
  scrollbar-width: none;
}

.teams-tabs::-webkit-scrollbar { display: none; }

.teams-page .teams-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 2px;
  color: var(--fs-ink-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.teams-page .teams-tabs a:hover { color: var(--fs-ink); }

.teams-page .teams-tabs a[aria-current="page"] {
  color: var(--fs-ink);
  box-shadow: inset 0 -2px 0 var(--fs-ink);
}

.teams-page .teams-tabs a:focus-visible { outline-offset: -2px; border-radius: 6px; }

.teams-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.teams-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}

.teams-panel-status:empty { display: none; }
.teams-panel-status { margin: 0; color: var(--fs-ink); font-size: 14px; }
.teams-retry { margin: 0; padding: 10px 14px; background: var(--fs-danger-tint); border: 1px solid var(--fs-danger-line); border-radius: var(--fs-radius-ctl); }

/* ---------- Members table ---------- */
.teams-table-wrap {
  overflow: visible;
  border-radius: var(--fs-radius);
}

.teams-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.teams-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 14px 16px 12px;
  color: var(--fs-ink-2);
  background: rgba(12, 12, 15, .88);
  border-bottom: 1px solid var(--fs-line);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-align: left;
  text-transform: uppercase;
}

.teams-table th:first-child { border-top-left-radius: var(--fs-radius); }
.teams-table th:last-child { border-top-right-radius: var(--fs-radius); width: 64px; }

.teams-table td {
  padding: 14px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--fs-line);
}

.teams-table tbody tr:last-child td { border-bottom: 0; }

.teams-row--placeholder td { color: var(--fs-ink-2); padding: 22px 16px; }

.teams-who { min-width: 0; }

.teams-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  color: var(--fs-ink);
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.teams-email {
  display: block;
  margin-top: 2px;
  color: var(--fs-ink-2);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.teams-you {
  padding: 1px 8px;
  color: var(--fs-ink);
  background: rgba(255, 255, 255, .10);
  border-radius: var(--fs-radius-pill);
  font-size: 12px;
  font-weight: 600;
}

.teams-role { color: var(--fs-ink); white-space: nowrap; }

.teams-seat-control {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 2px 10px;
}

.teams-seat-word { color: var(--fs-ink-2); font-size: 13px; }
.teams-seat-hint { grid-column: 1 / -1; max-width: 22ch; }

/* The paid-seat switch: green when a seat is paid and in use. */
.teams-page .teams-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--fs-radius-pill);
  cursor: pointer;
}

.teams-page .teams-switch:hover:not([aria-disabled="true"]) { background: rgba(255, 255, 255, .24); }

.teams-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.teams-page .teams-switch[aria-checked="true"] {
  background: var(--fs-good);
  border-color: var(--fs-good-ring);
}

.teams-page .teams-switch[aria-checked="true"]:hover:not([aria-disabled="true"]) { background: #3AD987; }

.teams-switch[aria-checked="true"] .teams-switch-knob { left: 21px; }

.teams-switch[aria-disabled="true"] { cursor: not-allowed; opacity: .5; }
.teams-switch.is-busy { cursor: progress; opacity: .7; }

.teams-row-menu { position: relative; display: flex; justify-content: flex-end; }
.teams-dots { width: 40px; height: 40px; min-height: 40px; border-radius: 10px; }
.teams-row-popover { top: calc(100% + 6px); right: 0; min-width: 220px; }

/* ---------- Seats & billing ---------- */
.teams-seat-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "ring copy"
    "letters letters"
    "actions actions"
    "fine fine";
  align-items: center;
  gap: 14px 20px;
  min-height: 0;
  padding: 24px;
}

.teams-seat-ring { grid-area: ring; }
.teams-seat-ring .fs-ring { width: 76px; height: 76px; }
.teams-seat-copy { grid-area: copy; display: grid; gap: 4px; min-width: 0; }
.teams-seat-letters { grid-area: letters; }
.teams-seat-letters .fs-seats { height: 34px; }
.teams-seat-card .teams-actions { grid-area: actions; }
.teams-seat-card .teams-fineprint { grid-area: fine; color: var(--fs-tone-sub, var(--fs-ink-2)); }

.teams-own-seat { min-height: 0; }

.teams-subscribe { gap: 16px; }

.teams-subscribe-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 32px;
}

.teams-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--fs-line-strong);
  border-radius: var(--fs-radius-ctl);
  overflow: hidden;
}

.teams-page .teams-step {
  width: 48px;
  min-height: 48px;
  justify-content: center;
  padding: 0;
  color: var(--fs-ink);
  background: rgba(255, 255, 255, .07);
  border: 0;
  font-size: 22px;
  font-weight: 500;
}

.teams-page .teams-step:hover:not(:disabled) { background: rgba(255, 255, 255, .14); }
.teams-page .teams-step:focus-visible { outline-offset: -3px; }

.teams-page .teams-stepper input[type="number"] {
  width: 72px;
  min-height: 48px;
  padding: 0 6px;
  color: var(--fs-ink);
  background: rgba(0, 0, 0, .30);
  border: 0;
  border-inline: 1px solid var(--fs-line-strong);
  border-radius: 0;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.teams-stepper input::-webkit-outer-spin-button,
.teams-stepper input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }

.teams-page .teams-stepper input[type="number"]:focus-visible { outline-offset: -3px; border-color: var(--fs-line-strong); }

.teams-segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.teams-segmented legend { width: 100%; }

.teams-page .teams-segmented label {
  position: relative;
  display: inline-flex;
}

.teams-segmented input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.teams-segmented span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  color: var(--fs-ink-2);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--fs-line-strong);
  border-radius: var(--fs-radius-ctl);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.teams-segmented input:checked + span {
  color: var(--fs-ink);
  background: rgba(255, 255, 255, .14);
  border-color: var(--fs-ink);
}

.teams-segmented input:focus-visible + span { outline: 2px solid var(--fs-focus); outline-offset: 3px; }

.teams-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0;
}

.teams-total .teams-label { margin: 0; }

.teams-total strong {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.teams-past-billing { gap: 12px; }

.teams-past-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.teams-past-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--fs-line);
}

/* ---------- Settings ---------- */
.teams-form { max-width: 640px; }

.teams-field { display: grid; gap: 0; }

.teams-page .teams-field input,
.teams-page .teams-field select,
.teams-page .teams-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--fs-ink);
  background: rgba(0, 0, 0, .34);
  border: 1px solid var(--fs-line-strong);
  border-radius: var(--fs-radius-ctl);
  font: 500 16px/1.4 var(--fs-font);
}

.teams-page .teams-field textarea { resize: vertical; }

.teams-page .teams-field :is(input, select, textarea):hover { border-color: rgba(255, 255, 255, .34); }

.teams-page .teams-field :is(input, select, textarea):focus { border-color: var(--fs-ink); }

.teams-country {
  display: flex;
  align-items: center;
  gap: 12px;
}

.teams-page .teams-country input { width: 88px; text-transform: uppercase; }

.teams-form-status:empty { display: none; }
.teams-form-status { margin: 0; color: var(--fs-ink); font-size: 14px; }

.teams-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 0;
}

.teams-facts dt { color: var(--fs-ink-2); font-size: 13px; }
.teams-facts dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }

.teams-danger {
  gap: 0;
  padding: 8px 22px;
  background: linear-gradient(var(--fs-danger-tint), var(--fs-danger-tint)), var(--fs-glass);
  -webkit-backdrop-filter: var(--fs-blur);
  backdrop-filter: var(--fs-blur);
  border: 1px solid var(--fs-danger-line);
}

.teams-danger > .teams-h3 { padding: 14px 0 6px; color: var(--fs-danger-label); }

.teams-danger-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 90, 74, .25);
}

.teams-danger-row p { margin: 0; max-width: 60ch; color: rgba(255, 255, 255, .80); font-size: 14px; }

.teams-seat-card .fs-value--word { font-size: clamp(24px, 2.2vw, 30px); }

.teams-page .teams-danger-button {
  color: var(--fs-danger-action);
  border-color: var(--fs-danger-line);
  background: rgba(229, 57, 43, .12);
}

.teams-page .teams-danger-button:hover:not(:disabled) { color: #FFFFFF; background: var(--fs-action); border-color: var(--fs-action); }

/* Once the team name is typed, confirming is the one red action in the sheet. */
.teams-page #confirm-submit:not(:disabled) { color: #FFFFFF; background: var(--fs-action); border-color: var(--fs-action); }
.teams-page #confirm-submit:not(:disabled):hover { background: var(--fs-action-hover); border-color: var(--fs-action-hover); }

/* ---------- No team yet ---------- */
.teams-empty {
  display: grid;
  justify-items: start;
  gap: 14px;
  max-width: 720px;
  padding: clamp(24px, 5vw, 44px);
  border-radius: var(--fs-radius);
}

.teams-empty-art .fs-seats { height: 38px; }

.teams-page .teams-empty-title {
  max-width: 22ch;
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.teams-empty p { margin: 0; max-width: 56ch; color: var(--fs-ink-2); }

/* ---------- Toast (Undo) ---------- */
.teams-toast { gap: 10px; }

.teams-toast-text { margin: 0; }

.teams-page .teams-toast-undo {
  min-height: 36px;
  padding: 6px 14px;
  color: var(--fs-ink);
  background: rgba(255, 255, 255, .10);
  border: 1px solid var(--fs-line-strong);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.teams-page .teams-toast-undo:hover:not(:disabled) { background: rgba(255, 255, 255, .18); }

.teams-page .teams-toast-close {
  width: 36px;
  min-height: 36px;
  justify-content: center;
  padding: 0;
  color: var(--fs-ink-2);
  background: none;
  border: 0;
  font-size: 20px;
}

.teams-page .teams-toast-close:hover:not(:disabled) { color: var(--fs-ink); background: none; }

/* ---------- Sheets (native <dialog>: focus stays inside, Escape closes) ---------- */
.teams-sheet {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  color: var(--fs-ink);
  background: rgba(16, 16, 20, .96);
  border: 1px solid var(--fs-line-strong);
  border-radius: var(--fs-radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}

.teams-sheet::backdrop {
  background: rgba(0, 0, 0, .58);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.teams-sheet--danger { border-color: var(--fs-danger-line); }

.teams-sheet-form {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.teams-sheet-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.teams-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.teams-echo {
  padding: 1px 6px;
  color: var(--fs-ink);
  background: rgba(255, 255, 255, .10);
  border-radius: 6px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.teams-choices {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.teams-page .teams-choices label,
.teams-page .teams-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-radius-ctl);
  color: var(--fs-ink-2);
  font-size: 14px;
  cursor: pointer;
}

.teams-page .teams-choices label:has(input:checked),
.teams-page .teams-check:has(input:checked) { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .08); }

.teams-choices b,
.teams-check b { display: block; color: var(--fs-ink); font-size: 15px; font-weight: 600; }

.teams-page .teams-choices input,
.teams-page .teams-check input {
  flex: none;
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 2px 0 0;
  accent-color: var(--fs-good);
}

.teams-check input:disabled + span { opacity: .6; }

/* ---------- Phones ---------- */
@media (max-width: 720px) {
  .teams-shell { gap: 16px; padding-top: 20px; }
  .teams-head { align-items: stretch; }
  .teams-invite-button { width: 100%; }
  .teams-tabs { gap: 4px 20px; }

  .teams-table-wrap { background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .teams-table,
  .teams-table tbody { display: block; }
  .teams-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .teams-table tbody { display: grid; gap: 10px; }
  .teams-table tr {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "who who more"
      "role state state"
      "seat seat seat";
    align-items: center;
    gap: 10px 12px;
    padding: 16px;
    background: var(--fs-glass-strong);
    -webkit-backdrop-filter: var(--fs-blur);
    backdrop-filter: var(--fs-blur);
    border: 1px solid var(--fs-line);
    border-radius: var(--fs-radius);
  }
  .teams-table td { display: block; padding: 0; border: 0; }
  .teams-row--placeholder td { padding: 0; }
  .teams-who { grid-area: who; }
  .teams-role { grid-area: role; color: var(--fs-ink-2); font-size: 13px; }
  .teams-seat { grid-area: seat; padding-top: 12px; border-top: 1px solid var(--fs-line); }
  .teams-table td.teams-seat--empty { display: none; }
  .teams-role::after { content: "·"; margin-left: 10px; color: var(--fs-ink-3); }
  .teams-state { grid-area: state; }
  .teams-more { grid-area: more; align-self: start; }
  .teams-seat-word { color: var(--fs-ink); font-size: 14px; }

  .teams-page .topbar .teams-back { min-height: 40px; padding: 8px 12px; font-size: 13px; }
  .teams-seat-card {
    grid-template-columns: auto 1fr;
    padding: 20px;
  }
  .teams-seat-ring .fs-ring { width: 60px; height: 60px; }
  .teams-danger-row .fs-button { width: 100%; }
  .teams-past-row .fs-button { width: 100%; }

  .teams-sheet {
    width: 100vw;
    max-width: 100vw;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: var(--fs-radius) var(--fs-radius) 0 0;
    border-bottom: 0;
  }
  .teams-sheet-form { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .teams-sheet-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .teams-toast { left: 16px; right: 16px; max-width: none; transform: none; }
  .teams-popover { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; max-width: none; }
}

/* ---------- Motion: calm, and only when welcome ---------- */
@media (prefers-reduced-motion: no-preference) {
  .teams-page button,
  .teams-page .teams-tabs a,
  .teams-segmented span {
    transition: background-color var(--fs-state) linear, border-color var(--fs-state) linear, color var(--fs-state) linear, box-shadow var(--fs-state) linear;
  }

  .teams-switch-knob { transition: left var(--fs-state) var(--fs-ease-hard); }

  .teams-popover:not([hidden]) { animation: fs-arrive var(--fs-arrive) linear both; }

  .teams-sheet[open] { animation: fs-land var(--fs-land) var(--fs-ease-hard) both; }

  .teams-toast:not([hidden]) { animation: teams-toast-in var(--fs-arrive) linear both; }
}

@keyframes teams-toast-in {
  from { opacity: 0; transform: translate(-50%, 14px); }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 720px) {
  .teams-toast:not([hidden]) { animation-name: fs-arrive; }
}
