.mf {
  transition: background 0.4s;
}

.mf.night {
  background: linear-gradient(180deg, #111827, #1e1b4b);
  color: #e5e7eb;
}

.mf.night .pt-muted {
  color: #9ca3af;
}

.mf h3 {
  font-size: 1.2rem;
}

.mf-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  width: min(280px, 100%);
  padding: 14px;
  border: 2px dashed var(--border);
  border-radius: 16px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.mf-card.open {
  border-style: solid;
  border-color: var(--accent);
}

.mf-icon {
  font-size: 2.4rem;
}

.mf-card small {
  color: var(--muted);
}

.mf-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mf-list li {
  display: flex;
  flex-direction: column;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
}

.mf-list li.dead {
  opacity: 0.5;
}

.mf-list li.me {
  border-color: var(--accent);
}

.mf-list em {
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
}

.mf-list em.bad {
  color: var(--danger);
}

.mf-list em.good {
  color: var(--success);
}

.mf-log {
  width: 100%;
  font-size: 0.85rem;
  text-align: left;
}

.mf-log p {
  margin: 0 0 3px;
}

.mf-mchat {
  width: 100%;
  max-height: 120px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.85rem;
  text-align: left;
}

.mf-mchat p {
  margin: 0 0 3px;
}

.mf-say {
  display: flex;
  gap: 4px;
  width: 100%;
}

.mf-say input {
  flex: 1;
}

.mf-votes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: center;
  font-size: 0.8rem;
}

/* ---------- телефон: роль, действие фазы и список игроков — на одном экране ---------- */
@media (max-width: 640px) {
  .pt-panel.mf {
    gap: 8px;
    padding: 10px 8px;
  }

  .mf h3 {
    margin: 0;
    font-size: 1.05rem;
  }

  .pt-panel.mf > p {
    margin: 0;
    font-size: 0.92rem;
  }

  /* карточка роли — строкой: значок слева, название и подсказка справа */
  .mf-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0 10px;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    text-align: left;
  }

  .mf-icon {
    grid-row: span 2;
    font-size: 1.9rem;
    line-height: 1;
  }

  .mf-card small {
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .mf-targets {
    gap: 6px;
  }

  .mf-targets .btn {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .mf-mchat {
    max-height: 84px;
  }

  .mf-list {
    gap: 4px;
  }

  .mf-list li {
    padding: 3px 8px;
    font-size: 0.8rem;
  }

  .mf-list em {
    font-size: 0.7rem;
  }
}
